accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1470737 - in /accumulo/trunk: ./ assemble/ core/ core/src/main/java/org/apache/accumulo/core/client/ examples/ fate/src/main/java/org/apache/accumulo/fate/ fate/src/main/java/org/apache/accumulo/fate/zookeeper/ server/ server/src/main/java...
Date Mon, 22 Apr 2013 22:21:02 GMT
Author: kturner
Date: Mon Apr 22 22:21:01 2013
New Revision: 1470737

URL: http://svn.apache.org/r1470737
Log:
ACCUMULO-1243 made accumulo more responsive to failed splits
ACCUMULO-765 make getAuthorizationFailures() public like it was in 1.4
ACCUMULO-578 don't log a message for every time a sorted WALOG disappears

Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/assemble/   (props changed)
    accumulo/trunk/core/   (props changed)
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java
    accumulo/trunk/examples/   (props changed)
    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   (props changed)
    accumulo/trunk/server/   (props changed)
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
    accumulo/trunk/src/   (props changed)
    accumulo/trunk/test/src/test/resources/log4j.properties

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1470634-1470670,1470672-1470683,1470685-1470704,1470706-1470736

Propchange: accumulo/trunk/assemble/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/assemble:r1470634-1470670,1470672-1470683,1470685-1470704,1470706-1470736

Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/core:r1470634-1470670,1470672-1470683,1470685-1470704,1470706-1470736

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java?rev=1470737&r1=1470736&r2=1470737&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java
Mon Apr 22 22:21:01 2013
@@ -88,7 +88,7 @@ public class MutationsRejectedException 
    * @return the internal list of authorization failures
    * @deprecated since 1.5, see {@link #getAuthorizationFailuresMap()}
    */
-  List<KeyExtent> getAuthorizationFailures() {
+  public List<KeyExtent> getAuthorizationFailures() {
     return new ArrayList<KeyExtent>(af.keySet());
   }
   

Propchange: accumulo/trunk/examples/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/examples:r1470634-1470670,1470672-1470683,1470685-1470704,1470706-1470736

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:r1470634-1470670,1470672-1470683,1470685-1470704,1470706-1470736

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:r1470634-1470670,1470672-1470683,1470685-1470704,1470706-1470736

Propchange: accumulo/trunk/pom.xml
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/pom.xml:r1470634-1470670,1470672-1470683,1470685-1470704,1470706-1470736

Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server:r1470634-1470670,1470672-1470683,1470685-1470704,1470706-1470736

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java?rev=1470737&r1=1470736&r2=1470737&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/gc/GarbageCollectWriteAheadLogs.java
Mon Apr 22 22:21:01 2013
@@ -189,15 +189,21 @@ public class GarbageCollectWriteAheadLog
     
     for (String sortedWALog : sortedWALogs) {
       log.debug("Removing sorted WAL " + sortedWALog);
+      Path swalog = new Path(recoveryDir, sortedWALog);
       try {
-        Path swalog = new Path(recoveryDir, sortedWALog);
-        if (trash == null || (fs.exists(swalog) && !trash.moveToTrash(swalog))) {
+        if (trash == null || !trash.moveToTrash(swalog)) {
           fs.delete(swalog, true);
         }
       } catch (FileNotFoundException ex) {
         // ignored
       } catch (IOException ioe) {
-        log.error("Unable to delete sorted walog " + sortedWALog + ": " + ioe);
+        try {
+          if (fs.exists(swalog)) {
+            log.error("Unable to delete sorted walog " + sortedWALog + ": " + ioe);
+          }
+        } catch (IOException ex) {
+          log.error("Unable to check for the existence of " + sortedWALog, ex);
+        }
       }
     }
 

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=1470737&r1=1470736&r2=1470737&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
Mon Apr 22 22:21:01 2013
@@ -124,6 +124,7 @@ import org.apache.accumulo.core.util.Cac
 import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.core.util.Daemon;
 import org.apache.accumulo.core.util.LoggingRunnable;
+import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.ServerServices;
 import org.apache.accumulo.core.util.ServerServices.Service;
 import org.apache.accumulo.core.util.SimpleThreadPool;
@@ -2446,24 +2447,39 @@ public class TabletServer extends Abstra
       Text locationToOpen = null;
       SortedMap<Key,Value> tabletsKeyValues = new TreeMap<Key,Value>();
       try {
-        locationToOpen = verifyTabletInformation(extent, TabletServer.this.getTabletSession(),
tabletsKeyValues, getClientAddressString(), getLock());
+        Pair<Text,KeyExtent> pair = verifyTabletInformation(extent, TabletServer.this.getTabletSession(),
tabletsKeyValues, getClientAddressString(), getLock());
+        locationToOpen = pair.getFirst();
+        if (pair.getSecond() != null) {
+          synchronized (openingTablets) {
+            openingTablets.remove(extent);
+            openingTablets.notifyAll();
+            // it expected that the new extent will overlap the old one... if it does not,
it should not be added to unopenedTablets
+            if (!KeyExtent.findOverlapping(extent, new TreeSet<KeyExtent>(Arrays.asList(pair.getSecond()))).contains(pair.getSecond()))
{
+              throw new IllegalStateException("Fixed split does not overlap " + extent +
" " + pair.getSecond());
+            }
+            unopenedTablets.add(pair.getSecond());
+          }
+          // split was rolled back... try again
+          new AssignmentHandler(pair.getSecond()).run();
+          return;
+        }
       } catch (Exception e) {
         synchronized (openingTablets) {
           openingTablets.remove(extent);
           openingTablets.notifyAll();
         }
         log.warn("Failed to verify tablet " + extent, e);
+        enqueueMasterMessage(new TabletStatusMessage(TabletLoadState.LOAD_FAILURE, extent));
         throw new RuntimeException(e);
       }
 
       if (locationToOpen == null) {
         log.debug("Reporting tablet " + extent + " assignment failure: unable to verify Tablet
Information");
-        enqueueMasterMessage(new TabletStatusMessage(TabletLoadState.LOAD_FAILURE, extent));
         synchronized (openingTablets) {
           openingTablets.remove(extent);
           openingTablets.notifyAll();
         }
-        
+        enqueueMasterMessage(new TabletStatusMessage(TabletLoadState.LOAD_FAILURE, extent));
         return;
       }
 
@@ -2852,7 +2868,7 @@ public class TabletServer extends Abstra
   
   private long totalMinorCompactions;
   
-  private static Text verifyRootTablet(KeyExtent extent, TServerInstance instance) throws
DistributedStoreException, AccumuloException {
+  private static Pair<Text,KeyExtent> verifyRootTablet(KeyExtent extent, TServerInstance
instance) throws DistributedStoreException, AccumuloException {
     ZooTabletStateStore store = new ZooTabletStateStore();
     if (!store.iterator().hasNext()) {
       throw new AccumuloException("Illegal state: location is not set in zookeeper");
@@ -2866,10 +2882,11 @@ public class TabletServer extends Abstra
       throw new AccumuloException("Root tablet already has a location set");
     }
     
-    return new Text(Constants.ZROOT_TABLET);
+    return new Pair<Text,KeyExtent>(new Text(Constants.ZROOT_TABLET), null);
   }
   
-  public static Text verifyTabletInformation(KeyExtent extent, TServerInstance instance,
SortedMap<Key,Value> tabletsKeyValues, String clientAddress,
+  public static Pair<Text,KeyExtent> verifyTabletInformation(KeyExtent extent, TServerInstance
instance, SortedMap<Key,Value> tabletsKeyValues,
+      String clientAddress,
       ZooLock lock) throws AccumuloSecurityException, DistributedStoreException, AccumuloException
{
     
     log.debug("verifying extent " + extent);
@@ -2916,7 +2933,7 @@ public class TabletServer extends Abstra
       KeyExtent fke = MetadataTable.fixSplit(metadataEntry, tabletEntries.get(metadataEntry),
instance, SecurityConstants.getSystemCredentials(), lock);
       
       if (!fke.equals(extent)) {
-        return null;
+        return new Pair<Text,KeyExtent>(null, fke);
       }
       
       // reread and reverify metadata entries now that metadata entries were fixed
@@ -2924,7 +2941,7 @@ public class TabletServer extends Abstra
       return verifyTabletInformation(fke, instance, tabletsKeyValues, clientAddress, lock);
     }
     
-    return new Text(dir.get());
+    return new Pair<Text,KeyExtent>(new Text(dir.get()), null);
   }
   
   static Value checkTabletMetadata(KeyExtent extent, TServerInstance instance, SortedMap<Key,Value>
tabletsKeyValues, Text metadataEntry)

Propchange: accumulo/trunk/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/src:r1470634-1470670,1470672-1470683,1470685-1470704,1470706-1470736

Modified: accumulo/trunk/test/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/resources/log4j.properties?rev=1470737&r1=1470736&r2=1470737&view=diff
==============================================================================
--- accumulo/trunk/test/src/test/resources/log4j.properties (original)
+++ accumulo/trunk/test/src/test/resources/log4j.properties Mon Apr 22 22:21:01 2013
@@ -16,7 +16,7 @@
 log4j.rootLogger=INFO, CA
 log4j.appender.CA=org.apache.log4j.ConsoleAppender
 log4j.appender.CA.layout=org.apache.log4j.PatternLayout
-log4j.appender.CA.layout.ConversionPattern=[%t} %-5p %c %x - %m%n
+log4j.appender.CA.layout.ConversionPattern=%d{ISO8601} [%-8c{2}] %-5p: %m%n
 
 log4j.logger.org.apache.accumulo.core.client.impl.ServerClient=ERROR
 log4j.logger.org.apache.accumulo.core.util.shell.Shell.audit=off



Mime
View raw message