accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [1/2] git commit: ACCUMULO-1788 fix test, use the right filesystem to create/delete a _tmp file
Date Fri, 18 Oct 2013 20:53:45 GMT
Updated Branches:
  refs/heads/master 4ccf2421b -> a9a371b1e


ACCUMULO-1788 fix test, use the right filesystem to create/delete a _tmp file


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

Branch: refs/heads/master
Commit: b0c5e535af1e6fcc8d28ef580a1cbdc8e2aa55fc
Parents: e498ebb
Author: Eric Newton <eric.newton@gmail.com>
Authored: Fri Oct 18 16:52:23 2013 -0400
Committer: Eric Newton <eric.newton@gmail.com>
Committed: Fri Oct 18 16:52:23 2013 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/minicluster/MiniAccumuloCluster.java     | 1 +
 .../org/apache/accumulo/server/tabletserver/TabletServer.java    | 2 +-
 .../java/org/apache/accumulo/test/functional/CleanTmpIT.java     | 4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b0c5e535/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
index 7deb980..e7ddaba 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
@@ -67,6 +67,7 @@ import org.apache.commons.vfs2.FileObject;
 import org.apache.commons.vfs2.impl.VFSClassLoader;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.zookeeper.server.ZooKeeperServerMain;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b0c5e535/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
index 79dd2b0..3aac4f4 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
@@ -3686,7 +3686,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
     for (LogEntry entry : sorted) {
       Path recovery = null;
       for (String log : entry.logSet) {
-        String[] parts = log.split("/", 2); // "host:port/filename"
+        String[] parts = log.split("/"); // "host:port/filename"
         Path finished = new Path(fs.getFullPath(FileType.RECOVERY, parts[parts.length - 1]),
"finished");
         TabletServer.log.info("Looking for " + finished);
         if (fs.exists(finished)) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/b0c5e535/test/src/test/java/org/apache/accumulo/test/functional/CleanTmpIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/CleanTmpIT.java b/test/src/test/java/org/apache/accumulo/test/functional/CleanTmpIT.java
index 06ce6ee..d455fff 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/CleanTmpIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/CleanTmpIT.java
@@ -65,7 +65,7 @@ public class CleanTmpIT extends ConfigurableMacIT {
     // create a fake _tmp file in its directory
     String id = c.tableOperations().tableIdMap().get(tableName);
     FileSystem fs = getCluster().getFileSystem();
-    Path tmp = new Path(getCluster().getConfig().getAccumuloDir().getPath() + "/tables/"
+ id + "/default_tablet/junk.rf_tmp");
+    Path tmp = new Path("/accumulo/tables/" + id + "/default_tablet/junk.rf_tmp");
     fs.create(tmp).close();
     for (ProcessReference tserver : getCluster().getProcesses().get(ServerType.TABLET_SERVER))
{
       getCluster().killProcess(ServerType.TABLET_SERVER, tserver);
@@ -76,6 +76,6 @@ public class CleanTmpIT extends ConfigurableMacIT {
     for (@SuppressWarnings("unused")
     Entry<Key,Value> entry : scanner)
       ;
-    assertFalse(!fs.exists(tmp));
+    assertFalse(fs.exists(tmp));
   }
 }


Mime
View raw message