accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/3] git commit: ACCUMULO-3213 Fix hadoop 1 support.
Date Sat, 01 Nov 2014 19:50:05 GMT
ACCUMULO-3213 Fix hadoop 1 support.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/3f7f6814
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/3f7f6814
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/3f7f6814

Branch: refs/heads/master
Commit: 3f7f681492166df4f0d8e589339a812a3d953775
Parents: e17d104
Author: Josh Elser <elserj@apache.org>
Authored: Sat Nov 1 15:49:22 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Sat Nov 1 15:49:22 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/master/tableOps/DeleteTable.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/3f7f6814/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 f6db45b..6d22a66 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,18 +266,21 @@ 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);
 
-      if (child.isFile()) {
+      // TODO change to `child.isFile()` when Hadoop-1 support is dropped
+      if (fs.isFile(childInSrc)) {
         if (fs.exists(childInDest)) {
           log.warn("File already exists in archive, ignoring. " + childInDest);
         } else {
           fs.rename(childInSrc, childInDest);
         }
-      } else if (child.isDirectory()) {
+        // TODO change to `child.isDirectory()` when Hadoop-1 support is dropped
+      } else if (child.isDir()) {
         if (fs.exists(childInDest)) {
           // Recurse
           merge(fs, childInSrc, childInDest);


Mime
View raw message