You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2014/11/01 23:43:34 UTC
[2/3] git commit: ACCUMULO-3213 Changed deprecation warning
suppression from method to variable for ctubbsii
ACCUMULO-3213 Changed deprecation warning suppression from method to variable for ctubbsii
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/933e39dd
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/933e39dd
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/933e39dd
Branch: refs/heads/master
Commit: 933e39ddcdbd8dac13c54965cdf21c2be5e4c7ff
Parents: 7b7b468
Author: Josh Elser <el...@apache.org>
Authored: Sat Nov 1 18:42:37 2014 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Sat Nov 1 18:42:37 2014 -0400
----------------------------------------------------------------------
.../org/apache/accumulo/master/tableOps/DeleteTable.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/933e39dd/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
index 6d22a66..96b8e63 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/DeleteTable.java
@@ -266,21 +266,23 @@ class CleanUp extends MasterRepo {
}
}
- @SuppressWarnings("deprecation")
protected void merge(VolumeManager fs, Path src, Path dest) throws IOException {
for (FileStatus child : fs.listStatus(src)) {
final String childName = child.getPath().getName();
final Path childInSrc = new Path(src, childName), childInDest = new Path(dest, childName);
+ @SuppressWarnings("deprecation")
+ boolean isFile = fs.isFile(childInSrc), isDir = child.isDir();
+
// TODO change to `child.isFile()` when Hadoop-1 support is dropped
- if (fs.isFile(childInSrc)) {
+ if (isFile) {
if (fs.exists(childInDest)) {
log.warn("File already exists in archive, ignoring. " + childInDest);
} else {
fs.rename(childInSrc, childInDest);
}
// TODO change to `child.isDirectory()` when Hadoop-1 support is dropped
- } else if (child.isDir()) {
+ } else if (isDir) {
if (fs.exists(childInDest)) {
// Recurse
merge(fs, childInSrc, childInDest);