accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From md...@apache.org
Subject [2/3] git commit: ACCUMULO-2814 Specify absolute directory in test
Date Thu, 15 May 2014 18:33:25 GMT
ACCUMULO-2814 Specify absolute directory in test

In a real accumulo deployment we re-resolve relative paths based on
ACCUMULO_HOME, which is good, but in test scenario having it set just
messed things up.


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

Branch: refs/heads/master
Commit: 5d2cf870440f4a084c560010b09bdfa911bbb618
Parents: bd3c2f0
Author: Mike Drob <mdrob@cloudera.com>
Authored: Thu May 15 14:31:22 2014 -0400
Committer: Mike Drob <mdrob@cloudera.com>
Committed: Thu May 15 14:31:22 2014 -0400

----------------------------------------------------------------------
 .../java/org/apache/accumulo/tserver/log/LocalWALRecovery.java   | 3 +--
 .../org/apache/accumulo/tserver/log/LocalWALRecoveryTest.java    | 4 +++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5d2cf870/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
index 31f4f14..51c13d5 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/LocalWALRecovery.java
@@ -32,7 +32,6 @@ import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
 import org.apache.accumulo.server.logger.LogFileKey;
 import org.apache.accumulo.server.logger.LogFileValue;
-import org.apache.accumulo.tserver.TabletServer;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -49,7 +48,7 @@ import com.google.common.annotations.VisibleForTesting;
  * This class will attempt to rewrite any local WALs to HDFS.
  */
 public class LocalWALRecovery implements Runnable {
-  private static final Logger log = Logger.getLogger(TabletServer.class);
+  private static final Logger log = Logger.getLogger(LocalWALRecovery.class);
 
   public static void main(String[] args) throws IOException {
     AccumuloConfiguration configuration = SiteConfiguration.getInstance(SiteConfiguration.getDefaultConfiguration());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5d2cf870/server/tserver/src/test/java/org/apache/accumulo/tserver/log/LocalWALRecoveryTest.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/test/java/org/apache/accumulo/tserver/log/LocalWALRecoveryTest.java
b/server/tserver/src/test/java/org/apache/accumulo/tserver/log/LocalWALRecoveryTest.java
index 54752e9..99190b2 100644
--- a/server/tserver/src/test/java/org/apache/accumulo/tserver/log/LocalWALRecoveryTest.java
+++ b/server/tserver/src/test/java/org/apache/accumulo/tserver/log/LocalWALRecoveryTest.java
@@ -55,8 +55,10 @@ public class LocalWALRecoveryTest {
 
   @Before
   public void setUp() throws Exception {
+    File source = new File("src/test/resources", "walog-from-14");
+
     configuration = createMock(AccumuloConfiguration.class);
-    expect(configuration.get(Property.LOGGER_DIR)).andReturn("src/test/resources/walog-from-14").anyTimes();
+    expect(configuration.get(Property.LOGGER_DIR)).andReturn(source.getAbsolutePath()).anyTimes();
     replay(configuration);
 
     walTarget = folder.newFolder("wal");


Mime
View raw message