accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1233036 - in /incubator/accumulo/trunk: ./ src/core/ src/server/ src/server/src/main/java/org/apache/accumulo/server/fate/ src/server/src/main/java/org/apache/accumulo/server/master/ src/server/src/main/java/org/apache/accumulo/server/mast...
Date Wed, 18 Jan 2012 20:11:20 GMT
Author: kturner
Date: Wed Jan 18 20:11:19 2012
New Revision: 1233036

URL: http://svn.apache.org/viewvc?rev=1233036&view=rev
Log:
ACCUMULO-317 ACCUMULO-316 merged changes from 1.4

Added:
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/fate/Admin.java
      - copied unchanged from r1233034, incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/fate/Admin.java
Modified:
    incubator/accumulo/trunk/   (props changed)
    incubator/accumulo/trunk/src/core/   (props changed)
    incubator/accumulo/trunk/src/server/   (props changed)
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TablesServlet.java
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/performance/thrift/NullTserver.java

Propchange: incubator/accumulo/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 18 20:11:19 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611,1228195,1230180,1230736,1231043
 /incubator/accumulo/branches/1.3.5rc:1209938
-/incubator/accumulo/branches/1.4:1201902-1232992
+/incubator/accumulo/branches/1.4:1201902-1233034

Propchange: incubator/accumulo/trunk/src/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 18 20:11:19 2012
@@ -1,3 +1,3 @@
 /incubator/accumulo/branches/1.3.5rc/src/core:1209938
 /incubator/accumulo/branches/1.3/src/core:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215
-/incubator/accumulo/branches/1.4/src/core:1201902-1232617
+/incubator/accumulo/branches/1.4/src/core:1201902-1233034

Propchange: incubator/accumulo/trunk/src/server/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 18 20:11:19 2012
@@ -1,3 +1,3 @@
-/incubator/accumulo/branches/1.3/src/server:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611
 /incubator/accumulo/branches/1.3.5rc/src/server:1209938
-/incubator/accumulo/branches/1.4/src/server:1201902-1232992
+/incubator/accumulo/branches/1.3/src/server:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611
+/incubator/accumulo/branches/1.4/src/server:1201902-1233034

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1233036&r1=1233035&r2=1233036&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
Wed Jan 18 20:11:19 2012
@@ -845,7 +845,7 @@ public class Master implements LiveTServ
       }
       for (TServerInstance instance : tserverSet.getCurrentServers()) {
         if (serverName.equals(instance.hostPort())) {
-          nextEvent.event("%s reported split %s, %s", serverName, new KeyExtent(split.newTablets.get(0)),
new KeyExtent(split.newTablets.get(0)));
+          nextEvent.event("%s reported split %s, %s", serverName, new KeyExtent(split.newTablets.get(0)),
new KeyExtent(split.newTablets.get(1)));
           return;
         }
       }
@@ -1654,6 +1654,7 @@ public class Master implements LiveTServ
         BatchDeleter bd = conn.createBatchDeleter(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS,
4, 100000l, 1000l, 4);
         bd.setRanges(Collections.singleton(deleteRange));
         bd.delete();
+        bd.close();
         
         if (followingTablet != null) {
           log.debug("Updating prevRow of " + followingTablet + " to " + range.getPrevEndRow());

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java?rev=1233036&r1=1233035&r2=1233036&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/state/MetaDataTableScanner.java
Wed Jan 18 20:11:19 2012
@@ -80,8 +80,10 @@ public class MetaDataTableScanner implem
   }
   
   public void close() {
-    mdScanner.close();
-    iter = null;
+    if (iter != null) {
+      mdScanner.close();
+      iter = null;
+    }
   }
   
   public void finalize() {
@@ -90,15 +92,27 @@ public class MetaDataTableScanner implem
   
   @Override
   public boolean hasNext() {
+    if (iter == null)
+      return false;
     boolean result = iter.hasNext();
-    if (!result)
-      mdScanner.close();
+    if (!result) {
+      close();
+    }
     return result;
   }
   
   @Override
   public TabletLocationState next() {
-    return fetch();
+    try {
+      return fetch();
+    } catch (RuntimeException ex) {
+      try {
+        close();
+      } catch (Exception e) {
+        log.error(e, e);
+      }
+      throw ex;
+    }
   }
   
   public static TabletLocationState createTabletLocationState(SortedMap<Key,Value>
decodedRow) {

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java?rev=1233036&r1=1233035&r2=1233036&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/master/tableOps/DeleteTable.java
Wed Jan 18 20:11:19 2012
@@ -123,16 +123,20 @@ class CleanUp extends MasterRepo {
       // look for other tables that references this tables files
       Connector conn = instance.getConnector(SecurityConstants.getSystemCredentials());
       BatchScanner bs = conn.createBatchScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS,
8);
-      bs.setRanges(Collections.singleton(Constants.NON_ROOT_METADATA_KEYSPACE));
-      bs.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
-      IteratorSetting cfg = new IteratorSetting(40, "grep", GrepIterator.class);
-      GrepIterator.setTerm(cfg, "../" + tableId + "/");
-      bs.addScanIterator(cfg);
-      
-      for (Entry<Key,Value> entry : bs) {
-        if (entry.getKey().getColumnQualifier().toString().startsWith("../" + tableId + "/"))
{
-          refCount++;
+      try {
+        bs.setRanges(Collections.singleton(Constants.NON_ROOT_METADATA_KEYSPACE));
+        bs.fetchColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY);
+        IteratorSetting cfg = new IteratorSetting(40, "grep", GrepIterator.class);
+        GrepIterator.setTerm(cfg, "../" + tableId + "/");
+        bs.addScanIterator(cfg);
+        
+        for (Entry<Key,Value> entry : bs) {
+          if (entry.getKey().getColumnQualifier().toString().startsWith("../" + tableId +
"/")) {
+            refCount++;
+          }
         }
+      } finally {
+        bs.close();
       }
       
     } catch (Exception e) {

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TablesServlet.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TablesServlet.java?rev=1233036&r1=1233035&r2=1233036&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TablesServlet.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TablesServlet.java
Wed Jan 18 20:11:19 2012
@@ -153,6 +153,7 @@ public class TablesServlet extends Basic
         }
       }
     }
+    scanner.close();
     log.debug("Locs: " + locs);
     
     List<TabletServerStatus> tservers = new ArrayList<TabletServerStatus>();

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/performance/thrift/NullTserver.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/performance/thrift/NullTserver.java?rev=1233036&r1=1233035&r2=1233036&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/performance/thrift/NullTserver.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/test/performance/thrift/NullTserver.java
Wed Jan 18 20:11:19 2012
@@ -215,6 +215,7 @@ public class NullTserver {
       TabletLocationState next = s.next();
       assignments.add(new Assignment(next.extent, instance));
     }
+    s.close();
     // point them to this server
     MetaDataStateStore store = new MetaDataStateStore(null);
     store.setLocations(assignments);



Mime
View raw message