cloudtrace.instrument.receivers
Class ZooSpanClient

java.lang.Object
  extended by cloudtrace.instrument.receivers.AsyncSpanReceiver<java.lang.String,SpanReceiver.Client>
      extended by cloudtrace.instrument.receivers.SendSpansViaThrift
          extended by cloudtrace.instrument.receivers.ZooSpanClient
All Implemented Interfaces:
SpanReceiver, org.apache.zookeeper.Watcher

public class ZooSpanClient
extends SendSpansViaThrift
implements org.apache.zookeeper.Watcher

Find a Span collector via zookeeper and push spans there via Thrift RPC


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.zookeeper.Watcher
org.apache.zookeeper.Watcher.Event
 
Field Summary
 
Fields inherited from class cloudtrace.instrument.receivers.AsyncSpanReceiver
host, service
 
Constructor Summary
ZooSpanClient(java.lang.String keepers, java.lang.String path, java.lang.String host, java.lang.String service, long millis)
           
 
Method Summary
 void flush()
           
protected  java.lang.String getSpanKey(java.util.Map<java.lang.String,java.lang.String> data)
           
 void process(org.apache.zookeeper.WatchedEvent event)
           
 
Methods inherited from class cloudtrace.instrument.receivers.SendSpansViaThrift
createDestination, send
 
Methods inherited from class cloudtrace.instrument.receivers.AsyncSpanReceiver
span
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZooSpanClient

public ZooSpanClient(java.lang.String keepers,
                     java.lang.String path,
                     java.lang.String host,
                     java.lang.String service,
                     long millis)
              throws java.io.IOException,
                     org.apache.zookeeper.KeeperException,
                     java.lang.InterruptedException
Throws:
java.io.IOException
org.apache.zookeeper.KeeperException
java.lang.InterruptedException
Method Detail

flush

public void flush()
Specified by:
flush in interface SpanReceiver
Overrides:
flush in class AsyncSpanReceiver<java.lang.String,SpanReceiver.Client>

getSpanKey

protected java.lang.String getSpanKey(java.util.Map<java.lang.String,java.lang.String> data)
Overrides:
getSpanKey in class SendSpansViaThrift

process

public void process(org.apache.zookeeper.WatchedEvent event)
Specified by:
process in interface org.apache.zookeeper.Watcher


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.