cloudtrace.instrument.receivers
Class ZooSpanClient
java.lang.Object
cloudtrace.instrument.receivers.AsyncSpanReceiver<java.lang.String,SpanReceiver.Client>
cloudtrace.instrument.receivers.SendSpansViaThrift
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 classes/interfaces inherited from interface org.apache.zookeeper.Watcher |
org.apache.zookeeper.Watcher.Event |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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.