HDFS-8521. Add VisibleForTesting annotation to BlockPoolSlice#selectReplicaToDelete. (cmccabe)
(cherry picked from commit 806e407ac8
)
This commit is contained in:
parent
a80a68c298
commit
12497b0543
|
@ -525,6 +525,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
|
||||||
|
|
|
@ -57,7 +57,9 @@ 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;
|
||||||
import com.google.common.io.Files;
|
import com.google.common.io.Files;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
||||||
|
@ -568,6 +570,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