Skip to content

Commit 3ba5496

Browse files
committed
Clean up dead code.
Change-Id: Ic3b9258abecc3372ed13afbf627a578e9894d857
1 parent 83bd41b commit 3ba5496

File tree

4 files changed

+0
-52
lines changed

4 files changed

+0
-52
lines changed

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FsTracer.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,6 @@ public static synchronized Tracer get(Configuration conf) {
4747
return instance;
4848
}
4949

50-
@VisibleForTesting
51-
public static synchronized void clear() {
52-
/*
53-
if (instance == null) {
54-
return;
55-
}
56-
try {
57-
instance.close();
58-
} finally {
59-
instance = null;
60-
}
61-
*/
62-
}
63-
6450
private FsTracer() {
6551
}
6652
}

hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/datatransfer/DataTransferProtoUtil.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,6 @@ static BaseHeaderProto buildBaseHeader(ExtendedBlock blk,
9898
return builder.build();
9999
}
100100

101-
/*
102-
public static SpanId fromProto(DataTransferTraceInfoProto proto) {
103-
if ((proto != null) && proto.hasTraceId() &&
104-
proto.hasParentId()) {
105-
return new SpanId(proto.getTraceId(), proto.getParentId());
106-
}
107-
return null;
108-
}
109-
*/
110-
111101
public static void checkBlockOpStatus(
112102
BlockOpResponseProto response,
113103
String logInfo) throws IOException {

hadoop-hdfs-project/hadoop-hdfs-client/src/test/java/org/apache/hadoop/hdfs/TestDFSPacket.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -65,31 +65,4 @@ public static void assertArrayRegionsEqual(byte []buf1, int off1, byte []buf2,
6565
}
6666
}
6767
}
68-
69-
/*
70-
@Test
71-
public void testAddParentsGetParents() throws Exception {
72-
DFSPacket p = new DFSPacket(null, maxChunksPerPacket,
73-
0, 0, checksumSize, false);
74-
SpanId parents[] = p.getTraceParents();
75-
Assert.assertEquals(0, parents.length);
76-
p.addTraceParent(new SpanId(0, 123));
77-
p.addTraceParent(new SpanId(0, 123));
78-
parents = p.getTraceParents();
79-
Assert.assertEquals(1, parents.length);
80-
Assert.assertEquals(new SpanId(0, 123), parents[0]);
81-
parents = p.getTraceParents(); // test calling 'get' again.
82-
Assert.assertEquals(1, parents.length);
83-
Assert.assertEquals(new SpanId(0, 123), parents[0]);
84-
p.addTraceParent(new SpanId(0, 1));
85-
p.addTraceParent(new SpanId(0, 456));
86-
p.addTraceParent(new SpanId(0, 789));
87-
parents = p.getTraceParents();
88-
Assert.assertEquals(4, parents.length);
89-
Assert.assertEquals(new SpanId(0, 1), parents[0]);
90-
Assert.assertEquals(new SpanId(0, 123), parents[1]);
91-
Assert.assertEquals(new SpanId(0, 456), parents[2]);
92-
Assert.assertEquals(new SpanId(0, 789), parents[3]);
93-
}
94-
*/
9568
}

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSOutputStream.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ public void testCongestionBackoff() throws IOException {
295295
Whitebox.getInternalState(stream, "congestedNodes");
296296
congestedNodes.add(mock(DatanodeInfo.class));
297297
DFSPacket packet = mock(DFSPacket.class);
298-
//when(packet.getTraceParents()).thenReturn(new SpanId[] {});
299298
dataQueue.add(packet);
300299
stream.run();
301300
Assert.assertTrue(congestedNodes.isEmpty());

0 commit comments

Comments
 (0)