HDFS-8521. Add VisibleForTesting annotation to BlockPoolSlice#selectReplicaToDelete. (cmccabe)
(cherry picked from commit 806e407ac8896c4e669dba1fcf86fa5d6fee7c6d) (cherry picked from commit 12497b0543176306edbd5cd8660a59b1e2e3a1c8) 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
|
||||
prefix rather than hadoop.htrace (cmccabe)
|
||||
|
||||
HDFS-8521. Add VisibleForTesting annotation to
|
||||
BlockPoolSlice#selectReplicaToDelete. (cmccabe)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
@ -55,6 +55,8 @@
|
||||
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 @@ ReplicaInfo resolveDuplicateReplicas(
|
||||
return replicaToKeep;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static ReplicaInfo selectReplicaToDelete(final ReplicaInfo replica1,
|
||||
final ReplicaInfo replica2) {
|
||||
ReplicaInfo replicaToKeep;
|
||||
|
Loading…
x
Reference in New Issue
Block a user