accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1447848 - in /accumulo/trunk: ./ assemble/ bin/ core/ examples/ examples/instamo/ fate/src/main/java/org/apache/accumulo/fate/ fate/src/main/java/org/apache/accumulo/fate/zookeeper/ server/ server/src/main/java/org/apache/accumulo/server/m...
Date Tue, 19 Feb 2013 17:43:45 GMT
Author: ecn
Date: Tue Feb 19 17:43:44 2013
New Revision: 1447848

URL: http://svn.apache.org/r1447848
Log:
ACCUMULO-1053 let file-not-found errors propagate and fail the FATE operation, merge to trunk

Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/assemble/   (props changed)
    accumulo/trunk/bin/accumulo
    accumulo/trunk/bin/config.sh
    accumulo/trunk/core/   (props changed)
    accumulo/trunk/examples/   (props changed)
    accumulo/trunk/examples/instamo/pom.xml
    accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java   (props changed)
    accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java 
 (props changed)
    accumulo/trunk/pom.xml
    accumulo/trunk/server/   (props changed)
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
    accumulo/trunk/src/   (props changed)

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1447845

Propchange: accumulo/trunk/assemble/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/assemble:r1447845

Modified: accumulo/trunk/bin/accumulo
URL: http://svn.apache.org/viewvc/accumulo/trunk/bin/accumulo?rev=1447848&r1=1447847&r2=1447848&view=diff
==============================================================================
--- accumulo/trunk/bin/accumulo (original)
+++ accumulo/trunk/bin/accumulo Tue Feb 19 17:43:44 2013
@@ -53,16 +53,19 @@ START_JAR=$ACCUMULO_HOME/lib/accumulo-st
 locationByProgram() 
 {
    # find the program
-   RESULT=`which $1`
-   # strip the program name from the path
-   RESULT=`dirname ${RESULT}`
-   # strip /bin from the path
-   RESULT=`dirname ${RESULT}`
-   echo ${RESULT}
+   RESULT=`which $1 2>/dev/null`
+   if test ! -z "$RESULT"
+   then
+      # strip the program name from the path
+      RESULT=`dirname ${RESULT}`
+      # strip /bin from the path
+      RESULT=`dirname ${RESULT}`
+      echo ${RESULT}
+   fi
 }
 
 test -n "$JAVA_HOME"      || export JAVA_HOME=`locationByProgram java`
-test -n "$HADOOP_HOME"    || export HADOOP_HOME=`locationByProgram hadoop`
+test -n "$HADOOP_PREFIX"    || export HADOOP_PREFIX=`locationByProgram hadoop`
 test -n "$ZOOKEEPER_HOME" || export ZOOKEEPER_HOME=`locationByProgram zkCli.sh`
 
 
@@ -97,8 +100,8 @@ if [ -z $JAVA_HOME -o ! -d $JAVA_HOME ];
   echo "JAVA_HOME is not set.  Please make sure it's set globally or in conf/accumulo-env.sh"
   exit 1
 fi
-if [ -z $HADOOP_HOME -o ! -d $HADOOP_HOME ]; then
-  echo "HADOOP_HOME is not set.  Please make sure it's set globally or in conf/accumulo-env.sh"
+if [ -z $HADOOP_PREFIX -o ! -d $HADOOP_PREFIX ]; then
+  echo "HADOOP_PREFIX is not set.  Please make sure it's set globally or in conf/accumulo-env.sh"
   exit 1
 fi
 if [ -z $ZOOKEEPER_HOME -o ! -d $ZOOKEEPER_HOME ]; then
@@ -117,11 +120,11 @@ fi
 #Export the variables just in case they are not exported
 #This makes them available to java
 export JAVA_HOME=$JAVA_HOME
-export HADOOP_HOME=$HADOOP_HOME
+export HADOOP_PREFIX=$HADOOP_PREFIX
 export ZOOKEEPER_HOME=$ZOOKEEPER_HOME
 
 JAVA=$JAVA_HOME/bin/java
 PLATFORM="`$JAVA -cp $CLASSPATH org.apache.accumulo.start.Platform`"
 
 # app isn't used anywhere, but it makes the process easier to spot when ps/top/snmp truncate
the command line
-exec $JAVA "-Dapp=$1" $ACCUMULO_OPTS -classpath $CLASSPATH -XX:OnOutOfMemoryError="kill -9
%p" -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
-Djava.library.path="$HADOOP_HOME/lib/native/$PLATFORM" -Dorg.apache.accumulo.core.home.dir="$ACCUMULO_HOME"
-Dhadoop.home.dir="$HADOOP_HOME" -Dzookeeper.home.dir="$ZOOKEEPER_HOME" org.apache.accumulo.start.Main
"$@"
+exec $JAVA "-Dapp=$1" $ACCUMULO_OPTS -classpath $CLASSPATH -XX:OnOutOfMemoryError="kill -9
%p" -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
-Djava.library.path="$HADOOP_PREFIX/lib/native/$PLATFORM" -Dorg.apache.accumulo.core.home.dir="$ACCUMULO_HOME"
-Dhadoop.home.dir="$HADOOP_PREFIX" -Dzookeeper.home.dir="$ZOOKEEPER_HOME" org.apache.accumulo.start.Main
"$@"

