accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject [1/3] git commit: ACCUMULO-1990 - "" no longer has versioning set up by default
Date Mon, 16 Dec 2013 18:00:50 GMT
Updated Branches:
  refs/heads/master 1ee57286f -> 61e48e6b8


ACCUMULO-1990 - "" no longer has versioning set up by default


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/82e2f57a
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/82e2f57a
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/82e2f57a

Branch: refs/heads/master
Commit: 82e2f57abd69e9b78eb10dc6f79d7f1a0e46576f
Parents: 7fc8d83
Author: John Vines <jvines@gmail.com>
Authored: Mon Dec 16 12:03:40 2013 -0500
Committer: John Vines <jvines@gmail.com>
Committed: Mon Dec 16 12:03:40 2013 -0500

----------------------------------------------------------------------
 .../org/apache/accumulo/server/init/Initialize.java  | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/82e2f57a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
index b7f9bdb..a120dbd 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/init/Initialize.java
@@ -21,7 +21,6 @@ import java.io.IOException;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Locale;
-import java.util.Map;
 import java.util.Map.Entry;
 import java.util.UUID;
 
@@ -39,7 +38,6 @@ import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.file.FileOperations;
 import org.apache.accumulo.core.file.FileSKVWriter;
-import org.apache.accumulo.core.iterators.IteratorUtil;
 import org.apache.accumulo.core.iterators.user.VersioningIterator;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.master.thrift.MasterGoalState;
@@ -416,8 +414,8 @@ public class Initialize {
     zoo.putPersistentData(zkInstanceRoot + Constants.ZRECOVERY, new byte[] {'0'}, NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zkInstanceRoot + Constants.ZNAMESPACES, new byte[0], NodeExistsPolicy.FAIL);
     
-    createInitialNamespace(zoo, zkInstanceRoot, Constants.DEFAULT_NAMESPACE_ID, Constants.DEFAULT_NAMESPACE,
true);
-    createInitialNamespace(zoo, zkInstanceRoot, Constants.ACCUMULO_NAMESPACE_ID, Constants.ACCUMULO_NAMESPACE,
false);
+    createInitialNamespace(zoo, zkInstanceRoot, Constants.DEFAULT_NAMESPACE_ID, Constants.DEFAULT_NAMESPACE);
+    createInitialNamespace(zoo, zkInstanceRoot, Constants.ACCUMULO_NAMESPACE_ID, Constants.ACCUMULO_NAMESPACE);
     
     zoo.putPersistentData(zkInstanceRoot + Constants.ZTABLES + "/" + MetadataTable.ID + Constants.ZTABLE_NAMESPACE,
         Constants.ACCUMULO_NAMESPACE_ID.getBytes(Constants.UTF8), NodeExistsPolicy.OVERWRITE);
@@ -425,19 +423,12 @@ public class Initialize {
         Constants.ACCUMULO_NAMESPACE_ID.getBytes(Constants.UTF8), NodeExistsPolicy.OVERWRITE);
   }
   
-  private static void createInitialNamespace(IZooReaderWriter zoo, String root, String id,
String namespace, boolean defaultOpts) throws KeeperException,
+  private static void createInitialNamespace(IZooReaderWriter zoo, String root, String id,
String namespace) throws KeeperException,
       InterruptedException {
     String zPath = root + Constants.ZNAMESPACES + "/" + id;
     zoo.putPersistentData(zPath, new byte[0], NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zPath + Constants.ZNAMESPACE_NAME, namespace.getBytes(Constants.UTF8),
NodeExistsPolicy.FAIL);
     zoo.putPersistentData(zPath + Constants.ZNAMESPACE_CONF, new byte[0], NodeExistsPolicy.FAIL);
-    
-    if (defaultOpts) {
-      Map<String,String> opts = IteratorUtil.generateInitialTableProperties(true);
-      for (Entry<String,String> e : opts.entrySet()) {
-        zoo.putPersistentData(zPath + Constants.ZNAMESPACE_CONF + "/" + e.getKey(), e.getValue().getBytes(Constants.UTF8),
NodeExistsPolicy.SKIP);
-      }
-    }
   }
 
   private static String getInstanceNamePath(Opts opts) throws IOException, KeeperException,
InterruptedException {


Mime
View raw message