HDFS-8521. Add VisibleForTesting annotation to BlockPoolSlice#selectReplicaToDelete. (cmccabe)
(cherry picked from commit806e407ac8
) (cherry picked from commit12497b0543
) Conflicts: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java
This commit is contained in:
parent
323ffccfe9
commit
a7058caa72
|
@ -22,6 +22,9 @@ Release 2.7.1 - UNRELEASED
|
||||||
HDFS-8213. DFSClient should use hdfs.client.htrace HTrace configuration
|
HDFS-8213. DFSClient should use hdfs.client.htrace HTrace configuration
|
||||||
prefix rather than hadoop.htrace (cmccabe)
|
prefix rather than hadoop.htrace (cmccabe)
|
||||||
|
|
||||||
|
HDFS-8521. Add VisibleForTesting annotation to
|
||||||
|
BlockPoolSlice#selectReplicaToDelete. (cmccabe)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -55,6 +55,8 @@ import org.apache.hadoop.util.DiskChecker.DiskErrorException;
|
||||||
import org.apache.hadoop.util.ShutdownHookManager;
|
import org.apache.hadoop.util.ShutdownHookManager;
|
||||||
import org.apache.hadoop.util.Time;
|
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.
|
* 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
|
* Taken together, all BlockPoolSlices sharing a block pool ID across a
|
||||||
|
@ -545,6 +547,7 @@ class BlockPoolSlice {
|
||||||
return replicaToKeep;
|
return replicaToKeep;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@VisibleForTesting
|
||||||
static ReplicaInfo selectReplicaToDelete(final ReplicaInfo replica1,
|
static ReplicaInfo selectReplicaToDelete(final ReplicaInfo replica1,
|
||||||
final ReplicaInfo replica2) {
|
final ReplicaInfo replica2) {
|
||||||
ReplicaInfo replicaToKeep;
|
ReplicaInfo replicaToKeep;
|
||||||
|
|
Loading…
Reference in New Issue