Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

What is it?

An external, end-to-end view about the performance of ozone views. As an example:

...

With tracing you can identify the slow components during an end-to-end test and go forward with Java Profiler on the identified component.

In this picture we can see that the OM/SCM calls are pretty fast but we have some problem on the freon side before the first writeChunk call.

...

Until we will have a final Hadoop-wide solution we propagate the tracing id in our protobuf messages. For example this is the beginning of the OzoneManagerProtocol.proto

Code Block
languagejava

message OMRequest {
  required Type cmdType = 1; // Type of the command

  // A string that identifies this command, we generate  Trace ID in Ozone
  // frontend and this allows us to trace that command all over ozone.
  optional string traceID = 2;

  required string clientId = 3;

  

...

For example this is the serialization from a ClientSideTranslator. It uses the TracingUtil class and it create a String from the current tracing information.

Code Block
languagejava
OMRequest payload = OMRequest.newBuilder(omRequest)
    .setTraceID(TracingUtil.exportCurrentSpan())
    .build();

To deserialize it on the server side:

unmigrated-wiki-markup
Code Block
languagejava
Scope scope = TracingUtil
    .importAndCreateScope(request.getCmdType().name(), request.getTraceID());
try {
  //do the work here
} finally {
  scope.close();
}

...