HADOOP-11242. Record the time of calling in tracing span of IPC server. Contributed by Mastake Iwasaki.

This commit is contained in:
Akira Ajisaka 2015-05-27 18:04:40 +09:00
parent cdbd66be11
commit bb1816328a
3 changed files with 11 additions and 0 deletions

View File

@ -617,6 +617,9 @@ Release 2.8.0 - UNRELEASED
HADOOP-11772. RPC Invoker relies on static ClientCache which has
synchronized(this) blocks. (wheat9)
HADOOP-11242. Record the time of calling in tracing span of
IPC server. (Masatake Iwasaki via aajisaka)
BUG FIXES
HADOOP-11802: DomainSocketWatcher thread terminates sometimes after there
is an I/O error during requestShortCircuitShm (cmccabe)

View File

@ -2153,6 +2153,7 @@ public void run() {
CurCall.set(call);
if (call.traceSpan != null) {
traceScope = Trace.continueSpan(call.traceSpan);
traceScope.getSpan().addTimelineAnnotation("called");
}
try {

View File

@ -120,6 +120,13 @@ public void writeWithTracing() throws Exception {
Assert.assertEquals(ts.getSpan().getTraceId(), span.getTraceId());
}
}
// test for timeline annotation added by HADOOP-11242
Assert.assertEquals("called",
map.get("org.apache.hadoop.hdfs.protocol.ClientProtocol.create")
.get(0).getTimelineAnnotations()
.get(0).getMessage());
SetSpanReceiver.SetHolder.spans.clear();
}