HDFS-9174. Fix findbugs warnings in FSOutputSummer.tracer and DirectoryScanner$ReportCompiler.currentThread. Contributed by Yi Liu.

This commit is contained in:
Haohui Mai 2015-09-29 14:56:06 -07:00
parent 80d33b589b
commit 8703301b46
3 changed files with 3 additions and 11 deletions

View File

@ -22,7 +22,6 @@
import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.util.DataChecksum; import org.apache.hadoop.util.DataChecksum;
import org.apache.htrace.core.TraceScope; import org.apache.htrace.core.TraceScope;
import org.apache.htrace.core.Tracer;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
@ -43,8 +42,6 @@ abstract public class FSOutputSummer extends OutputStream {
private byte checksum[]; private byte checksum[];
// The number of valid bytes in the buffer. // The number of valid bytes in the buffer.
private int count; private int count;
// The HTrace tracer to use
private Tracer tracer;
// We want this value to be a multiple of 3 because the native code checksums // We want this value to be a multiple of 3 because the native code checksums
// 3 chunks simultaneously. The chosen value of 9 strikes a balance between // 3 chunks simultaneously. The chosen value of 9 strikes a balance between

View File

@ -1459,6 +1459,9 @@ Release 2.8.0 - UNRELEASED
HDFS-9141. Thread leak in Datanode#refreshVolumes. (Uma Maheswara Rao G HDFS-9141. Thread leak in Datanode#refreshVolumes. (Uma Maheswara Rao G
via yliu) via yliu)
HDFS-9174. Fix findbugs warnings in FSOutputSummer.tracer and
DirectoryScanner$ReportCompiler.currentThread. (Yi Liu via wheat9)
Release 2.7.2 - UNRELEASED Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -784,12 +784,6 @@ private class ReportCompiler implements Callable<ScanInfoPerBlockPool> {
// purposes // purposes
private final StopWatch perfTimer = new StopWatch(); private final StopWatch perfTimer = new StopWatch();
/**
* The associated thread. Used for testing purposes only.
*/
@VisibleForTesting
Thread currentThread;
/** /**
* Create a report compiler for the given volume on the given datanode. * Create a report compiler for the given volume on the given datanode.
* *
@ -809,8 +803,6 @@ public ReportCompiler(DataNode datanode, FsVolumeSpi volume) {
*/ */
@Override @Override
public ScanInfoPerBlockPool call() throws IOException { public ScanInfoPerBlockPool call() throws IOException {
currentThread = Thread.currentThread();
String[] bpList = volume.getBlockPoolList(); String[] bpList = volume.getBlockPoolList();
ScanInfoPerBlockPool result = new ScanInfoPerBlockPool(bpList.length); ScanInfoPerBlockPool result = new ScanInfoPerBlockPool(bpList.length);
for (String bpid : bpList) { for (String bpid : bpList) {