Package

com.twitter.server

util

Permalink

package util

Visibility
  1. Public
  2. All

Value Members

  1. object JsonConverter

    Permalink
  2. object JsonSink extends JsonSink

    Permalink

    A utility to serialize the com.twitter.util.events.Sink to JSON.

    A utility to serialize the com.twitter.util.events.Sink to JSON.

    Add the following to the onExit hook to export the Sink to a file when the server exits, or place it behind an endpoint to be triggered by request.

    val json = Writer.fromOutputStream(new FileOutputStream("sink.json"))
    val done = Reader.copy(JsonSink.serialize(Sink.default), json) ensure json.close()
    Await.result(done, 3.seconds)
  3. object JvmStats

    Permalink
  4. object TraceEventSink

    Permalink

    A utility to serialize the com.twitter.util.events.Sink in a format readable by Trace Viewer.

    A utility to serialize the com.twitter.util.events.Sink in a format readable by Trace Viewer.

    Add the following to the onExit hook to export the Sink to a file when the server exits, or place it behind an endpoint to be triggered by request.

    val trace = Writer.fromOutputStream(new FileOutputStream("sink.trace.json"))
    val done = Reader.copy(TraceEventSink.serialize(Sink.default), trace) ensure trace.close()
    Await.result(done, 3.seconds)
  5. object TwitterStats

    Permalink

Ungrouped