You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2012/06/15 22:08:44 UTC
svn commit: r1350769 -
/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Author: kturner
Date: Fri Jun 15 20:08:43 2012
New Revision: 1350769
URL: http://svn.apache.org/viewvc?rev=1350769&view=rev
Log:
ACCUMULO-639 tablet server looks for walogs in correct place and does not die when dir is missing
Modified:
accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1350769&r1=1350768&r2=1350769&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java Fri Jun 15 20:08:43 2012
@@ -20,6 +20,7 @@ import static org.apache.accumulo.server
import java.io.EOFException;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
@@ -3138,6 +3139,20 @@ public class TabletServer extends Abstra
AccumuloConfiguration conf = serverConf.getConfiguration();
String localWalDirectories = conf.get(Property.LOGGER_DIR);
for (String localWalDirectory : localWalDirectories.split(",")) {
+ if (!localWalDirectory.startsWith("/")) {
+ localWalDirectory = System.getenv("ACCUMULO_HOME") + "/" + localWalDirectory;
+ }
+
+ FileStatus status = null;
+ try {
+ status = localfs.getFileStatus(new Path(localWalDirectory));
+ } catch (FileNotFoundException fne) {}
+
+ if (status == null || !status.isDir()) {
+ log.debug("Local walog dir " + localWalDirectory + " not found ");
+ continue;
+ }
+
for (FileStatus file : localfs.listStatus(new Path(localWalDirectory))) {
String name = file.getPath().getName();
try {