incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1207515 - /incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
Date Mon, 28 Nov 2011 19:11:50 GMT
Author: kturner
Date: Mon Nov 28 19:11:49 2011
New Revision: 1207515

URL: http://svn.apache.org/viewvc?rev=1207515&view=rev
Log:
ACCUMULO-169 remove deprecated table props during upgrade from 1.3 to 1.4

Modified:
    incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java

Modified: incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1207515&r1=1207514&r2=1207515&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
(original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
Mon Nov 28 19:11:49 2011
@@ -334,9 +334,17 @@ public class Master implements LiveTServ
         zoo.putPersistentData(ZooUtil.getRoot(instance) + Constants.ZHDFS_RESERVATIONS, new
byte[0], NodeExistsPolicy.SKIP);
         zoo.putPersistentData(ZooUtil.getRoot(instance) + Constants.ZNEXT_FILE, new byte[]
{'0'}, NodeExistsPolicy.SKIP);
 
+        String[] tablePropsToDelete = new String[] {"table.scan.cache.size", "table.scan.cache.enable"};
+
         for (String id : Tables.getIdToNameMap(instance).keySet()) {
           zoo.putPersistentData(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + id
+ Constants.ZTABLE_FLUSH_ID, "0".getBytes(), NodeExistsPolicy.SKIP);
           zoo.putPersistentData(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + id
+ Constants.ZTABLE_COMPACT_ID, "0".getBytes(), NodeExistsPolicy.SKIP);
+          
+          for (String prop : tablePropsToDelete) {
+            String propPath = ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + id +
Constants.ZTABLE_CONF + "/" + prop;
+            if (zoo.exists(propPath))
+              zoo.delete(propPath, -1);
+          }
         }
         
         setACLs(zoo, ZooUtil.getRoot(instance), ZooUtil.getRoot(instance) + Constants.ZUSERS);



Mime
View raw message