HDFS-7963. Fix expected tracing spans in TestTracing. Contributed by Masatake Iwasaki.
This commit is contained in:
parent
2e9c690e90
commit
370c91461f
|
@ -932,6 +932,9 @@ Release 2.7.0 - UNRELEASED
|
||||||
|
|
||||||
HDFS-7977. NFS couldn't take percentile intervals (brandonli)
|
HDFS-7977. NFS couldn't take percentile intervals (brandonli)
|
||||||
|
|
||||||
|
HDFS-7963. Fix expected tracing spans in TestTracing along with HDFS-7054.
|
||||||
|
(Masatake Iwasaki via kihwal)
|
||||||
|
|
||||||
BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
|
BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
|
||||||
|
|
||||||
HDFS-7720. Quota by Storage Type API, tools and ClientNameNode
|
HDFS-7720. Quota by Storage Type API, tools and ClientNameNode
|
||||||
|
|
|
@ -88,7 +88,10 @@ public class TestTracing {
|
||||||
"ClientNamenodeProtocol#fsync",
|
"ClientNamenodeProtocol#fsync",
|
||||||
"org.apache.hadoop.hdfs.protocol.ClientProtocol.complete",
|
"org.apache.hadoop.hdfs.protocol.ClientProtocol.complete",
|
||||||
"ClientNamenodeProtocol#complete",
|
"ClientNamenodeProtocol#complete",
|
||||||
"DFSOutputStream",
|
"newStreamForCreate",
|
||||||
|
"DFSOutputStream#writeChunk",
|
||||||
|
"DFSOutputStream#close",
|
||||||
|
"dataStreamer",
|
||||||
"OpWriteBlockProto",
|
"OpWriteBlockProto",
|
||||||
"org.apache.hadoop.hdfs.protocol.ClientProtocol.addBlock",
|
"org.apache.hadoop.hdfs.protocol.ClientProtocol.addBlock",
|
||||||
"ClientNamenodeProtocol#addBlock"
|
"ClientNamenodeProtocol#addBlock"
|
||||||
|
@ -102,10 +105,25 @@ public class TestTracing {
|
||||||
long spanStart = s.getStartTimeMillis();
|
long spanStart = s.getStartTimeMillis();
|
||||||
long spanEnd = s.getStopTimeMillis();
|
long spanEnd = s.getStopTimeMillis();
|
||||||
|
|
||||||
// There should only be one trace id as it should all be homed in the
|
// Spans homed in the top trace shoud have same trace id.
|
||||||
// top trace.
|
// Spans having multiple parents (e.g. "dataStreamer" added by HDFS-7054)
|
||||||
for (Span span : SetSpanReceiver.SetHolder.spans.values()) {
|
// and children of them are exception.
|
||||||
Assert.assertEquals(ts.getSpan().getTraceId(), span.getTraceId());
|
String[] spansInTopTrace = {
|
||||||
|
"testWriteTraceHooks",
|
||||||
|
"org.apache.hadoop.hdfs.protocol.ClientProtocol.create",
|
||||||
|
"ClientNamenodeProtocol#create",
|
||||||
|
"org.apache.hadoop.hdfs.protocol.ClientProtocol.fsync",
|
||||||
|
"ClientNamenodeProtocol#fsync",
|
||||||
|
"org.apache.hadoop.hdfs.protocol.ClientProtocol.complete",
|
||||||
|
"ClientNamenodeProtocol#complete",
|
||||||
|
"newStreamForCreate",
|
||||||
|
"DFSOutputStream#writeChunk",
|
||||||
|
"DFSOutputStream#close",
|
||||||
|
};
|
||||||
|
for (String desc : spansInTopTrace) {
|
||||||
|
for (Span span : map.get(desc)) {
|
||||||
|
Assert.assertEquals(ts.getSpan().getTraceId(), span.getTraceId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue