This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.scalatest.FunSpec | |
import Stream._ | |
import State._s | |
// import parallelism._ | |
import Par._ | |
import Gen._ | |
import Prop._ | |
import java.util.concurrent.{Executors,ExecutorService} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.twitter.zipkin.thriftscala.{Span => ThriftSpan} | |
import com.twitter.finagle.stats.StatsReceiver | |
import com.twitter.server.TwitterServer | |
import com.twitter.util.{Await, Future} | |
import com.twitter.zipkin.cassandra.CassieSpanStoreFactory | |
import com.twitter.zipkin.collector.{SpanReceiver, ZipkinQueuedCollectorFactory} | |
import com.twitter.zipkin.common._ | |
import com.twitter.zipkin.receiver.kafka.KafkaSpanReceiverFactory | |
import com.twitter.zipkin.storage.WriteSpanStore | |
import com.twitter.zipkin.zookeeper.ZooKeeperClientFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $bundle exec jruby hermann_test.rb | |
require 'hermann' | |
# require 'hermann/provider/java_simple_consumer' | |
require 'hermann/consumer' | |
require 'hermann_jars' | |
# zookeeper = "localhost:2181" | |
zookeeper = "localhost:2181" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deploy: | |
provider: rubygems | |
gemspec: zipkin-gems/zipkin-tracer/zipkin-tracer.gemspec | |
on: | |
branch: lookout | |
tags: true | |
api_key: | |
secure: NlAfnRn2v6aVQfVMWc/8+hkZ+fRvex7c4F6V0MNDu1In8KYkpE/HIqRarHM34PWDqxlizuRIB2RdikfAN8oNetfC4d+ip8oMkkxioD4pRFvR7MAs2D/hbMOqLgUJuPLtk+w4MpkqHUz+3Ov3FsBEPLrGAvDKZA+6nln6AriNkck= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix Leader election Problems | |
[Note] this method may work every time | |
[Note] this was initially caused by deleting the kafka hosts and reprovisioning | |
delete the topic using zkCli.sh | |
rmr /brokers/topics/test2 | |
sudo service kafka restart (on all the broker hosts using rundeck) | |
change to a different topic in your producer | |
you might see the number of LeaderNotAvailableException go down, maybe its doing some kind of replication here | |
at this point the consumer should be able to get messages and if u produce more, it should have fewer exceptions or 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From: /Users/jway/code/faraday-zipkin/lib/faraday-zipkin/trace_headers.rb @ line 53 Faraday::Zipkin::TraceHeaders#call: | |
48: trace_id = ::Trace.id | |
49: ::Trace.push(trace_id.next_id) | |
50: B3_HEADERS.each do |method, header| | |
51: Pry.config.input = STDIN | |
52: Pry.config.output = STDOUT | |
=> 53: binding.pry | |
54: env[:request_headers][header] = ::Trace.id.send(method).to_s | |
55: end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://groups.google.com/forum/#!topic/finaglers/0g2ySTVtZsg | |
import com.twitter.finagle.stats.{Counter, Gauge, Stat, StatsReceiver} | |
/** | |
* Created by mmlac on 8/13/14. | |
*/ | |
class StatsDStatsReceiver extends StatsReceiver { | |
override val repr: AnyRef = this | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/zipkin|master:bin/collector | |
[info] Loading project definition from /Users/jway/code/zipkin/project | |
[warn] Multiple resolvers having different access mechanism configured with same name 'local'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`). | |
[info] Set current project to zipkin (in build file:/Users/jway/code/zipkin/) | |
[info] Set current project to zipkin-collector-service (in build file:/Users/jway/code/zipkin/) | |
[info] Writing build properties to: /Users/jway/code/zipkin/zipkin-collector-service/target/resource_managed/main/com/twitter/zipkin/build.properties | |
[error] I 1204 16:31:37.815 THREAD1 org.apache.zookeeper.Environment.logEnv: Client environment:user.dir=/Users/jway/code/zipkin | |
[error] I 1204 16:31:37.816 THREAD1 org.apache.zookeeper.ZooKeeper.<init>: Initiating client connection, connectString=localhost:2181 sessionTimeout=6000 watcher=org.I0Itec.zkclient.ZkClient@19b27f92 | |
[error] I 1204 16:31:42.918 THREAD43 org.apache.zookeeper.Clien |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.twitter.zipkin.gen.{Span => ThriftSpan} | |
import com.twitter.finagle.stats.StatsReceiver | |
import com.twitter.server.TwitterServer | |
import com.twitter.util.{Await, Future} | |
import com.twitter.zipkin.cassandra.CassieSpanStoreFactory | |
import com.twitter.zipkin.collector.{SpanReceiver, ZipkinQueuedCollectorFactory} | |
import com.twitter.zipkin.common._ | |
import com.twitter.zipkin.receiver.kafka.KafkaSpanReceiverFactory | |
import com.twitter.zipkin.storage.WriteSpanStore | |
import com.twitter.zipkin.zookeeper.ZooKeeperClientFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_interface(tdb_id, server) | |
Decom.log.debug "Finding eth0 interface" | |
eth0_interface = server['interfaces'].find{|interface| interface['name'] == 'eth0' }; Decom.log.debug "server eth0 interface: #{eth0_interface.inspect}" | |
eth0_interface = thingsdb["interfaces/#{eth0_interface['id']}"].get; Decom.log.debug "eth0 interface: #{eth0_interface.inspect}" | |
eth0_interface | |
end |
NewerOlder