Modified: accumulo/trunk/bin/config.sh
URL: http://svn.apache.org/viewvc/accumulo/trunk/bin/config.sh?rev=1447848&r1=1447847&r2=1447848&view=diff
==============================================================================
--- accumulo/trunk/bin/config.sh (original)
+++ accumulo/trunk/bin/config.sh Tue Feb 19 17:43:44 2013
@@ -110,5 +110,8 @@ if [ ! -f "$ACCUMULO_HOME/conf/tracers" 
 fi
 SSH='ssh -qnf -o ConnectTimeout=2'
 
+export HADOOP_HOME=$HADOOP_PREFIX
+export HADOOP_HOME_WARN_SUPPRESS=true
+
 # See HADOOP-7154 and ACCUMULO-847
 export MALLOC_ARENA_MAX=${MALLOC_ARENA_MAX:-1}

Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/core:r1447845

Propchange: accumulo/trunk/examples/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/examples:r1447845

Modified: accumulo/trunk/examples/instamo/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/trunk/examples/instamo/pom.xml?rev=1447848&r1=1447847&r2=1447848&view=diff
==============================================================================
--- accumulo/trunk/examples/instamo/pom.xml (original)
+++ accumulo/trunk/examples/instamo/pom.xml Tue Feb 19 17:43:44 2013
@@ -25,7 +25,7 @@
   <url>http://maven.apache.org</url>
   <properties>
     <accumulo.version>1.6.0-SNAPSHOT</accumulo.version>
-    <hadoop-one.version>1.0.4</hadoop-one.version>
+    <hadoop-one.version>1.1.1</hadoop-one.version>
     <hadoop-two.version>2.0.2-alpha</hadoop-two.version>
     <maclass>org.apache.accumulo.instamo.MapReduceExample</maclass>
   </properties>

Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1447845

Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1447845

Modified: accumulo/trunk/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/trunk/pom.xml?rev=1447848&r1=1447847&r2=1447848&view=diff
==============================================================================
--- accumulo/trunk/pom.xml (original)
+++ accumulo/trunk/pom.xml Tue Feb 19 17:43:44 2013
@@ -505,7 +505,7 @@
         </property>
       </activation>
       <properties>
-        <hadoop.version>1.0.4</hadoop.version>
+        <hadoop.version>1.1.1</hadoop.version>
         <slf4j.version>1.4.3</slf4j.version>
       </properties>
       <dependencyManagement>

Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server:r1447845

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java?rev=1447848&r1=1447847&r2=1447848&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/recovery/RecoverLease.java
Tue Feb 19 17:43:44 2013
@@ -65,19 +65,11 @@ public class RecoverLease extends Master
     long diff = System.currentTimeMillis() - start;
     if (diff < master.getSystemConfiguration().getTimeInMillis(Property.MASTER_RECOVERY_DELAY))
       return Math.max(diff, 0);
-    FileSystem fs = master.getFileSystem();
-    if (fs.exists(getSource(master))) {
-      return recoverLease(master);
-    }
-    log.warn("Unable to locate file " + file + " wal for server " + server);
-    return 1000;
-  }
-  
-  private long recoverLease(Master master) {
     Path source = getSource(master);
     FileSystem fs = master.getFileSystem();
     if (fs instanceof TraceFileSystem)
       fs = ((TraceFileSystem) fs).getImplementation();
+    
     try {
       if (fs instanceof DistributedFileSystem) {
         DistributedFileSystem dfs = (DistributedFileSystem) fs;
@@ -100,7 +92,7 @@ public class RecoverLease extends Master
       return 1000;
     }
   }
-
+  
   @Override
   public Repo<Master> call(long tid, Master master) throws Exception {
     return new SubmitFileForRecovery(server, file);

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java?rev=1447848&r1=1447847&r2=1447848&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/FindOfflineTablets.java
Tue Feb 19 17:43:44 2013
@@ -17,8 +17,10 @@
 package org.apache.accumulo.server.util;
 
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.accumulo.server.cli.ClientOpts;
+import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.conf.DefaultConfiguration;
 import org.apache.accumulo.core.data.Range;
@@ -41,23 +43,26 @@ public class FindOfflineTablets {
   public static void main(String[] args) throws Exception {
     ClientOpts opts = new ClientOpts();
     opts.parseArgs(FindOfflineTablets.class.getName(), args);
-    
+    final AtomicBoolean scanning = new AtomicBoolean(false); 
     Instance instance = opts.getInstance();
     MetaDataTableScanner scanner = new MetaDataTableScanner(instance, opts.getCredentials(),
new Range());
     LiveTServerSet tservers = new LiveTServerSet(instance, DefaultConfiguration.getDefaultConfiguration(),
new Listener() {
       @Override
       public void update(LiveTServerSet current, Set<TServerInstance> deleted, Set<TServerInstance>
added) {
-        if (!deleted.isEmpty())
+        if (!deleted.isEmpty() && scanning.get())
           log.warn("Tablet servers deleted while scanning: " + deleted);
-        if (!added.isEmpty())
+        if (!added.isEmpty() && scanning.get())
           log.warn("Tablet servers added while scanning: " + added);
       }
     });
+    tservers.startListeningForTabletServerChanges();
+    scanning.set(true);
     while (scanner.hasNext()) {
       TabletLocationState locationState = scanner.next();
       TabletState state = locationState.getState(tservers.getCurrentServers());
       if (state != TabletState.HOSTED && TableManager.getInstance().getTableState(locationState.extent.getTableId().toString())
!= TableState.OFFLINE)
-        System.out.println(locationState + " is " + state);
+        if (!locationState.extent.equals(Constants.ROOT_TABLET_EXTENT))
+          System.out.println(locationState + " is " + state);
     }
   }
   

Propchange: accumulo/trunk/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/src:r1447845



Mime
View raw message