HDFS-8521. Add VisibleForTesting annotation to BlockPoolSlice#selectReplicaToDelete. (cmccabe)

(cherry picked from commit 806e407ac8)
(cherry picked from commit 12497b0543)

Conflicts:
	hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java
This commit is contained in:
Colin Patrick Mccabe 2015-06-02 20:06:28 -07:00
parent 323ffccfe9
commit a7058caa72
2 changed files with 6 additions and 0 deletions

View File

@ -22,6 +22,9 @@ Release 2.7.1 - UNRELEASED
HDFS-8213. DFSClient should use hdfs.client.htrace HTrace configuration
prefix rather than hadoop.htrace (cmccabe)
HDFS-8521. Add VisibleForTesting annotation to
BlockPoolSlice#selectReplicaToDelete. (cmccabe)
OPTIMIZATIONS
BUG FIXES

View File

@ -55,6 +55,8 @@ import org.apache.hadoop.util.DiskChecker.DiskErrorException;
import org.apache.hadoop.util.ShutdownHookManager;
import org.apache.hadoop.util.Time;
import com.google.common.annotations.VisibleForTesting;
/**
* A block pool slice represents a portion of a block pool stored on a volume.
* Taken together, all BlockPoolSlices sharing a block pool ID across a
@ -545,6 +547,7 @@ class BlockPoolSlice {
return replicaToKeep;
}
@VisibleForTesting
static ReplicaInfo selectReplicaToDelete(final ReplicaInfo replica1,
final ReplicaInfo replica2) {
ReplicaInfo replicaToKeep;