accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1468531 - /accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java
Date Tue, 16 Apr 2013 17:56:54 GMT
Author: ecn
Date: Tue Apr 16 17:56:53 2013
New Revision: 1468531

URL: http://svn.apache.org/r1468531
Log:
ACCUMULO-1281 flush and compact the !METADATA table after a gc cycle

Modified:
    accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java

Modified: accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java?rev=1468531&r1=1468530&r2=1468531&view=diff
==============================================================================
--- accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java
(original)
+++ accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/gc/SimpleGarbageCollector.java
Tue Apr 16 17:56:53 2013
@@ -301,6 +301,15 @@ public class SimpleGarbageCollector impl
       waLogs.stop();
       gcSpan.stop();
       
+      // we just made a lot of changes to the !METADATA table: flush them out
+      try {
+        AuthInfo creds = SecurityConstants.getSystemCredentials();
+        Connector connector = instance.getConnector(creds.getUser(), creds.getPassword());
+        connector.tableOperations().compact(Constants.METADATA_TABLE_NAME, null, null, true,
true);
+      } catch (Exception e) {
+        log.warn(e, e);
+      }
+      
       Trace.offNoFlush();
       try {
         long gcDelay = ServerConfiguration.getSystemConfiguration().getTimeInMillis(Property.GC_CYCLE_DELAY);



Mime
View raw message