Skip to content

Commit

Permalink
HDFS-8521. Add VisibleForTesting annotation to BlockPoolSlice#selectR…
Browse files Browse the repository at this point in the history
…eplicaToDelete. (cmccabe)

(cherry picked from commit 806e407)
  • Loading branch information
Colin Patrick Mccabe committed Jun 3, 2015
1 parent a80a68c commit 12497b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
import org.apache.hadoop.util.ShutdownHookManager;
import org.apache.hadoop.util.Time;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.io.Files;

/**
* 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
Expand Down Expand Up @@ -568,6 +570,7 @@ ReplicaInfo resolveDuplicateReplicas(
return replicaToKeep;
}

@VisibleForTesting
static ReplicaInfo selectReplicaToDelete(final ReplicaInfo replica1,
final ReplicaInfo replica2) {
ReplicaInfo replicaToKeep;
Expand Down

0 comments on commit 12497b0

Please sign in to comment.