Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BC02610B63 for ; Fri, 18 Oct 2013 20:54:23 +0000 (UTC) Received: (qmail 69113 invoked by uid 500); 18 Oct 2013 20:54:02 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 69060 invoked by uid 500); 18 Oct 2013 20:53:58 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 69012 invoked by uid 99); 18 Oct 2013 20:53:45 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Oct 2013 20:53:45 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9F3F636900; Fri, 18 Oct 2013 20:53:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ecn@apache.org To: commits@accumulo.apache.org Date: Fri, 18 Oct 2013 20:53:45 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: ACCUMULO-1788 fix test, use the right filesystem to create/delete a _tmp file 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 Authored: Fri Oct 18 16:52:23 2013 -0400 Committer: Eric Newton 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 entry : scanner) ; - assertFalse(!fs.exists(tmp)); + assertFalse(fs.exists(tmp)); } }