[47/50] [abbrv] git commit: ACCUMULO-1859 update namepace config w/ new getPropertiesMethod

2013-12-04 Thread ctubbsii
ACCUMULO-1859 update namepace config w/ new getPropertiesMethod


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

Branch: refs/heads/master
Commit: 5b791b166b9190285bfb3ba3d45c3de0dbb93af1
Parents: 725d821
Author: Keith Turner ktur...@apache.org
Authored: Thu Nov 14 14:20:33 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:11 2013 -0500

--
 .../conf/TableNamespaceConfiguration.java   | 76 +++-
 1 file changed, 43 insertions(+), 33 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5b791b16/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
 
b/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
index b4e9598..74621a3 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
@@ -19,11 +19,9 @@ package org.apache.accumulo.server.conf;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
-import java.util.Map.Entry;
+import java.util.Map;
 import java.util.Set;
-import java.util.TreeMap;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Instance;
@@ -54,19 +52,20 @@ public class TableNamespaceConfiguration extends 
AccumuloConfiguration {
   @Override
   public String get(Property property) {
 String key = property.getKey();
-String value = get(key);
+String value = get(getPropCache(), key);
 
 if (value == null || !property.getType().isValidFormat(value)) {
   if (value != null)
 log.error(Using default value for  + key +  due to improperly 
formatted  + property.getType() + :  + value);
-  value = parent.get(property);
+  if (!isIterConst(property.getKey()))
+value = parent.get(property);
 }
 return value;
   }
 
-  private String get(String key) {
+  private String get(ZooCache zc, String key) {
 String zPath = ZooUtil.getRoot(inst.getInstanceID()) + 
Constants.ZNAMESPACES + / + getNamespaceId() + Constants.ZNAMESPACE_CONF + 
/ + key;
-byte[] v = getPropCache().get(zPath);
+byte[] v = zc.get(zPath);
 String value = null;
 if (v != null)
   value = new String(v, Constants.UTF8);
@@ -83,33 +82,47 @@ public class TableNamespaceConfiguration extends 
AccumuloConfiguration {
 return propCache;
   }
 
-  @Override
-  public IteratorEntryString,String iterator() {
-TreeMapString,String entries = new TreeMapString,String();
-
-for (EntryString,String parentEntry : parent) {
-  if (this.namespaceId.equals(Constants.SYSTEM_TABLE_NAMESPACE_ID)) {
-// exclude system iterators/constraints from the system namespace
-// so they don't affect the metadata or root tables.
-if (!isIterConst(parentEntry)) {
-  entries.put(parentEntry.getKey(), parentEntry.getValue());
-}
-  } else {
-entries.put(parentEntry.getKey(), parentEntry.getValue());
-  }
+  private class SystemNamespaceFilter implements PropertyFilter {
+
+private PropertyFilter userFilter;
+
+SystemNamespaceFilter(PropertyFilter userFilter) {
+  this.userFilter = userFilter;
 }
 
-ListString children = getPropCache().getChildren(
-ZooUtil.getRoot(inst.getInstanceID()) + Constants.ZNAMESPACES + / + 
getNamespaceId() + Constants.ZNAMESPACE_CONF);
+@Override
+public boolean accept(String key) {
+  if (isIterConst(key))
+return false;
+  return userFilter.accept(key);
+}
+
+  }
+
+  @Override
+  public void getProperties(MapString,String props, PropertyFilter filter) {
+
+PropertyFilter parentFilter = filter;
+
+// exclude system iterators/constraints from the system namespace
+// so they don't affect the metadata or root tables.
+if (this.namespaceId.equals(Constants.SYSTEM_TABLE_NAMESPACE_ID))
+  parentFilter = new SystemNamespaceFilter(filter);
+
+parent.getProperties(props, parentFilter);
+
+ZooCache zc = getPropCache();
+
+ListString children = 
zc.getChildren(ZooUtil.getRoot(inst.getInstanceID()) + Constants.ZNAMESPACES + 
/ + getNamespaceId() + Constants.ZNAMESPACE_CONF);
 if (children != null) {
   for (String child : children) {
-String value = get(child);
-if 

[08/50] [abbrv] git commit: ACCUMULO-1479 implemented most of Table Namespace Permissions, doesnt entirely work, not well tested

2013-12-04 Thread ctubbsii
ACCUMULO-1479 implemented most of Table Namespace Permissions, doesnt entirely 
work, not well tested


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

Branch: refs/heads/master
Commit: dfdf5113837d79ef9f21a5a64de0a3750611b5c8
Parents: 45f59ca
Author: Sean Hickey tallirishll...@gmail.com
Authored: Thu Aug 1 14:16:19 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:10 2013 -0500

--
 .../core/client/admin/SecurityOperations.java   |   50 +
 .../client/admin/SecurityOperationsImpl.java|   36 +
 .../core/client/impl/thrift/ClientService.java  | 5009 --
 .../client/impl/thrift/SecurityErrorCode.java   |5 +-
 .../accumulo/core/client/mock/MockAccumulo.java |3 +-
 .../client/mock/MockSecurityOperations.java |   39 +
 .../core/client/mock/MockTableNamespace.java|4 +-
 .../core/client/security/SecurityErrorCode.java |3 +-
 .../core/security/SystemPermission.java |5 +-
 .../core/security/TableNamespacePermission.java |   67 +
 .../core/util/shell/commands/GrantCommand.java  |   19 +-
 .../core/util/shell/commands/RevokeCommand.java |   19 +-
 .../shell/commands/UserPermissionsCommand.java  |   20 +-
 core/src/main/thrift/client.thrift  |   12 +-
 .../server/client/ClientServiceHandler.java |   22 +
 .../server/security/SecurityOperation.java  |  191 +-
 .../security/handler/InsecurePermHandler.java   |   31 +
 .../security/handler/PermissionHandler.java |   28 +
 .../server/security/handler/ZKPermHandler.java  |  127 +
 .../server/security/handler/ZKSecurityTool.java |   21 +
 .../randomwalk/security/WalkingSecurity.java|   51 +
 .../apache/accumulo/test/TableNamespacesIT.java |   37 +-
 22 files changed, 5301 insertions(+), 498 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/dfdf5113/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java
index 86a3ff2..8a93efa 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java
@@ -24,6 +24,7 @@ import 
org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.SystemPermission;
+import org.apache.accumulo.core.security.TableNamespacePermission;
 import org.apache.accumulo.core.security.TablePermission;
 
 /**
@@ -216,6 +217,23 @@ public interface SecurityOperations {
   public boolean hasTablePermission(String principal, String table, 
TablePermission perm) throws AccumuloException, AccumuloSecurityException;
   
   /**
+   * Verify the user has a particular table namespace permission
+   * 
+   * @param principal
+   *  the name of the user to query
+   * @param tableNamespace
+   *  the name of the table namespace to query about
+   * @param perm
+   *  the table namespace permission to check for
+   * @return true if user has that permission; false otherwise
+   * @throws AccumuloException
+   *   if a general error occurs
+   * @throws AccumuloSecurityException
+   *   if the user does not have permission to query a user
+   */
+  public boolean hasTableNamespacePermission(String principal, String 
tableNamespace, TableNamespacePermission perm) throws AccumuloException, 
AccumuloSecurityException;
+  
+  /**
* Grant a user a system permission
* 
* @param principal
@@ -246,6 +264,22 @@ public interface SecurityOperations {
   public void grantTablePermission(String principal, String table, 
TablePermission permission) throws AccumuloException, AccumuloSecurityException;
   
   /**
+   * Grant a user a specific permission for a specific table namespace
+   * 
+   * @param principal
+   *  the name of the user to modify
+   * @param tableNamespace
+   *  the name of the table namespace to modify for the user
+   * @param permission
+   *  the table namespace permission to grant to the user
+   * @throws AccumuloException
+   *   if a general error occurs
+   * @throws AccumuloSecurityException
+   *   if the user does not have permission to grant a user permissions
+   */
+  public void 

[15/50] [abbrv] git commit: ACCUMULO-802 minor fixes of variables that got clobbered in rebase

2013-12-04 Thread ctubbsii
ACCUMULO-802 minor fixes of variables that got clobbered in rebase


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

Branch: refs/heads/master
Commit: 5bcd3d2966f321847085bc1d62fe39e2e7234609
Parents: 02374a0
Author: Sean Hickey tallirishll...@gmail.com
Authored: Thu Aug 8 15:05:16 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:10 2013 -0500

--
 .../src/test/java/org/apache/accumulo/test/ShellServerIT.java | 2 +-
 .../test/java/org/apache/accumulo/test/TableNamespacesIT.java | 7 +--
 2 files changed, 2 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5bcd3d29/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
--
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java 
b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
index 792ba3e..e60e414 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
@@ -719,7 +719,7 @@ public class ShellServerIT extends SimpleMacIT {
   @Test(timeout = 30 * 1000)
   public void systempermission() throws Exception {
 exec(systempermissions);
-assertEquals(8, output.get().split(\n).length - 1);
+assertEquals(11, output.get().split(\n).length - 1);
 exec(tablepermissions, true);
 assertEquals(6, output.get().split(\n).length - 1);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5bcd3d29/test/src/test/java/org/apache/accumulo/test/TableNamespacesIT.java
--
diff --git a/test/src/test/java/org/apache/accumulo/test/TableNamespacesIT.java 
b/test/src/test/java/org/apache/accumulo/test/TableNamespacesIT.java
index 1a52f72..38955e3 100644
--- a/test/src/test/java/org/apache/accumulo/test/TableNamespacesIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/TableNamespacesIT.java
@@ -395,8 +395,6 @@ public class TableNamespacesIT {
   }
   
   /**
- HEAD
- HEAD
* Tests that when a table moves to a new namespace that it's properties 
inherit from the new namespace and not the old one
*/
   @Test
@@ -435,11 +433,8 @@ public class TableNamespacesIT {
 assertTrue(!hasProp);
   }
   /**
-   *  Tests new Namespace permissions as well as modifications to Table 
permissions because of namespaces 
-===
* Tests new Namespace permissions as well as modifications to Table 
permissions because of namespaces. Checks each permission to first make sure 
the user
* doesn't have permission to perform the action, then root grants them the 
permission and we check to make sure they could perform the action.
- ACCUMULO-1479 finished initial implementation of table namespace 
permissions, including tests
*/
   @Test
   public void testPermissions() throws Exception {
@@ -447,7 +442,7 @@ public class TableNamespacesIT {
 
 PasswordToken pass = new PasswordToken(secret);
 
-String n1 = namespace1;
+String n1 = spaceOfTheName;
 
 String user1 = dude;
 



[50/50] [abbrv] git commit: Merge branch '1.6.0-SNAPSHOT'

2013-12-04 Thread ctubbsii
Merge branch '1.6.0-SNAPSHOT'


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

Branch: refs/heads/master
Commit: 7b8922c70d0b30d0030052bcdd7db63ab57ccd02
Parents: c29df8e 859cf20
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Dec 4 18:58:09 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:58:09 2013 -0500

--
 .../org/apache/accumulo/core/Constants.java |62 +-
 .../apache/accumulo/core/client/Connector.java  |40 +-
 .../core/client/NamespaceExistsException.java   |67 +
 .../core/client/NamespaceNotEmptyException.java |74 +
 .../core/client/NamespaceNotFoundException.java |77 +
 .../core/client/admin/NamespaceOperations.java  |   370 +
 .../client/admin/NamespaceOperationsHelper.java |   203 +
 .../client/admin/NamespaceOperationsImpl.java   |   347 +
 .../core/client/admin/SecurityOperations.java   |88 +-
 .../client/admin/SecurityOperationsImpl.java|83 +-
 .../core/client/admin/TableOperations.java  |   107 +-
 .../core/client/admin/TableOperationsImpl.java  |   450 +-
 .../core/client/impl/ConnectorImpl.java |10 +
 .../accumulo/core/client/impl/Namespaces.java   |   107 +
 .../accumulo/core/client/impl/Tables.java   |   112 +-
 .../client/impl/TabletServerBatchWriter.java| 2 +-
 .../core/client/impl/thrift/ClientService.java  |  9196 +++--
 .../client/impl/thrift/SecurityErrorCode.java   | 5 +-
 .../accumulo/core/client/mock/MockAccumulo.java |53 +-
 .../core/client/mock/MockConnector.java | 6 +
 .../core/client/mock/MockNamespace.java |54 +
 .../client/mock/MockNamespaceOperations.java|   130 +
 .../client/mock/MockSecurityOperations.java |83 +-
 .../accumulo/core/client/mock/MockTable.java|36 +-
 .../core/client/mock/MockTableOperations.java   |   133 +-
 .../core/client/security/SecurityErrorCode.java | 3 +-
 .../core/master/thrift/MasterClientService.java | 11700 ++---
 .../accumulo/core/metadata/MetadataTable.java   | 9 +-
 .../accumulo/core/metadata/RootTable.java   |15 +-
 .../core/security/NamespacePermission.java  |66 +
 .../core/security/SystemPermission.java | 5 +-
 .../org/apache/accumulo/core/util/Merge.java| 2 +-
 .../org/apache/accumulo/core/util/Pair.java |57 +-
 .../apache/accumulo/core/util/shell/Shell.java  |   340 +-
 .../core/util/shell/ShellCompletor.java |58 +-
 .../accumulo/core/util/shell/ShellOptions.java  | 3 +-
 .../core/util/shell/commands/ConfigCommand.java |   113 +-
 .../util/shell/commands/ConstraintCommand.java  |84 +-
 .../shell/commands/CreateNamespaceCommand.java  |   108 +
 .../util/shell/commands/CreateTableCommand.java |69 +-
 .../core/util/shell/commands/DUCommand.java |37 +-
 .../util/shell/commands/DeleteIterCommand.java  |61 +-
 .../shell/commands/DeleteNamespaceCommand.java  |   100 +
 .../util/shell/commands/DeleteTableCommand.java |12 +-
 .../core/util/shell/commands/GrantCommand.java  |47 +-
 .../util/shell/commands/ListIterCommand.java|59 +-
 .../commands/NamespacePermissionsCommand.java   |44 +
 .../util/shell/commands/NamespacesCommand.java  |83 +
 .../core/util/shell/commands/OptUtil.java   |56 +-
 .../shell/commands/RenameNamespaceCommand.java  |79 +
 .../util/shell/commands/RenameTableCommand.java |17 +-
 .../core/util/shell/commands/RevokeCommand.java |45 +-
 .../util/shell/commands/SetIterCommand.java |   149 +-
 .../util/shell/commands/TableOperation.java |56 +-
 .../core/util/shell/commands/TablesCommand.java |88 +-
 .../shell/commands/UserPermissionsCommand.java  |34 +-
 core/src/main/thrift/client.thrift  |12 +-
 core/src/main/thrift/master.thrift  |12 +-
 .../core/client/impl/TabletLocatorImplTest.java |10 +-
 .../core/client/mock/MockNamespacesTest.java|   315 +
 .../accumulo/core/util/shell/ShellTest.java |54 +-
 .../chapters/administration.tex | 2 +-
 .../accumulo_user_manual/chapters/shell.tex | 8 +-
 .../chapters/table_configuration.tex| 2 +-
 .../chapters/troubleshooting.tex|30 +-
 .../apache/accumulo/proxy/SimpleProxyIT.java| 2 +-
 .../apache/accumulo/server/ServerConstants.java | 9 +-
 .../server/client/ClientServiceHandler.java |   170 +-
 .../server/conf/NamespaceConfWatcher.java   |   107 +
 .../server/conf/NamespaceConfiguration.java |   174 +
 .../server/conf/ServerConfiguration.java|75 +-
 .../server/conf/TableConfiguration.java |46 +-
 

[42/50] [abbrv] ACCUMULO-1906 Remove ops on tables in a namespace

2013-12-04 Thread ctubbsii
http://git-wip-us.apache.org/repos/asf/accumulo/blob/3c920943/test/src/test/java/org/apache/accumulo/test/functional/RestartIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/functional/RestartIT.java 
b/test/src/test/java/org/apache/accumulo/test/functional/RestartIT.java
index 37ad947..9fe2841 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/RestartIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/RestartIT.java
@@ -58,14 +58,13 @@ public class RestartIT extends ConfigurableMacIT {
   static {
 OPTS.rows = VOPTS.rows = 10 * 1000;
   }
-  
+
   @Test(timeout = 2 * 60 * 1000)
   public void restartMaster() throws Exception {
 Connector c = getConnector();
 c.tableOperations().create(test_ingest);
-Process ingest = cluster.exec(TestIngest.class, 
--u, root, -p, ROOT_PASSWORD, 
--i, cluster.getInstanceName(), -z, cluster.getZooKeepers(), 
--rows, +OPTS.rows);
+Process ingest = cluster.exec(TestIngest.class, -u, root, -p, 
ROOT_PASSWORD, -i, cluster.getInstanceName(), -z, cluster.getZooKeepers(),
+--rows,  + OPTS.rows);
 for (ProcessReference master : 
cluster.getProcesses().get(ServerType.MASTER)) {
   cluster.killProcess(ServerType.MASTER, master);
 }
@@ -74,7 +73,7 @@ public class RestartIT extends ConfigurableMacIT {
 VerifyIngest.verifyIngest(c, VOPTS, SOPTS);
 ingest.destroy();
   }
-  
+
   @Test(timeout = 8 * 60 * 1000)
   public void restartMasterRecovery() throws Exception {
 Connector c = getConnector();
@@ -99,9 +98,8 @@ public class RestartIT extends ConfigurableMacIT {
 Connector c = getConnector();
 c.tableOperations().create(test_ingest);
 c.tableOperations().setProperty(test_ingest, 
Property.TABLE_SPLIT_THRESHOLD.getKey(), 5K);
-Process ingest = cluster.exec(TestIngest.class, 
--u, root, -p, ROOT_PASSWORD, 
--i, cluster.getInstanceName(), -z, cluster.getZooKeepers(), 
--rows, +VOPTS.rows);
+Process ingest = cluster.exec(TestIngest.class, -u, root, -p, 
ROOT_PASSWORD, -i, cluster.getInstanceName(), -z, cluster.getZooKeepers(),
+--rows,  + VOPTS.rows);
 for (ProcessReference master : 
cluster.getProcesses().get(ServerType.MASTER)) {
   cluster.killProcess(ServerType.MASTER, master);
 }
@@ -110,7 +108,7 @@ public class RestartIT extends ConfigurableMacIT {
 VerifyIngest.verifyIngest(c, VOPTS, SOPTS);
 ingest.destroy();
   }
-  
+
   @Test(timeout = 10 * 60 * 1000)
   public void killedTabletServer() throws Exception {
 Connector c = getConnector();
@@ -150,7 +148,7 @@ public class RestartIT extends ConfigurableMacIT {
 assertEquals(0, cluster.exec(Admin.class, stopAll).waitFor());
   }
 
-  @Test(timeout = 2 * 60 * 1000)
+  @Test(timeout = 10 * 60 * 1000)
   public void shutdownDuringCompactingSplitting() throws Exception {
 Connector c = getConnector();
 c.tableOperations().create(test_ingest);



[49/50] [abbrv] git commit: ACCUMULO-802 fix more issues from ReviewBoard

2013-12-04 Thread ctubbsii
ACCUMULO-802 fix more issues from ReviewBoard


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

Branch: refs/heads/master
Commit: 859cf2087c2506f60178efff1e08d8ad91af3d2d
Parents: 8b54ced
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Dec 4 18:45:51 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:47:21 2013 -0500

--
 .../core/client/admin/NamespaceOperations.java  |  5 -
 .../client/admin/NamespaceOperationsImpl.java   |  8 +++-
 .../core/client/admin/TableOperationsImpl.java  |  8 +---
 .../accumulo/core/client/impl/Tables.java   | 21 +---
 .../shell/commands/CreateNamespaceCommand.java  |  3 ---
 .../randomwalk/concurrent/RenameNamespace.java  |  2 +-
 6 files changed, 23 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/859cf208/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
index 4ee670c..535287d 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
@@ -32,6 +32,9 @@ import 
org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
 /**
  * Provides an API for administering namespaces
  * 
+ * All tables exist in a namespace. The default namespace has no name, and is 
used if an explicit namespace is not specified. Fully qualified table names look
+ * like namespaceName.tableName. Tables in the default namespace are fully 
qualified simply as tableName.
+ * 
  * @since 1.6.0
  */
 public interface NamespaceOperations {
@@ -63,7 +66,7 @@ public interface NamespaceOperations {
   public boolean exists(String namespace) throws AccumuloException, 
AccumuloSecurityException;
 
   /**
-   * Create an empty namespace with no initial configuration
+   * Create an empty namespace with no initial configuration. Valid names for 
a namespace contain letters, numbers, and the underscore character.
* 
* @param namespace
*  the name of the namespace

http://git-wip-us.apache.org/repos/asf/accumulo/blob/859cf208/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperationsImpl.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperationsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperationsImpl.java
index 1ddcaf7..e5e18dc 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperationsImpl.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperationsImpl.java
@@ -98,9 +98,8 @@ public class NamespaceOperationsImpl extends 
NamespaceOperationsHelper {
 
 try {
   doNamespaceOperation(TableOperation.CREATE, 
Arrays.asList(ByteBuffer.wrap(namespace.getBytes())), 
Collections.String,String emptyMap());
-} catch (NamespaceNotFoundException e1) {
-  // should not happen
-  throw new RuntimeException(e1);
+} catch (NamespaceNotFoundException e) {
+  throw new AssertionError(Shouldn't happen:  + e.getMessage());
 }
   }
 
@@ -235,8 +234,7 @@ public class NamespaceOperationsImpl extends 
NamespaceOperationsHelper {
 try {
   doNamespaceOperation(TableOperation.DELETE, args, opts);
 } catch (NamespaceExistsException e) {
-  // should not happen
-  throw new RuntimeException(e);
+  throw new AssertionError(Shouldn't happen:  + e.getMessage());
 }
 
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/859cf208/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
index 7f79fcd..ef2bd09 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
@@ -1506,13 +1506,7 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
   Logger.getLogger(this.getClass()).warn(Failed to check if imported 
table references external java classes :  + 

[19/50] [abbrv] git commit: ACCUMULO-802 removed default initial properties from system namespace, plus minor documentation fixes

2013-12-04 Thread ctubbsii
ACCUMULO-802 removed default initial properties from system namespace, plus 
minor documentation fixes


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

Branch: refs/heads/master
Commit: 5262bd501d1ba1a2bbb71009080fd1847e151f41
Parents: d10feb7
Author: Sean Hickey tallirishll...@gmail.com
Authored: Mon Aug 12 09:37:42 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:10 2013 -0500

--
 .../client/TableNamespaceNotEmptyException.java| 15 ++-
 .../client/TableNamespaceNotFoundException.java|  2 +-
 .../client/admin/TableNamespaceOperations.java | 17 ++---
 .../client/admin/TableNamespaceOperationsImpl.java | 11 +++
 .../apache/accumulo/server/init/Initialize.java| 16 +---
 .../java/org/apache/accumulo/master/Master.java|  4 +---
 6 files changed, 34 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5262bd50/core/src/main/java/org/apache/accumulo/core/client/TableNamespaceNotEmptyException.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/TableNamespaceNotEmptyException.java
 
b/core/src/main/java/org/apache/accumulo/core/client/TableNamespaceNotEmptyException.java
index 81ef03a..e333693 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/TableNamespaceNotEmptyException.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/TableNamespaceNotEmptyException.java
@@ -22,19 +22,16 @@ import 
org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException
  * Thrown when the table namespace specified contains tables
  */
 public class TableNamespaceNotEmptyException extends Exception {
-  /**
-   * Exception to throw if an operation is attempted on a table that doesn't 
exist.
-   * 
-   */
+
   private static final long serialVersionUID = 1L;
   
   private String namespace;
   
   /**
* @param namespaceId
-   *  the internal id of the table namespace that was sought
+   *  the internal id of the table namespace
* @param namespaceName
-   *  the visible name of the table namespace that was sought
+   *  the visible name of the table namespace
* @param description
*  the specific reason why it failed
*/
@@ -46,9 +43,9 @@ public class TableNamespaceNotEmptyException extends 
Exception {
   
   /**
* @param namespaceId
-   *  the internal id of the table namespace that was sought
+   *  the internal id of the table namespace
* @param namespaceName
-   *  the visible name of the table namespace that was sought
+   *  the visible name of the table namespace
* @param description
*  the specific reason why it failed
* @param cause
@@ -68,7 +65,7 @@ public class TableNamespaceNotEmptyException extends 
Exception {
   }
   
   /**
-   * @return the name of the table namespace sought
+   * @return the name of the table namespace
*/
   public String getNamespaceName() {
 return namespace;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5262bd50/core/src/main/java/org/apache/accumulo/core/client/TableNamespaceNotFoundException.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/TableNamespaceNotFoundException.java
 
b/core/src/main/java/org/apache/accumulo/core/client/TableNamespaceNotFoundException.java
index 3dd0740..30e63c3 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/TableNamespaceNotFoundException.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/TableNamespaceNotFoundException.java
@@ -23,7 +23,7 @@ import 
org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException
  */
 public class TableNamespaceNotFoundException extends Exception {
   /**
-   * Exception to throw if an operation is attempted on a table that doesn't 
exist.
+   * Exception to throw if an operation is attempted on a table namespace that 
doesn't exist.
* 
*/
   private static final long serialVersionUID = 1L;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5262bd50/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperations.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperations.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperations.java
index 33f9dc0..136f79b 100644
--- 

[03/50] [abbrv] git commit: ACCUMULO-802 updated more shell commands to include the tableNamespaces option

2013-12-04 Thread ctubbsii
ACCUMULO-802 updated more shell commands to include the tableNamespaces option


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

Branch: refs/heads/master
Commit: 5acd6a480a93b1c13639db8e8ba64a81c32651bb
Parents: 431f4e2
Author: Sean Hickey tallirishll...@gmail.com
Authored: Tue Aug 6 08:54:05 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:09 2013 -0500

--
 .../client/admin/TableNamespaceOperations.java  |9 +
 .../admin/TableNamespaceOperationsImpl.java |   46 +
 .../core/client/admin/TableOperationsImpl.java  |  411 ++---
 .../core/client/impl/thrift/ClientService.java  | 1431 ++
 .../mock/MockTableNamespaceOperations.java  |   17 +-
 .../util/shell/commands/ConstraintCommand.java  |   18 +-
 .../util/shell/commands/DeleteIterCommand.java  |   37 +-
 .../util/shell/commands/ListIterCommand.java|   32 +-
 .../core/util/shell/commands/OptUtil.java   |   25 +
 .../util/shell/commands/SetIterCommand.java |   98 +-
 .../core/util/shell/commands/TablesCommand.java |8 +-
 core/src/main/thrift/client.thrift  |1 +
 .../server/client/ClientServiceHandler.java |   46 +
 .../server/conf/TableNamespaceConfWatcher.java  |  107 ++
 .../server/conf/TableNamespaceConfWatcher.java  |  107 --
 .../org/apache/accumulo/test/ShellServerIT.java |4 +
 16 files changed, 2048 insertions(+), 349 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5acd6a48/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperations.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperations.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperations.java
index f572104..314d007 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperations.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperations.java
@@ -414,4 +414,13 @@ public interface TableNamespaceOperations {
*   thrown if the table namespace no longer exists
*/
   public MapString,Integer listConstraints(String tableNamespace) throws 
AccumuloException, TableNamespaceNotFoundException;
+
+  
+  /**
+   * Test to see if the instance can load the given class as the given type. 
This check uses the table classpath property if it is set.
+   * 
+   * @return true if the instance can load the given class as the given type, 
false otherwise
+   */
+  boolean testClassLoad(String namespace, String className, String asTypeName) 
throws TableNamespaceNotFoundException, AccumuloException,
+  AccumuloSecurityException;
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5acd6a48/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
index 0d54b51..90d59af 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
@@ -19,6 +19,7 @@ package org.apache.accumulo.core.client.admin;
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -34,6 +35,7 @@ import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Instance;
+import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.TableExistsException;
 import org.apache.accumulo.core.client.TableNamespaceExistsException;
 import org.apache.accumulo.core.client.TableNamespaceNotEmptyException;
@@ -49,7 +51,10 @@ import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.client.impl.thrift.ClientService;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import 
org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
+import org.apache.accumulo.core.constraints.Constraint;
 import org.apache.accumulo.core.iterators.IteratorUtil;
+import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;

[44/50] [abbrv] git commit: ACCUMULO-1907 Prevent rename across namespace

2013-12-04 Thread ctubbsii
ACCUMULO-1907 Prevent rename across namespace

  Moving between namespaces is restricted to clone, followed by a
  deleted, which has more predictable behavior.


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

Branch: refs/heads/master
Commit: cd6e1852b51d023718066d4e34c07dce4cf5b483
Parents: 3c92094
Author: Christopher Tubbs ctubb...@apache.org
Authored: Tue Nov 26 20:00:02 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:11 2013 -0500

--
 .../core/client/admin/TableOperationsImpl.java  |   2 +-
 .../accumulo/master/tableOps/RenameTable.java   |  25 +--
 .../org/apache/accumulo/test/NamespacesIT.java  | 166 ---
 3 files changed, 77 insertions(+), 116 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/cd6e1852/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
index c398e6e..b21aa31 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
@@ -779,7 +779,7 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
   throw new IllegalArgumentException(new NamespaceNotFoundException(null, 
namespace, info));
 }
 
-ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(oldTableName.getBytes()), 
ByteBuffer.wrap(newTableName.getBytes()));
+ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(oldTableName.getBytes(Constants.UTF8)), 
ByteBuffer.wrap(newTableName.getBytes(Constants.UTF8)));
 MapString,String opts = new HashMapString,String();
 doTableOperation(TableOperation.RENAME, args, opts);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/cd6e1852/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java
--
diff --git 
a/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java
 
b/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java
index a0ddb8d..9fa736d 100644
--- 
a/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java
+++ 
b/server/master/src/main/java/org/apache/accumulo/master/tableOps/RenameTable.java
@@ -30,7 +30,6 @@ import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.fate.zookeeper.IZooReaderWriter.Mutator;
 import org.apache.accumulo.master.Master;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.tables.TableManager;
 import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.log4j.Logger;
 
@@ -40,14 +39,11 @@ public class RenameTable extends MasterRepo {
   private String tableId;
   private String oldTableName;
   private String newTableName;
-  private String oldNamespaceId;
-  private String newNamespaceId;
+  private String namespaceId;
 
   @Override
   public long isReady(long tid, Master environment) throws Exception {
-return Utils.reserveNamespace(oldNamespaceId, tid, false, true, 
TableOperation.RENAME)
-+ Utils.reserveNamespace(newNamespaceId, tid, false, true, 
TableOperation.RENAME)
-+ Utils.reserveTable(tableId, tid, true, true, TableOperation.RENAME);
+return Utils.reserveNamespace(namespaceId, tid, false, true, 
TableOperation.RENAME) + Utils.reserveTable(tableId, tid, true, true, 
TableOperation.RENAME);
   }
 
   public RenameTable(String tableId, String oldTableName, String newTableName) 
throws NamespaceNotFoundException {
@@ -55,19 +51,16 @@ public class RenameTable extends MasterRepo {
 this.oldTableName = oldTableName;
 this.newTableName = newTableName;
 Instance inst = HdfsZooInstance.getInstance();
-this.oldNamespaceId = Tables.getNamespace(inst, tableId);
-this.newNamespaceId = Namespaces.getNamespaceId(inst, 
Tables.extractNamespace(newTableName));
+this.namespaceId = Tables.getNamespace(inst, tableId);
   }
 
   @Override
   public RepoMaster call(long tid, Master master) throws Exception {
 
 Instance instance = master.getInstance();
-
-if (!newNamespaceId.equals(oldNamespaceId)) {
-  TableManager tm = TableManager.getInstance();
-  tm.addNamespaceToTable(tableId, newNamespaceId);
-}
+// ensure no attempt is made to rename across namespaces
+if 

[21/50] [abbrv] git commit: ACCUMULO-802 fixed deadlock problem with the table namespace locks during fate operations

2013-12-04 Thread ctubbsii
ACCUMULO-802 fixed deadlock problem with the table namespace locks during fate 
operations


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

Branch: refs/heads/master
Commit: c2ed43e4b58cc2278b9955fc36ad9ba788a171c2
Parents: e1cf746
Author: Sean Hickey tallirishll...@gmail.com
Authored: Tue Aug 13 15:10:51 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:10 2013 -0500

--
 .../java/org/apache/accumulo/master/Master.java   | 13 +
 .../accumulo/master/tableOps/CloneTable.java  | 18 ++
 .../accumulo/master/tableOps/CreateTable.java |  5 +++--
 .../accumulo/master/tableOps/DeleteTable.java | 10 ++
 .../accumulo/master/tableOps/RenameTable.java | 10 +-
 .../test/randomwalk/concurrent/Setup.java |  2 +-
 .../system/randomwalk/conf/modules/Concurrent.xml |  2 +-
 7 files changed, 35 insertions(+), 25 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c2ed43e4/server/master/src/main/java/org/apache/accumulo/master/Master.java
--
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java 
b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index 0af32d4..338550a 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -42,6 +42,7 @@ import org.apache.accumulo.core.client.IsolatedScanner;
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.client.RowIterator;
 import org.apache.accumulo.core.client.Scanner;
+import org.apache.accumulo.core.client.TableNamespaceNotFoundException;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.admin.TableOperationsImpl;
 import org.apache.accumulo.core.client.admin.TimeType;
@@ -927,7 +928,11 @@ public class Master implements LiveTServerSet.Listener, 
TableObserver, CurrentSt
 
   TimeType timeType = 
TimeType.valueOf(ByteBufferUtil.toString(arguments.get(1)));
 
-  fate.seedTransaction(opid, new TraceRepoMaster(new 
CreateTable(c.getPrincipal(), tableName, timeType, options)), autoCleanup);
+  try {
+fate.seedTransaction(opid, new TraceRepoMaster(new 
CreateTable(c.getPrincipal(), tableName, timeType, options, getInstance())), 
autoCleanup);
+  } catch (TableNamespaceNotFoundException e) {
+throw new ThriftTableOperationException(null, tableName, 
TableOperation.CREATE, TableOperationExceptionType.NOTFOUND, e.getMessage());
+  }
   break;
 }
 case RENAME: {
@@ -941,7 +946,7 @@ public class Master implements LiveTServerSet.Listener, 
TableObserver, CurrentSt
   if (!security.canRenameTable(c, tableId, oldTableName, newTableName))
 throw new ThriftSecurityException(c.getPrincipal(), 
SecurityErrorCode.PERMISSION_DENIED);
 
-  fate.seedTransaction(opid, new TraceRepoMaster(new 
RenameTable(tableId, oldTableName, newTableName)), autoCleanup);
+  fate.seedTransaction(opid, new TraceRepoMaster(new 
RenameTable(tableId, oldTableName, newTableName, getInstance())), autoCleanup);
   
   break;
 }
@@ -970,7 +975,7 @@ public class Master implements LiveTServerSet.Listener, 
TableObserver, CurrentSt
 propertiesToSet.put(entry.getKey(), entry.getValue());
   }
 
-  fate.seedTransaction(opid, new TraceRepoMaster(new 
CloneTable(c.getPrincipal(), srcTableId, tableName, propertiesToSet, 
propertiesToExclude)),
+  fate.seedTransaction(opid, new TraceRepoMaster(new 
CloneTable(c.getPrincipal(), srcTableId, tableName, propertiesToSet, 
propertiesToExclude, getInstance())),
   autoCleanup);
 
   break;
@@ -981,7 +986,7 @@ public class Master implements LiveTServerSet.Listener, 
TableObserver, CurrentSt
   checkNotMetadataTable(tableName, TableOperation.DELETE);
   if (!security.canDeleteTable(c, tableId))
 throw new ThriftSecurityException(c.getPrincipal(), 
SecurityErrorCode.PERMISSION_DENIED);
-  fate.seedTransaction(opid, new TraceRepoMaster(new 
DeleteTable(tableId)), autoCleanup);
+  fate.seedTransaction(opid, new TraceRepoMaster(new 
DeleteTable(tableId, getInstance())), autoCleanup);
   break;
 }
 case ONLINE: {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/c2ed43e4/server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java

[04/50] [abbrv] git commit: ACCUMULO-802 added a few more namespace-specific randomwalk tests

2013-12-04 Thread ctubbsii
ACCUMULO-802 added a few more namespace-specific randomwalk tests


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

Branch: refs/heads/master
Commit: 431f4e2c72a45e86c5f4a59fa3ec9119349b4906
Parents: be1ff27
Author: Sean Hickey tallirishll...@gmail.com
Authored: Wed Jul 31 12:50:06 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:09 2013 -0500

--
 .../conf/TableNamespaceConfiguration.java   |  37 ---
 .../test/randomwalk/concurrent/Config.java  | 111 ++-
 .../concurrent/OfflineTableNamespace.java   |  53 +
 .../randomwalk/conf/modules/Concurrent.xml  |   5 +
 4 files changed, 162 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/431f4e2c/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
 
b/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
index e3c58f3..60da78a 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
@@ -16,6 +16,9 @@
  */
 package org.apache.accumulo.server.conf;
 
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map.Entry;
@@ -25,6 +28,7 @@ import java.util.TreeMap;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
+import org.apache.accumulo.core.conf.ConfigurationObserver;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
@@ -33,7 +37,7 @@ import org.apache.log4j.Logger;
 
 public class TableNamespaceConfiguration extends AccumuloConfiguration {
   private static final Logger log = 
Logger.getLogger(TableNamespaceConfiguration.class);
-  
+
   private final AccumuloConfiguration parent;
   private static ZooCache propCache = null;
   private String namespaceId = null;
@@ -46,12 +50,12 @@ public class TableNamespaceConfiguration extends 
AccumuloConfiguration {
 this.namespaceId = namespaceId;
 this.observers = Collections.synchronizedSet(new 
HashSetConfigurationObserver());
   }
-  
+
   @Override
   public String get(Property property) {
 String key = property.getKey();
 String value = get(key);
-
+
 if (value == null || !property.getType().isValidFormat(value)) {
   if (value != null)
 log.error(Using default value for  + key +  due to improperly 
formatted  + property.getType() + :  + value);
@@ -59,17 +63,16 @@ public class TableNamespaceConfiguration extends 
AccumuloConfiguration {
 }
 return value;
   }
-  
+
   private String get(String key) {
-String zPath = ZooUtil.getRoot(inst.getInstanceID()) + 
Constants.ZNAMESPACES + / + getNamespaceId() + Constants.ZNAMESPACE_CONF + /
-+ key;
+String zPath = ZooUtil.getRoot(inst.getInstanceID()) + 
Constants.ZNAMESPACES + / + getNamespaceId() + Constants.ZNAMESPACE_CONF + 
/ + key;
 byte[] v = getPropCache().get(zPath);
 String value = null;
 if (v != null)
   value = new String(v, Constants.UTF8);
 return value;
   }
-  
+
   private static ZooCache getPropCache() {
 Instance inst = HdfsZooInstance.getInstance();
 if (propCache == null)
@@ -79,14 +82,14 @@ public class TableNamespaceConfiguration extends 
AccumuloConfiguration {
   }
 return propCache;
   }
-  
+
   @Override
   public IteratorEntryString,String iterator() {
 TreeMapString,String entries = new TreeMapString,String();
-
+
 for (EntryString,String parentEntry : parent)
   entries.put(parentEntry.getKey(), parentEntry.getValue());
-
+
 ListString children = getPropCache().getChildren(
 ZooUtil.getRoot(inst.getInstanceID()) + Constants.ZNAMESPACES + / + 
getNamespaceId() + Constants.ZNAMESPACE_CONF);
 if (children != null) {
@@ -96,14 +99,14 @@ public class TableNamespaceConfiguration extends 
AccumuloConfiguration {
   entries.put(child, value);
   }
 }
-
+
 return entries.entrySet().iterator();
   }
-  
+
   private String getNamespaceId() {
 return namespaceId;
   }
-  
+
   public void addObserver(ConfigurationObserver co) {
 

[36/50] [abbrv] git commit: ACCUMULO-802 changed error type given to thrift for TableNamespaceNotFoundExceptions so they don't cause a RuntimException when caught on the client side

2013-12-04 Thread ctubbsii
ACCUMULO-802 changed error type given to thrift for 
TableNamespaceNotFoundExceptions so they don't cause a RuntimException when 
caught on the client side


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

Branch: refs/heads/master
Commit: 7d8d688fa00e42179ae357efc5f711729bbad012
Parents: 3d707c8
Author: Sean Hickey tallirishll...@gmail.com
Authored: Wed Aug 14 12:38:16 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:11 2013 -0500

--
 server/master/src/main/java/org/apache/accumulo/master/Master.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7d8d688f/server/master/src/main/java/org/apache/accumulo/master/Master.java
--
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java 
b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index 5cfd3c3..aa0d17a 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -931,7 +931,7 @@ public class Master implements LiveTServerSet.Listener, 
TableObserver, CurrentSt
   try {
 fate.seedTransaction(opid, new TraceRepoMaster(new 
CreateTable(c.getPrincipal(), tableName, timeType, options)), autoCleanup);
   } catch (TableNamespaceNotFoundException e) {
-throw new ThriftTableOperationException(null, tableName, 
TableOperation.CREATE, TableOperationExceptionType.NOTFOUND, e.getMessage());
+throw new TException(e.getMessage(), e);
   }
   break;
 }



[16/50] [abbrv] git commit: ACCUMULO-802 added displaying namespace properties in the 'config' command

2013-12-04 Thread ctubbsii
ACCUMULO-802 added displaying namespace properties in the 'config' command


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

Branch: refs/heads/master
Commit: 9db79fc70e9a78a9761d0b3458a6f7225f0da682
Parents: 5bcd3d2
Author: Sean Hickey tallirishll...@gmail.com
Authored: Fri Aug 9 09:19:16 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:10 2013 -0500

--
 .../core/client/admin/TableOperationsImpl.java  |  1 -
 .../core/util/shell/commands/ConfigCommand.java | 30 +---
 2 files changed, 26 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/9db79fc7/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
index b1ab058..cfaa657 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
@@ -218,7 +218,6 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 
 ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableName.getBytes()), 
ByteBuffer.wrap(timeType.name().getBytes()));
 
-// MapString,String opts = 
IteratorUtil.generateInitialTableProperties(limitVersion);
 MapString,String opts = new HashMapString,String();
 
 String namespace = Tables.extractNamespace(tableName);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/9db79fc7/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ConfigCommand.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ConfigCommand.java
 
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ConfigCommand.java
index c2f93be..1e49c4d 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ConfigCommand.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/ConfigCommand.java
@@ -30,6 +30,8 @@ import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.TableNamespaceNotFoundException;
 import org.apache.accumulo.core.client.TableNotFoundException;
+import org.apache.accumulo.core.client.impl.TableNamespaces;
+import org.apache.accumulo.core.client.impl.Tables;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.security.ColumnVisibility;
@@ -46,7 +48,7 @@ import org.apache.commons.cli.Options;
 public class ConfigCommand extends Command {
   private Option tableOpt, deleteOpt, setOpt, filterOpt, disablePaginationOpt, 
outputFileOpt, tableNamespaceOpt;
   
-  private int COL1 = 8, COL2 = 7;
+  private int COL1 = 10, COL2 = 7;
   private ConsoleReader reader;
   
   @Override
@@ -72,7 +74,7 @@ public class ConfigCommand extends Command {
 }
 final String tableNamespace = 
cl.getOptionValue(tableNamespaceOpt.getOpt());
 if (tableNamespace != null  
!shellState.getConnector().tableNamespaceOperations().exists(tableNamespace)) {
-  throw new TableNotFoundException(null, tableName, null);
+  throw new TableNamespaceNotFoundException(null, tableNamespace, null);
 }
 if (cl.hasOption(deleteOpt.getOpt())) {
   // delete property from table
@@ -149,6 +151,16 @@ public class ConfigCommand extends Command {
   for (EntryString,String defaultEntry : 
AccumuloConfiguration.getDefaultConfiguration()) {
 defaults.put(defaultEntry.getKey(), defaultEntry.getValue());
   }
+  
+  final TreeMapString,String namespaceConfig = new 
TreeMapString,String();
+  if (tableName != null) {
+String n = TableNamespaces.getNamespaceName(shellState.getInstance(),
+Tables.getNamespace(shellState.getInstance(), 
Tables.getTableId(shellState.getInstance(), tableName)));
+for (EntryString,String e : 
shellState.getConnector().tableNamespaceOperations().getProperties(n)) {
+  namespaceConfig.put(e.getKey(), e.getValue());
+}
+  }
+  
   IterableEntryString,String acuconf = 
shellState.getConnector().instanceOperations().getSystemConfiguration().entrySet();
   if (tableName != null) {
 acuconf = 

[41/50] [abbrv] git commit: ACCUMULO-802 fixed problems with some TableOps not locking correctly, fixed null pointer from some tables missing their namespace during randomwalk

2013-12-04 Thread ctubbsii
ACCUMULO-802 fixed problems with some TableOps not locking correctly, fixed 
null pointer from some tables missing their namespace during randomwalk


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

Branch: refs/heads/master
Commit: bf7c1db8ff3ee7d6514295ac3f3ff4b24254b285
Parents: 7d8d688
Author: Sean Hickey tallirishll...@gmail.com
Authored: Thu Aug 15 10:58:23 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:11 2013 -0500

--
 .../admin/TableNamespaceOperationsImpl.java |  6 -
 .../accumulo/core/client/impl/Tables.java   |  2 +-
 .../server/conf/TableParentConfiguration.java   |  3 +--
 .../accumulo/server/tables/TableManager.java|  2 +-
 .../java/org/apache/accumulo/master/Master.java | 12 +++--
 .../accumulo/master/tableOps/CloneTable.java| 10 +---
 .../master/tableOps/CreateTableNamespace.java   |  1 +
 .../accumulo/master/tableOps/ImportTable.java   | 11 +---
 .../accumulo/master/tableOps/RenameTable.java   | 27 ++--
 9 files changed, 46 insertions(+), 28 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/bf7c1db8/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
index 694ba89..35fa8ae 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
@@ -340,7 +340,11 @@ public class TableNamespaceOperationsImpl extends 
TableNamespaceOperationsHelper
 throw new TableNamespaceNotEmptyException(namespaceId, namespace, 
null);
   }
   for (String table : TableNamespaces.getTableNames(instance, 
namespaceId)) {
-getTableOperations().delete(table);
+try {
+  getTableOperations().delete(table);
+} catch (TableNotFoundException e) {
+  log.debug(Table ( + table + ) not found while deleting namespace, 
probably deleted while we were deleting the rest of the tables);
+}
   }
 }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/bf7c1db8/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java 
b/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
index 248bc6b..f80f506 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
@@ -63,7 +63,7 @@ public class Tables {
 String namespaceId = new String(nId, Constants.UTF8);
 if (!namespaceId.equals(Constants.DEFAULT_TABLE_NAMESPACE_ID)  
!namespaceId.equals(Constants.SYSTEM_TABLE_NAMESPACE_ID)) {
   try {
-name += TableNamespaces.getNamespaceName(instance, new 
String(namespaceId)) + .;
+name += TableNamespaces.getNamespaceName(instance, namespaceId) + 
.;
   } catch (TableNamespaceNotFoundException e) {
 Log.error(Table ( + tableId + ) contains reference to namespace 
( + namespaceId + ) that doesn't exist);
 continue;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/bf7c1db8/server/base/src/main/java/org/apache/accumulo/server/conf/TableParentConfiguration.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/conf/TableParentConfiguration.java
 
b/server/base/src/main/java/org/apache/accumulo/server/conf/TableParentConfiguration.java
index 7590d76..f8d8411 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/conf/TableParentConfiguration.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/conf/TableParentConfiguration.java
@@ -35,7 +35,6 @@ public class TableParentConfiguration extends 
TableNamespaceConfiguration {
   
   @Override
   protected String getNamespaceId() {
-this.namespaceId = Tables.getNamespace(inst, tableId); 
-return this.namespaceId;
+return Tables.getNamespace(inst, tableId); 
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/bf7c1db8/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java

[17/50] [abbrv] git commit: ACCUMULO-802 added -l option to namespaces command

2013-12-04 Thread ctubbsii
ACCUMULO-802 added -l option to namespaces command


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

Branch: refs/heads/master
Commit: d10feb7c7f7ae9eb5affe69ab18959e8bd7c16d7
Parents: 51f07eb
Author: Sean Hickey tallirishll...@gmail.com
Authored: Mon Aug 12 08:11:31 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:10 2013 -0500

--
 .../util/shell/commands/NamespacesCommand.java  | 34 ++--
 1 file changed, 32 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d10feb7c/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
 
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
index dcb4bd7..ad30699 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
@@ -17,6 +17,9 @@
 package org.apache.accumulo.core.util.shell.commands;
 
 import java.io.IOException;
+import java.util.Iterator;
+import java.util.TreeMap;
+import java.util.Map.Entry;
 
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
@@ -25,16 +28,41 @@ import org.apache.accumulo.core.util.shell.Shell.Command;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.Option;
 import org.apache.commons.cli.Options;
+import org.apache.commons.collections.iterators.AbstractIteratorDecorator;
 
 public class NamespacesCommand extends Command {
-  private Option disablePaginationOpt;
+  private Option disablePaginationOpt, namespaceIdOption;
   
+  @SuppressWarnings(unchecked)
   @Override
   public int execute(final String fullCommand, final CommandLine cl, final 
Shell shellState) throws AccumuloException, AccumuloSecurityException, 
IOException {
-
shellState.printLines(shellState.getConnector().tableNamespaceOperations().list().iterator(),
 !cl.hasOption(disablePaginationOpt.getOpt()));
+  IteratorString names = 
shellState.getConnector().tableNamespaceOperations().list().iterator();
+  IteratorString ids = new NamespaceIdIterator(new 
TreeMapString,String(shellState.getConnector().tableNamespaceOperations().namespaceIdMap()).entrySet().iterator());
+
+if (cl.hasOption(namespaceIdOption.getOpt())) {
+  shellState.printLines(ids, !cl.hasOption(disablePaginationOpt.getOpt()));
+} else {
+  shellState.printLines(names, 
!cl.hasOption(disablePaginationOpt.getOpt()));
+}
 return 0;
   }
   
+  /**
+   * Decorator that formats the id and name for display.
+   */
+  private static final class NamespaceIdIterator extends 
AbstractIteratorDecorator {
+public NamespaceIdIterator(IteratorEntryString,String iterator) {
+  super(iterator);
+}
+
+@SuppressWarnings(rawtypes)
+@Override
+public Object next() {
+  Entry entry = (Entry) super.next();
+  return String.format(%-15s = %10s%n, entry.getKey(), 
entry.getValue());
+}
+  }
+  
   @Override
   public String description() {
 return displays a list of all existing table namespaces;
@@ -43,6 +71,8 @@ public class NamespacesCommand extends Command {
   @Override
   public Options getOptions() {
 final Options o = new Options();
+namespaceIdOption = new Option(l, list-ids, false, display internal 
table namespace ids along with the name);
+o.addOption(namespaceIdOption);
 disablePaginationOpt = new Option(np, no-pagination, false, disable 
pagination of output);
 o.addOption(disablePaginationOpt);
 return o;



[05/50] [abbrv] git commit: ACCUMULO-1479 added namespace permissions to the zookeeper upgrade part of Master

2013-12-04 Thread ctubbsii
ACCUMULO-1479 added namespace permissions to the zookeeper upgrade part of 
Master


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

Branch: refs/heads/master
Commit: 02374a0e34c053709a76e7eacae5e9979aede737
Parents: 5f4b864
Author: Sean Hickey tallirishll...@gmail.com
Authored: Wed Aug 7 13:59:50 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:10 2013 -0500

--
 .../main/java/org/apache/accumulo/master/Master.java   | 13 +
 1 file changed, 13 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/02374a0e/server/master/src/main/java/org/apache/accumulo/master/Master.java
--
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java 
b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index 293dbc9..0d508dd 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -78,6 +78,7 @@ import 
org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.Lo
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.Credentials;
 import org.apache.accumulo.core.security.SecurityUtil;
+import org.apache.accumulo.core.security.TableNamespacePermission;
 import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.util.ByteBufferUtil;
 import org.apache.accumulo.core.util.Daemon;
@@ -139,6 +140,7 @@ import 
org.apache.accumulo.server.master.state.ZooTabletStateStore;
 import org.apache.accumulo.server.security.AuditedSecurityOperation;
 import org.apache.accumulo.server.security.SecurityOperation;
 import org.apache.accumulo.server.security.SystemCredentials;
+import org.apache.accumulo.server.security.handler.ZKPermHandler;
 import org.apache.accumulo.server.tables.TableManager;
 import org.apache.accumulo.server.tables.TableObserver;
 import org.apache.accumulo.server.util.DefaultMap;
@@ -363,6 +365,17 @@ public class Master implements LiveTServerSet.Listener, 
TableObserver, CurrentSt
 NodeExistsPolicy.SKIP);
   }
 }
+
+// add namespace permissions to existing users
+ZKPermHandler perm = new ZKPermHandler();
+perm.initialize(instance.getInstanceID(), true);
+String users = ZooUtil.getRoot(instance) + /users;
+for (String user : zoo.getChildren(users)) {
+  zoo.putPersistentData(users + / + user + /Namespaces, new 
byte[0], NodeExistsPolicy.SKIP);
+  perm.grantTableNamespacePermission(user, 
Constants.SYSTEM_TABLE_NAMESPACE_ID, TableNamespacePermission.READ);
+}
+perm.grantTableNamespacePermission(root, 
Constants.SYSTEM_TABLE_NAMESPACE_ID, TableNamespacePermission.ALTER_TABLE);
+
   } catch (Exception ex) {
 log.fatal(Error performing upgrade, ex);
 System.exit(1);



[31/50] [abbrv] ACCUMULO-802 Renamed TableNamespace to Namespace

2013-12-04 Thread ctubbsii
http://git-wip-us.apache.org/repos/asf/accumulo/blob/ea8ec193/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/SecurityErrorCode.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/SecurityErrorCode.java
 
b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/SecurityErrorCode.java
index 9bf554f..adeff6f 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/SecurityErrorCode.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/SecurityErrorCode.java
@@ -46,7 +46,7 @@ import org.apache.thrift.TEnum;
   TOKEN_EXPIRED(15),
   SERIALIZATION_ERROR(16),
   INSUFFICIENT_PROPERTIES(17),
-  TABLE_NAMESPACE_DOESNT_EXIST(18);
+  NAMESPACE_DOESNT_EXIST(18);
 
   private final int value;
 
@@ -104,7 +104,7 @@ import org.apache.thrift.TEnum;
   case 17:
 return INSUFFICIENT_PROPERTIES;
   case 18:
-return TABLE_NAMESPACE_DOESNT_EXIST;
+return NAMESPACE_DOESNT_EXIST;
   default:
 return null;
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ea8ec193/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java 
b/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
index f96abad..497716f 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
@@ -32,14 +32,14 @@ import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.SystemPermission;
-import org.apache.accumulo.core.security.TableNamespacePermission;
+import org.apache.accumulo.core.security.NamespacePermission;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.io.Text;
 
 public class MockAccumulo {
   final MapString,MockTable tables = new HashMapString,MockTable();
-  final MapString,MockTableNamespace namespaces = new 
HashMapString,MockTableNamespace();
+  final MapString,MockNamespace namespaces = new 
HashMapString,MockNamespace();
   final MapString,String systemProperties = new HashMapString,String();
   MapString,MockUser users = new HashMapString,MockUser();
   final FileSystem fs;
@@ -52,8 +52,8 @@ public class MockAccumulo {
 MockUser root = new MockUser(root, new PasswordToken(new byte[0]), 
Authorizations.EMPTY);
 root.permissions.add(SystemPermission.SYSTEM);
 users.put(root.name, root);
-namespaces.put(Constants.DEFAULT_TABLE_NAMESPACE, new 
MockTableNamespace());
-namespaces.put(Constants.SYSTEM_TABLE_NAMESPACE, new MockTableNamespace());
+namespaces.put(Constants.DEFAULT_NAMESPACE, new MockNamespace());
+namespaces.put(Constants.SYSTEM_NAMESPACE, new MockNamespace());
 createTable(root, RootTable.NAME, true, TimeType.LOGICAL);
 createTable(root, MetadataTable.NAME, true, TimeType.LOGICAL);
   }
@@ -90,7 +90,7 @@ public class MockAccumulo {
   return;
 }
 
-MockTableNamespace n = namespaces.get(namespace);
+MockNamespace n = namespaces.get(namespace);
 MockTable t = new MockTable(n, useVersions, timeType);
 t.userPermissions.put(username, EnumSet.allOf(TablePermission.class));
 t.setNamespaceName(namespace);
@@ -100,8 +100,8 @@ public class MockAccumulo {
   
   public void createNamespace(String username, String namespace) {
 if (!namespaceExists(namespace)) {
-  MockTableNamespace n = new MockTableNamespace();
-  n.userPermissions.put(username, 
EnumSet.allOf(TableNamespacePermission.class));
+  MockNamespace n = new MockNamespace();
+  n.userPermissions.put(username, 
EnumSet.allOf(NamespacePermission.class));
   namespaces.put(namespace, n);
 }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ea8ec193/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java 
b/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
index ecca271..996198c 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
@@ -32,7 +32,7 @@ import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.admin.InstanceOperations;
 import org.apache.accumulo.core.client.admin.SecurityOperations;
-import 

[13/50] [abbrv] git commit: ACCUMULO-802 added namespace locking to the rest of the tableOps and put them in a consistent order (namespace then table), switched to using HdfsZooInstance to get the ins

2013-12-04 Thread ctubbsii
ACCUMULO-802 added namespace locking to the rest of the tableOps and put them 
in a consistent order (namespace then table), switched to using HdfsZooInstance 
to get the instance for the namespaceId


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

Branch: refs/heads/master
Commit: 3d707c8645619e349fefd9323a2c2c22c803d4d4
Parents: c2ed43e
Author: Sean Hickey tallirishll...@gmail.com
Authored: Wed Aug 14 08:04:55 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:10 2013 -0500

--
 .../core/client/admin/TableOperationsImpl.java  |  5 +-
 .../java/org/apache/accumulo/master/Master.java |  8 +-
 .../master/tableOps/CancelCompactions.java  | 17 ++--
 .../master/tableOps/ChangeTableState.java   | 26 --
 .../accumulo/master/tableOps/CloneTable.java| 11 +--
 .../accumulo/master/tableOps/CompactRange.java  | 95 +++-
 .../accumulo/master/tableOps/CreateTable.java   |  8 +-
 .../accumulo/master/tableOps/DeleteTable.java   |  6 +-
 .../accumulo/master/tableOps/ExportTable.java   | 10 ++-
 .../accumulo/master/tableOps/ImportTable.java   |  5 +-
 .../accumulo/master/tableOps/RenameTable.java   |  4 +-
 .../master/tableOps/RenameTableNamespace.java   |  2 +-
 .../accumulo/master/tableOps/TableRangeOp.java  | 56 +++-
 .../test/randomwalk/concurrent/Merge.java   |  2 +-
 .../concurrent/RenameTableNamespace.java|  2 +-
 15 files changed, 197 insertions(+), 60 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/3d707c86/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
index cfaa657..aa4c83e 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
@@ -129,7 +129,7 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
   private Credentials credentials;
 
   public static final String CLONE_EXCLUDE_PREFIX = !;
-
+  
   private static final Logger log = Logger.getLogger(TableOperations.class);
 
   /**
@@ -727,7 +727,8 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 
   // get the properties that are only in the table namespace so that we can 
exclude them when copying table properties.
   // also, don't exclude properties that are going to be explicitly set.
-  private HashSetString getUniqueNamespaceProperties(String namespace, 
String table, MapString,String propsToSet) throws TableNotFoundException, 
AccumuloException {
+  private HashSetString getUniqueNamespaceProperties(String namespace, 
String table, MapString,String propsToSet) throws TableNotFoundException,
+  AccumuloException {
 HashSetString props = new HashSetString();
 try {
   IterableEntryString,String n = new 
TableNamespaceOperationsImpl(instance, credentials).getProperties(namespace);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/3d707c86/server/master/src/main/java/org/apache/accumulo/master/Master.java
--
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java 
b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index 338550a..5cfd3c3 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -929,7 +929,7 @@ public class Master implements LiveTServerSet.Listener, 
TableObserver, CurrentSt
   TimeType timeType = 
TimeType.valueOf(ByteBufferUtil.toString(arguments.get(1)));
 
   try {
-fate.seedTransaction(opid, new TraceRepoMaster(new 
CreateTable(c.getPrincipal(), tableName, timeType, options, getInstance())), 
autoCleanup);
+fate.seedTransaction(opid, new TraceRepoMaster(new 
CreateTable(c.getPrincipal(), tableName, timeType, options)), autoCleanup);
   } catch (TableNamespaceNotFoundException e) {
 throw new ThriftTableOperationException(null, tableName, 
TableOperation.CREATE, TableOperationExceptionType.NOTFOUND, e.getMessage());
   }
@@ -946,7 +946,7 @@ public class Master implements LiveTServerSet.Listener, 
TableObserver, CurrentSt
   if (!security.canRenameTable(c, tableId, oldTableName, newTableName))
 throw new 

[18/50] [abbrv] git commit: ACCUMULO-1479 added tests for the namespace system permissions in PermissionsIT to keep it from failing, already have tests in TableNamespacesIT

2013-12-04 Thread ctubbsii
ACCUMULO-1479 added tests for the namespace system permissions in PermissionsIT 
to keep it from failing, already have tests in TableNamespacesIT


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

Branch: refs/heads/master
Commit: 51f07eb9d37926bb37f9715413290e0103e5365d
Parents: 9db79fc
Author: Sean Hickey tallirishll...@gmail.com
Authored: Fri Aug 9 10:19:47 2013 -0400
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:10 2013 -0500

--
 .../accumulo/test/functional/PermissionsIT.java | 93 +++-
 1 file changed, 89 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/51f07eb9/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java 
b/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java
index b8e1a4f..b05ad18 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/PermissionsIT.java
@@ -34,6 +34,9 @@ import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableExistsException;
+import org.apache.accumulo.core.client.TableNamespaceExistsException;
+import org.apache.accumulo.core.client.TableNamespaceNotEmptyException;
+import org.apache.accumulo.core.client.TableNamespaceNotFoundException;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.security.SecurityErrorCode;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
@@ -105,8 +108,9 @@ public class PermissionsIT extends SimpleMacIT {
   }
 
   private static void testMissingSystemPermission(String tableNamePrefix, 
Connector root_conn, Connector test_user_conn, SystemPermission perm)
-  throws AccumuloException, TableExistsException, 
AccumuloSecurityException, TableNotFoundException {
-String tableName, user, password = password;
+  throws AccumuloException, TableExistsException, 
AccumuloSecurityException, TableNotFoundException, 
TableNamespaceExistsException,
+  TableNamespaceNotFoundException, TableNamespaceNotEmptyException {
+String tableName, user, password = password, tableNamespace;
 log.debug(Confirming that the lack of the  + perm +  permission 
properly restricts the user);
 
 // test permission prior to granting it
@@ -199,14 +203,66 @@ public class PermissionsIT extends SimpleMacIT {
   case SYSTEM:
 // test for system permission would go here
 break;
+  case CREATE_NAMESPACE:
+tableNamespace = __CREATE_TABLE_NAMESPACE WITHOUT_PERM_TEST__;
+try {
+  test_user_conn.tableNamespaceOperations().create(tableNamespace);
+  throw new IllegalStateException(Should NOT be able to create a 
table namespace);
+} catch (AccumuloSecurityException e) {
+  if (e.getSecurityErrorCode() != SecurityErrorCode.PERMISSION_DENIED 
|| root_conn.tableNamespaceOperations().list().contains(tableNamespace))
+throw e;
+}
+break;
+  case DROP_NAMESPACE:
+tableNamespace = __DROP_TABLE_NAMESPACE_WITHOUT_PERM_TEST__;
+root_conn.tableNamespaceOperations().create(tableNamespace);
+try {
+  test_user_conn.tableNamespaceOperations().delete(tableNamespace);
+  throw new IllegalStateException(Should NOT be able to delete a 
table namespace);
+} catch (AccumuloSecurityException e) {
+  if (e.getSecurityErrorCode() != SecurityErrorCode.PERMISSION_DENIED 
|| !root_conn.tableNamespaceOperations().list().contains(tableNamespace))
+throw e;
+}
+break;
+  case ALTER_NAMESPACE:
+tableNamespace = __ALTER_TABLE_NAMESPACE_WITHOUT_PERM_TEST__;
+root_conn.tableNamespaceOperations().create(tableNamespace);
+try {
+  
test_user_conn.tableNamespaceOperations().setProperty(tableNamespace, 
Property.TABLE_BLOOM_ERRORRATE.getKey(), 003.14159%);
+  throw new IllegalStateException(Should NOT be able to set a table 
namespace property);
+} catch (AccumuloSecurityException e) {
+  if (e.getSecurityErrorCode() != SecurityErrorCode.PERMISSION_DENIED
+  || 
map(root_conn.tableNamespaceOperations().getProperties(tableNamespace)).get(Property.TABLE_BLOOM_ERRORRATE.getKey()).equals(003.14159%))

[48/50] [abbrv] git commit: ACCUMULO-324 Don't inherit iters/constraints in system namespace

2013-12-04 Thread ctubbsii
ACCUMULO-324 Don't inherit iters/constraints in system namespace


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

Branch: refs/heads/master
Commit: 4a7c614ef8cd58aea02d55f0fd60b8654c388c2a
Parents: 5b791b1
Author: Christopher Tubbs ctubb...@apache.org
Authored: Thu Nov 14 15:05:18 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 4 18:46:11 2013 -0500

--
 .../accumulo/server/conf/TableNamespaceConfiguration.java| 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/4a7c614e/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
 
b/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
index 74621a3..888c5ed 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfiguration.java
@@ -57,8 +57,10 @@ public class TableNamespaceConfiguration extends 
AccumuloConfiguration {
 if (value == null || !property.getType().isValidFormat(value)) {
   if (value != null)
 log.error(Using default value for  + key +  due to improperly 
formatted  + property.getType() + :  + value);
-  if (!isIterConst(property.getKey()))
+  if (!(namespaceId.equals(Constants.SYSTEM_TABLE_NAMESPACE_ID)  
isIteratorOrConstraint(property.getKey( {
+// ignore iterators from parent if system namespace
 value = parent.get(property);
+  }
 }
 return value;
   }
@@ -92,7 +94,7 @@ public class TableNamespaceConfiguration extends 
AccumuloConfiguration {
 
 @Override
 public boolean accept(String key) {
-  if (isIterConst(key))
+  if (isIteratorOrConstraint(key))
 return false;
   return userFilter.accept(key);
 }
@@ -166,7 +168,7 @@ public class TableNamespaceConfiguration extends 
AccumuloConfiguration {
   co.propertiesChanged();
   }
 
-  protected boolean isIterConst(String key) {
+  protected boolean isIteratorOrConstraint(String key) {
 return key.startsWith(Property.TABLE_ITERATOR_PREFIX.getKey()) || 
key.startsWith(Property.TABLE_CONSTRAINT_PREFIX.getKey());
   }
 }



[33/50] [abbrv] ACCUMULO-802 Renamed TableNamespace to Namespace

2013-12-04 Thread ctubbsii
http://git-wip-us.apache.org/repos/asf/accumulo/blob/ea8ec193/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
deleted file mode 100644
index a7d0c34..000
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableNamespaceOperationsImpl.java
+++ /dev/null
@@ -1,590 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the License); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.core.client.admin;
-
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import jline.internal.Log;
-
-import org.apache.accumulo.core.Constants;
-import org.apache.accumulo.core.client.AccumuloException;
-import org.apache.accumulo.core.client.AccumuloSecurityException;
-import org.apache.accumulo.core.client.Instance;
-import org.apache.accumulo.core.client.IteratorSetting;
-import org.apache.accumulo.core.client.TableNamespaceExistsException;
-import org.apache.accumulo.core.client.TableNamespaceNotEmptyException;
-import org.apache.accumulo.core.client.TableNamespaceNotFoundException;
-import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.client.TableOfflineException;
-import org.apache.accumulo.core.client.impl.ClientExec;
-import org.apache.accumulo.core.client.impl.ClientExecReturn;
-import org.apache.accumulo.core.client.impl.MasterClient;
-import org.apache.accumulo.core.client.impl.ServerClient;
-import org.apache.accumulo.core.client.impl.TableNamespaces;
-import org.apache.accumulo.core.client.impl.Tables;
-import org.apache.accumulo.core.client.impl.thrift.ClientService;
-import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
-import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
-import 
org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
-import org.apache.accumulo.core.constraints.Constraint;
-import org.apache.accumulo.core.iterators.IteratorUtil;
-import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
-import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
-import org.apache.accumulo.core.master.thrift.MasterClientService;
-import org.apache.accumulo.core.master.thrift.TableOperation;
-import org.apache.accumulo.core.security.Credentials;
-import org.apache.accumulo.core.util.ArgumentChecker;
-import org.apache.accumulo.core.util.ByteBufferUtil;
-import org.apache.accumulo.core.util.OpTimer;
-import org.apache.accumulo.core.util.UtilWaitThread;
-import org.apache.accumulo.trace.instrument.Tracer;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.thrift.TException;
-import org.apache.thrift.transport.TTransportException;
-
-/**
- * Provides a class for administering table namespaces
- * 
- */
-public class TableNamespaceOperationsImpl extends 
TableNamespaceOperationsHelper {
-  private Instance instance;
-  private Credentials credentials;
-
-  private static final Logger log = Logger.getLogger(TableOperations.class);
-
-  /**
-   * @param instance
-   *  the connection information for this instance
-   * @param credentials
-   *  the username/password for this connection
-   */
-  public TableNamespaceOperationsImpl(Instance instance, Credentials 
credentials) {
-ArgumentChecker.notNull(instance, credentials);
-this.instance = instance;
-this.credentials = credentials;
-  }
-
-  /**
-   * Retrieve a list of table namespaces in Accumulo.
-   * 
-   * @return List of table namespaces in accumulo
-   */
-  @Override
-  public SortedSetString list() {
-OpTimer opTimer = new OpTimer(log, Level.TRACE).start(Fetching list of 
table namespaces...);
-TreeSetString namespaces = new 
TreeSetString(TableNamespaces.getNameToIdMap(instance).keySet());

[01/50] [abbrv] ACCUMULO-802 updated more shell commands to include the tableNamespaces option

2013-12-04 Thread ctubbsii
Updated Branches:
  refs/heads/master c29df8ef0 - 7b8922c70


http://git-wip-us.apache.org/repos/asf/accumulo/blob/5acd6a48/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfWatcher.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfWatcher.java
 
b/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfWatcher.java
new file mode 100644
index 000..8bb33b8
--- /dev/null
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfWatcher.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.server.conf;
+
+import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.client.Instance;
+import org.apache.accumulo.core.zookeeper.ZooUtil;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+
+class TableNamespaceConfWatcher implements Watcher {
+  static {
+Logger.getLogger(org.apache.zookeeper).setLevel(Level.WARN);
+Logger.getLogger(org.apache.hadoop.io.compress).setLevel(Level.WARN);
+  }
+  
+  private static final Logger log = 
Logger.getLogger(TableNamespaceConfWatcher.class);
+  private Instance instance = null;
+  
+  TableNamespaceConfWatcher(Instance instance) {
+this.instance = instance;
+  }
+  
+  @Override
+  public void process(WatchedEvent event) {
+String path = event.getPath();
+if (log.isTraceEnabled())
+  log.trace(WatchEvent :  + path +   + event.getState() +   + 
event.getType());
+
+String namespacesPrefix = ZooUtil.getRoot(instance) + 
Constants.ZNAMESPACES + /;
+
+String namespaceId = null;
+String key = null;
+
+if (path != null) {
+  if (path.startsWith(namespacesPrefix)) {
+namespaceId = path.substring(namespacesPrefix.length());
+if (namespaceId.contains(/)) {
+  namespaceId = namespaceId.substring(0, namespaceId.indexOf('/'));
+  if (path.startsWith(namespacesPrefix + namespaceId + 
Constants.ZNAMESPACE_CONF + /))
+key = path.substring((namespacesPrefix + namespaceId + 
Constants.ZNAMESPACE_CONF + /).length());
+}
+  }
+  
+  if (namespaceId == null) {
+log.warn(Zookeeper told me about a path I was not watching  + path + 
 state= + event.getState() +  type= + event.getType());
+return;
+  }
+}
+
+switch (event.getType()) {
+  case NodeDataChanged:
+if (log.isTraceEnabled())
+  log.trace(EventNodeDataChanged  + event.getPath());
+if (key != null)
+  ServerConfiguration.getTableNamespaceConfiguration(instance, 
namespaceId).propertyChanged(key);
+break;
+  case NodeChildrenChanged:
+ServerConfiguration.getTableNamespaceConfiguration(instance, 
namespaceId).propertiesChanged(key);
+break;
+  case NodeDeleted:
+if (key == null) {
+  ServerConfiguration.removeNamespaceIdInstance(namespaceId);
+}
+break;
+  case None:
+switch (event.getState()) {
+  case Expired:
+ServerConfiguration.expireAllTableObservers();
+break;
+  case SyncConnected:
+break;
+  case Disconnected:
+break;
+  default:
+log.warn(EventNone event not handled path =  + event.getPath() + 
 state= + event.getState());
+}
+break;
+  case NodeCreated:
+switch (event.getState()) {
+  case SyncConnected:
+break;
+  default:
+log.warn(Event NodeCreated event not handled path =  + 
event.getPath() +  state= + event.getState());
+}
+break;
+  default:
+log.warn(Event not handled path =  + event.getPath() +  state= + 
event.getState() +  type =  + event.getType());
+}
+  }
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/5acd6a48/server/src/main/java/org/apache/accumulo/server/conf/TableNamespaceConfWatcher.java
--
diff 

[1/2] git commit: ACCUMULO-1968 Update incorrect example documentation

2013-12-05 Thread ctubbsii
Updated Branches:
  refs/heads/1.5.1-SNAPSHOT 0833f4fab - 00fb08b3c


ACCUMULO-1968 Update incorrect example documentation


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: 513f4d22c5dfe39e5dd372528edb6c2ce6c7525d
Parents: 6175d7a
Author: Christopher Tubbs ctubb...@apache.org
Authored: Thu Dec 5 11:53:35 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Thu Dec 5 11:53:35 2013 -0500

--
 docs/examples/README.filedata| 4 ++--
 .../apache/accumulo/examples/simple/filedata/FileDataIngest.java | 2 +-
 .../apache/accumulo/examples/simple/filedata/FileDataQuery.java  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/513f4d22/docs/examples/README.filedata
--
diff --git a/docs/examples/README.filedata b/docs/examples/README.filedata
index ad7c2ee..80d65e3 100644
--- a/docs/examples/README.filedata
+++ b/docs/examples/README.filedata
@@ -23,8 +23,8 @@ The example has the following classes:
  * ChunkCombiner - An Iterator that dedupes file data and sets their 
visibilities to a combined visibility based on current references to the file 
data.
  * ChunkInputFormat - An Accumulo InputFormat that provides keys containing 
file info (ListEntryKey,Value) and values with an InputStream over the file 
(ChunkInputStream).
  * ChunkInputStream - An input stream over file data stored in Accumulo.
- * FileDataIngest - Takes a list of files and archives them into Accumulo 
keyed on the SHA1 hashes of the files.
- * FileDataQuery - Retrieves file data based on the SHA1 hash of the file. 
(Used by the dirlist.Viewer.)
+ * FileDataIngest - Takes a list of files and archives them into Accumulo 
keyed on hashes of the files.
+ * FileDataQuery - Retrieves file data based on the hash of the file. (Used by 
the dirlist.Viewer.)
  * KeyUtil - A utility for creating and parsing null-byte separated strings 
into/from Text objects.
  * VisibilityCombiner - A utility for merging visibilities into the form 
(VIS1)|(VIS2)|...
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/513f4d22/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
--
diff --git 
a/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
 
b/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
index 186ba4f..4ee1063 100644
--- 
a/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
+++ 
b/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
@@ -35,7 +35,7 @@ import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.hadoop.io.Text;
 
 /**
- * Takes a list of files and archives them into Accumulo keyed on the SHA1 
hashes of the files. See docs/examples/README.filedata for instructions.
+ * Takes a list of files and archives them into Accumulo keyed on hashes of 
the files. See docs/examples/README.filedata for instructions.
  */
 public class FileDataIngest {
   public static final Text CHUNK_CF = new Text(~chunk);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/513f4d22/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
--
diff --git 
a/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
 
b/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
index acfed37..bf34290 100644
--- 
a/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
+++ 
b/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
@@ -34,7 +34,7 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.PeekingIterator;
 
 /**
- * Retrieves file data based on the SHA1 hash of the file. Used by the {@link 
org.apache.accumulo.examples.simple.dirlist.Viewer}. See README.dirlist for
+ * Retrieves file data based on the hash of the file. Used by the {@link 
org.apache.accumulo.examples.simple.dirlist.Viewer}. See README.dirlist for
  * instructions.
  */
 public class FileDataQuery {



[2/2] git commit: Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT

2013-12-05 Thread ctubbsii
Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: 00fb08b3c4eed71865107c40c3036da39772cb41
Parents: 0833f4f 513f4d2
Author: Christopher Tubbs ctubb...@apache.org
Authored: Thu Dec 5 11:55:02 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Thu Dec 5 11:55:02 2013 -0500

--
 docs/examples/README.filedata| 4 ++--
 .../apache/accumulo/examples/simple/filedata/FileDataIngest.java | 2 +-
 .../apache/accumulo/examples/simple/filedata/FileDataQuery.java  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/00fb08b3/docs/examples/README.filedata
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/00fb08b3/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
--
diff --cc 
examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
index ef17f04,000..78fef0d
mode 100644,00..100644
--- 
a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
+++ 
b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
@@@ -1,203 -1,0 +1,203 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the License); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an AS IS BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.examples.simple.filedata;
 +
 +import java.io.FileInputStream;
 +import java.io.IOException;
 +import java.io.InputStream;
 +import java.security.MessageDigest;
 +import java.security.NoSuchAlgorithmException;
 +import java.util.ArrayList;
 +import java.util.List;
 +
 +import org.apache.accumulo.core.cli.BatchWriterOpts;
 +import org.apache.accumulo.core.cli.ClientOnRequiredTable;
 +import org.apache.accumulo.core.client.BatchWriter;
 +import org.apache.accumulo.core.client.Connector;
 +import org.apache.accumulo.core.client.IteratorSetting;
 +import org.apache.accumulo.core.client.MutationsRejectedException;
 +import org.apache.accumulo.core.data.ArrayByteSequence;
 +import org.apache.accumulo.core.data.ByteSequence;
 +import org.apache.accumulo.core.data.Mutation;
 +import org.apache.accumulo.core.data.Value;
 +import org.apache.accumulo.core.security.ColumnVisibility;
 +import org.apache.hadoop.io.Text;
 +
 +import com.beust.jcommander.Parameter;
 +
 +/**
-  * Takes a list of files and archives them into Accumulo keyed on the SHA1 
hashes of the files. See docs/examples/README.filedata for instructions.
++ * Takes a list of files and archives them into Accumulo keyed on hashes of 
the files. See docs/examples/README.filedata for instructions.
 + */
 +public class FileDataIngest {
 +  public static final Text CHUNK_CF = new Text(~chunk);
 +  public static final Text REFS_CF = new Text(refs);
 +  public static final String REFS_ORIG_FILE = name;
 +  public static final String REFS_FILE_EXT = filext;
 +  public static final ByteSequence CHUNK_CF_BS = new 
ArrayByteSequence(CHUNK_CF.getBytes(), 0, CHUNK_CF.getLength());
 +  public static final ByteSequence REFS_CF_BS = new 
ArrayByteSequence(REFS_CF.getBytes(), 0, REFS_CF.getLength());
 +  
 +  int chunkSize;
 +  byte[] chunkSizeBytes;
 +  byte[] buf;
 +  MessageDigest md5digest;
 +  ColumnVisibility cv;
 +  
 +  public FileDataIngest(int chunkSize, ColumnVisibility colvis) {
 +this.chunkSize = chunkSize;
 +chunkSizeBytes = intToBytes(chunkSize);
 +buf = new byte[chunkSize];
 +try {
 +  md5digest = MessageDigest.getInstance(MD5);
 +} catch (NoSuchAlgorithmException e) {
 +  throw new RuntimeException(e);
 +}
 +cv = colvis;
 +  }
 +  
 +  public String insertFileData(String filename, BatchWriter bw) 

[3/3] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

2013-12-05 Thread ctubbsii
Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 1bddc574086129aca3484a6070aee257c8622085
Parents: 0d49819 00fb08b
Author: Christopher Tubbs ctubb...@apache.org
Authored: Thu Dec 5 11:55:58 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Thu Dec 5 11:55:58 2013 -0500

--
 .../apache/accumulo/examples/simple/filedata/FileDataIngest.java | 2 +-
 .../apache/accumulo/examples/simple/filedata/FileDataQuery.java  | 2 +-
 server/monitor/src/main/resources/docs/examples/README.filedata  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/1bddc574/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/1bddc574/server/monitor/src/main/resources/docs/examples/README.filedata
--
diff --cc server/monitor/src/main/resources/docs/examples/README.filedata
index 946ca8c,000..9f0016e
mode 100644,00..100644
--- a/server/monitor/src/main/resources/docs/examples/README.filedata
+++ b/server/monitor/src/main/resources/docs/examples/README.filedata
@@@ -1,47 -1,0 +1,47 @@@
 +Title: Apache Accumulo File System Archive Example (Data Only)
 +Notice:Licensed to the Apache Software Foundation (ASF) under one
 +   or more contributor license agreements.  See the NOTICE file
 +   distributed with this work for additional information
 +   regarding copyright ownership.  The ASF licenses this file
 +   to you under the Apache License, Version 2.0 (the
 +   License); you may not use this file except in compliance
 +   with the License.  You may obtain a copy of the License at
 +   .
 + http://www.apache.org/licenses/LICENSE-2.0
 +   .
 +   Unless required by applicable law or agreed to in writing,
 +   software distributed under the License is distributed on an
 +   AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 +   KIND, either express or implied.  See the License for the
 +   specific language governing permissions and limitations
 +   under the License.
 +
 +This example archives file data into an Accumulo table.  Files with duplicate 
data are only stored once.
 +The example has the following classes:
 +
 + * CharacterHistogram - A MapReduce that computes a histogram of byte 
frequency for each file and stores the histogram alongside the file data.  An 
example use of the ChunkInputFormat.
 + * ChunkCombiner - An Iterator that dedupes file data and sets their 
visibilities to a combined visibility based on current references to the file 
data.
 + * ChunkInputFormat - An Accumulo InputFormat that provides keys containing 
file info (ListEntryKey,Value) and values with an InputStream over the file 
(ChunkInputStream).
 + * ChunkInputStream - An input stream over file data stored in Accumulo.
-  * FileDataIngest - Takes a list of files and archives them into Accumulo 
keyed on the SHA1 hashes of the files.
-  * FileDataQuery - Retrieves file data based on the SHA1 hash of the file. 
(Used by the dirlist.Viewer.)
++ * FileDataIngest - Takes a list of files and archives them into Accumulo 
keyed on hashes of the files.
++ * FileDataQuery - Retrieves file data based on the hash of the file. (Used 
by the dirlist.Viewer.)
 + * KeyUtil - A utility for creating and parsing null-byte separated strings 
into/from Text objects.
 + * VisibilityCombiner - A utility for merging visibilities into the form 
(VIS1)|(VIS2)|...
 +
 +This example is coupled with the dirlist example.  See README.dirlist for 
instructions.
 +
 +If you haven't already run the README.dirlist example, ingest a file with 
FileDataIngest.
 +
 +$ ./bin/accumulo 
org.apache.accumulo.examples.simple.filedata.FileDataIngest -i instance -z 
zookeepers -u username -p password -t dataTable --auths exampleVis --chunk 1000 
$ACCUMULO_HOME/README
 +
 +Open the accumulo shell and look at the data.  The row is the MD5 hash of the 
file, which you can verify by running a command such as 'md5sum' on the file.
 +
 + scan -t dataTable
 +
 +Run the CharacterHistogram MapReduce to add some information about the file.
 +
 +$ bin/tool.sh lib/accumulo-examples-simple.jar 
org.apache.accumulo.examples.simple.filedata.CharacterHistogram -i instance -z 
zookeepers -u username -p password -t 

[2/3] git commit: Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT

2013-12-05 Thread ctubbsii
Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 00fb08b3c4eed71865107c40c3036da39772cb41
Parents: 0833f4f 513f4d2
Author: Christopher Tubbs ctubb...@apache.org
Authored: Thu Dec 5 11:55:02 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Thu Dec 5 11:55:02 2013 -0500

--
 docs/examples/README.filedata| 4 ++--
 .../apache/accumulo/examples/simple/filedata/FileDataIngest.java | 2 +-
 .../apache/accumulo/examples/simple/filedata/FileDataQuery.java  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/00fb08b3/docs/examples/README.filedata
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/00fb08b3/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
--
diff --cc 
examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
index ef17f04,000..78fef0d
mode 100644,00..100644
--- 
a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
+++ 
b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
@@@ -1,203 -1,0 +1,203 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the License); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an AS IS BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.examples.simple.filedata;
 +
 +import java.io.FileInputStream;
 +import java.io.IOException;
 +import java.io.InputStream;
 +import java.security.MessageDigest;
 +import java.security.NoSuchAlgorithmException;
 +import java.util.ArrayList;
 +import java.util.List;
 +
 +import org.apache.accumulo.core.cli.BatchWriterOpts;
 +import org.apache.accumulo.core.cli.ClientOnRequiredTable;
 +import org.apache.accumulo.core.client.BatchWriter;
 +import org.apache.accumulo.core.client.Connector;
 +import org.apache.accumulo.core.client.IteratorSetting;
 +import org.apache.accumulo.core.client.MutationsRejectedException;
 +import org.apache.accumulo.core.data.ArrayByteSequence;
 +import org.apache.accumulo.core.data.ByteSequence;
 +import org.apache.accumulo.core.data.Mutation;
 +import org.apache.accumulo.core.data.Value;
 +import org.apache.accumulo.core.security.ColumnVisibility;
 +import org.apache.hadoop.io.Text;
 +
 +import com.beust.jcommander.Parameter;
 +
 +/**
-  * Takes a list of files and archives them into Accumulo keyed on the SHA1 
hashes of the files. See docs/examples/README.filedata for instructions.
++ * Takes a list of files and archives them into Accumulo keyed on hashes of 
the files. See docs/examples/README.filedata for instructions.
 + */
 +public class FileDataIngest {
 +  public static final Text CHUNK_CF = new Text(~chunk);
 +  public static final Text REFS_CF = new Text(refs);
 +  public static final String REFS_ORIG_FILE = name;
 +  public static final String REFS_FILE_EXT = filext;
 +  public static final ByteSequence CHUNK_CF_BS = new 
ArrayByteSequence(CHUNK_CF.getBytes(), 0, CHUNK_CF.getLength());
 +  public static final ByteSequence REFS_CF_BS = new 
ArrayByteSequence(REFS_CF.getBytes(), 0, REFS_CF.getLength());
 +  
 +  int chunkSize;
 +  byte[] chunkSizeBytes;
 +  byte[] buf;
 +  MessageDigest md5digest;
 +  ColumnVisibility cv;
 +  
 +  public FileDataIngest(int chunkSize, ColumnVisibility colvis) {
 +this.chunkSize = chunkSize;
 +chunkSizeBytes = intToBytes(chunkSize);
 +buf = new byte[chunkSize];
 +try {
 +  md5digest = MessageDigest.getInstance(MD5);
 +} catch (NoSuchAlgorithmException e) {
 +  throw new RuntimeException(e);
 +}
 +cv = colvis;
 +  }
 +  
 +  public String insertFileData(String filename, BatchWriter bw) 

[1/3] git commit: ACCUMULO-1968 Update incorrect example documentation

2013-12-05 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 0d498192b - 1bddc5740


ACCUMULO-1968 Update incorrect example documentation


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 513f4d22c5dfe39e5dd372528edb6c2ce6c7525d
Parents: 6175d7a
Author: Christopher Tubbs ctubb...@apache.org
Authored: Thu Dec 5 11:53:35 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Thu Dec 5 11:53:35 2013 -0500

--
 docs/examples/README.filedata| 4 ++--
 .../apache/accumulo/examples/simple/filedata/FileDataIngest.java | 2 +-
 .../apache/accumulo/examples/simple/filedata/FileDataQuery.java  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/513f4d22/docs/examples/README.filedata
--
diff --git a/docs/examples/README.filedata b/docs/examples/README.filedata
index ad7c2ee..80d65e3 100644
--- a/docs/examples/README.filedata
+++ b/docs/examples/README.filedata
@@ -23,8 +23,8 @@ The example has the following classes:
  * ChunkCombiner - An Iterator that dedupes file data and sets their 
visibilities to a combined visibility based on current references to the file 
data.
  * ChunkInputFormat - An Accumulo InputFormat that provides keys containing 
file info (ListEntryKey,Value) and values with an InputStream over the file 
(ChunkInputStream).
  * ChunkInputStream - An input stream over file data stored in Accumulo.
- * FileDataIngest - Takes a list of files and archives them into Accumulo 
keyed on the SHA1 hashes of the files.
- * FileDataQuery - Retrieves file data based on the SHA1 hash of the file. 
(Used by the dirlist.Viewer.)
+ * FileDataIngest - Takes a list of files and archives them into Accumulo 
keyed on hashes of the files.
+ * FileDataQuery - Retrieves file data based on the hash of the file. (Used by 
the dirlist.Viewer.)
  * KeyUtil - A utility for creating and parsing null-byte separated strings 
into/from Text objects.
  * VisibilityCombiner - A utility for merging visibilities into the form 
(VIS1)|(VIS2)|...
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/513f4d22/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
--
diff --git 
a/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
 
b/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
index 186ba4f..4ee1063 100644
--- 
a/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
+++ 
b/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataIngest.java
@@ -35,7 +35,7 @@ import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.hadoop.io.Text;
 
 /**
- * Takes a list of files and archives them into Accumulo keyed on the SHA1 
hashes of the files. See docs/examples/README.filedata for instructions.
+ * Takes a list of files and archives them into Accumulo keyed on hashes of 
the files. See docs/examples/README.filedata for instructions.
  */
 public class FileDataIngest {
   public static final Text CHUNK_CF = new Text(~chunk);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/513f4d22/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
--
diff --git 
a/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
 
b/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
index acfed37..bf34290 100644
--- 
a/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
+++ 
b/src/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/FileDataQuery.java
@@ -34,7 +34,7 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.PeekingIterator;
 
 /**
- * Retrieves file data based on the SHA1 hash of the file. Used by the {@link 
org.apache.accumulo.examples.simple.dirlist.Viewer}. See README.dirlist for
+ * Retrieves file data based on the hash of the file. Used by the {@link 
org.apache.accumulo.examples.simple.dirlist.Viewer}. See README.dirlist for
  * instructions.
  */
 public class FileDataQuery {



git commit: ACCUMULO-1969 Load native maps from lib/native not lib/native/map

2013-12-05 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT f777f539e - e15263589


ACCUMULO-1969 Load native maps from lib/native not lib/native/map


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: e1526358975515a637c2d34386a817a8acb12137
Parents: f777f53
Author: Christopher Tubbs ctubb...@apache.org
Authored: Thu Dec 5 16:39:49 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Thu Dec 5 16:39:49 2013 -0500

--
 bin/build_native_library.sh  | 2 +-
 .../src/main/java/org/apache/accumulo/tserver/NativeMap.java | 8 +---
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e1526358/bin/build_native_library.sh
--
diff --git a/bin/build_native_library.sh b/bin/build_native_library.sh
index cb8d0dd..65b2457 100755
--- a/bin/build_native_library.sh
+++ b/bin/build_native_library.sh
@@ -29,7 +29,7 @@ script=$( basename $SOURCE )
 
 lib=${bin}/../lib
 native_tarball=${lib}/accumulo-native.tar.gz
-final_native_target=${lib}/native/map
+final_native_target=${lib}/native
 
 if [[ ! -f $native_tarball ]]; then
 echo Could not find native code artifact: ${native_tarball};

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e1526358/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
--
diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
index 80c6f62..a454d6c 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java
@@ -63,10 +63,12 @@ public class NativeMap implements 
IterableMap.EntryKey,Value {
   static {
 // Check standard directories
 ListFile directories = new ArrayListFile(Arrays.asList(new File[] {new 
File(/usr/lib64), new File(/usr/lib)}));
-// Check in old ACCUMULO_HOME location, too
+// Check in ACCUMULO_HOME location, too
 String envAccumuloHome = System.getenv(ACCUMULO_HOME);
-if (envAccumuloHome != null)
-  directories.add(new File(envAccumuloHome + /lib/native/map));
+if (envAccumuloHome != null) {
+  directories.add(new File(envAccumuloHome + /lib/native));
+  directories.add(new File(envAccumuloHome + /lib/native/map)); // old 
location, just in case somebody puts it here
+}
 // Attempt to load from these directories, using standard names
 loadNativeLib(directories);
 



git commit: ACCUMULO-1864 Drop provided scope and add explicit dependencies

2013-12-06 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 5a179cf87 - 7189bb2d2


ACCUMULO-1864 Drop provided scope and add explicit dependencies


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 7189bb2d2e5744e43c19dacb8b50f17540d67565
Parents: 5a179cf
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 6 19:33:17 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 6 19:33:17 2013 -0500

--
 core/pom.xml| 59 
 examples/simple/pom.xml | 41 +++---
 fate/pom.xml|  3 -
 minicluster/pom.xml | 25 -
 .../apache/accumulo/minicluster/MemoryUnit.java | 14 ++---
 .../minicluster/MiniAccumuloInstance.java   |  4 +-
 .../minicluster/MiniAccumuloRunner.java | 48 
 .../minicluster/ProcessNotFoundException.java   |  2 +-
 .../accumulo/minicluster/ProcessReference.java  |  6 +-
 proxy/pom.xml   | 28 --
 server/extras/pom.xml   | 19 +++
 server/gc/pom.xml   | 19 +++
 server/master/pom.xml   | 28 --
 server/monitor/pom.xml  | 29 --
 server/tracer/pom.xml   | 19 +++
 server/tserver/pom.xml  | 55 --
 start/pom.xml   | 12 ++--
 test/pom.xml| 54 +-
 trace/pom.xml   | 11 ++--
 19 files changed, 211 insertions(+), 265 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7189bb2d/core/pom.xml
--
diff --git a/core/pom.xml b/core/pom.xml
index 0a3fe64..10c9bdd 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -35,83 +35,72 @@
   artifactIdguava/artifactId
 /dependency
 dependency
-  groupIdjline/groupId
-  artifactIdjline/artifactId
-/dependency
-dependency
-  groupIdorg.apache.accumulo/groupId
-  artifactIdaccumulo-fate/artifactId
-/dependency
-dependency
-  groupIdorg.apache.accumulo/groupId
-  artifactIdaccumulo-start/artifactId
-/dependency
-dependency
-  groupIdorg.apache.accumulo/groupId
-  artifactIdaccumulo-trace/artifactId
-/dependency
-dependency
-  groupIdorg.apache.commons/groupId
-  artifactIdcommons-vfs2/artifactId
-/dependency
-dependency
-  groupIdorg.apache.thrift/groupId
-  artifactIdlibthrift/artifactId
-/dependency
-dependency
   groupIdcommons-cli/groupId
   artifactIdcommons-cli/artifactId
-  scopeprovided/scope
 /dependency
 dependency
   groupIdcommons-codec/groupId
   artifactIdcommons-codec/artifactId
-  scopeprovided/scope
 /dependency
 dependency
   groupIdcommons-collections/groupId
   artifactIdcommons-collections/artifactId
-  scopeprovided/scope
 /dependency
 dependency
   groupIdcommons-configuration/groupId
   artifactIdcommons-configuration/artifactId
-  scopeprovided/scope
 /dependency
 dependency
   groupIdcommons-io/groupId
   artifactIdcommons-io/artifactId
-  scopeprovided/scope
 /dependency
 dependency
   groupIdcommons-lang/groupId
   artifactIdcommons-lang/artifactId
-  scopeprovided/scope
 /dependency
 dependency
   groupIdcommons-logging/groupId
   artifactIdcommons-logging/artifactId
-  scopeprovided/scope
+/dependency
+dependency
+  groupIdjline/groupId
+  artifactIdjline/artifactId
 /dependency
 dependency
   groupIdlog4j/groupId
   artifactIdlog4j/artifactId
-  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.accumulo/groupId
+  artifactIdaccumulo-fate/artifactId
+/dependency
+dependency
+  groupIdorg.apache.accumulo/groupId
+  artifactIdaccumulo-start/artifactId
+/dependency
+dependency
+  groupIdorg.apache.accumulo/groupId
+  artifactIdaccumulo-trace/artifactId
+/dependency
+dependency
+  groupIdorg.apache.commons/groupId
+  artifactIdcommons-vfs2/artifactId
 /dependency
 dependency
   groupIdorg.apache.hadoop/groupId
   artifactIdhadoop-client/artifactId
-  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.thrift/groupId
+  

git commit: ACCUMULO-1942 Make zookeeper provided in example pom

2013-12-06 Thread ctubbsii
Updated Branches:
  refs/heads/1.5.1-SNAPSHOT b9adbd7d6 - 072ed6186


ACCUMULO-1942 Make zookeeper provided in example pom


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: 072ed61863bec0ee74d8a95bc82a2c81a0c5db5a
Parents: b9adbd7
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 6 22:42:55 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 6 22:42:55 2013 -0500

--
 examples/simple/pom.xml | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/072ed618/examples/simple/pom.xml
--
diff --git a/examples/simple/pom.xml b/examples/simple/pom.xml
index ff9376c..d513e68 100644
--- a/examples/simple/pom.xml
+++ b/examples/simple/pom.xml
@@ -34,10 +34,6 @@
   artifactIdaccumulo-core/artifactId
 /dependency
 dependency
-  groupIdorg.apache.zookeeper/groupId
-  artifactIdzookeeper/artifactId
-/dependency
-dependency
   groupIdcommons-cli/groupId
   artifactIdcommons-cli/artifactId
   scopeprovided/scope
@@ -68,6 +64,11 @@
   scopeprovided/scope
 /dependency
 dependency
+  groupIdorg.apache.zookeeper/groupId
+  artifactIdzookeeper/artifactId
+  scopeprovided/scope
+/dependency
+dependency
   groupIdjunit/groupId
   artifactIdjunit/artifactId
   scopetest/scope



[2/2] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

2013-12-06 Thread ctubbsii
Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

Conflicts:
examples/simple/pom.xml


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 352dc1b8ba693fc0ed53a9610eed052daf3be1b5
Parents: 7189bb2 072ed61
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 6 22:47:12 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 6 22:47:12 2013 -0500

--

--




[2/4] git commit: ACCUMULO-1942 Make zookeeper provided in example pom

2013-12-06 Thread ctubbsii
ACCUMULO-1942 Make zookeeper provided in example pom


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

Branch: refs/heads/master
Commit: 072ed61863bec0ee74d8a95bc82a2c81a0c5db5a
Parents: b9adbd7
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 6 22:42:55 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 6 22:42:55 2013 -0500

--
 examples/simple/pom.xml | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/072ed618/examples/simple/pom.xml
--
diff --git a/examples/simple/pom.xml b/examples/simple/pom.xml
index ff9376c..d513e68 100644
--- a/examples/simple/pom.xml
+++ b/examples/simple/pom.xml
@@ -34,10 +34,6 @@
   artifactIdaccumulo-core/artifactId
 /dependency
 dependency
-  groupIdorg.apache.zookeeper/groupId
-  artifactIdzookeeper/artifactId
-/dependency
-dependency
   groupIdcommons-cli/groupId
   artifactIdcommons-cli/artifactId
   scopeprovided/scope
@@ -68,6 +64,11 @@
   scopeprovided/scope
 /dependency
 dependency
+  groupIdorg.apache.zookeeper/groupId
+  artifactIdzookeeper/artifactId
+  scopeprovided/scope
+/dependency
+dependency
   groupIdjunit/groupId
   artifactIdjunit/artifactId
   scopetest/scope



[3/4] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

2013-12-06 Thread ctubbsii
Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

Conflicts:
examples/simple/pom.xml


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

Branch: refs/heads/master
Commit: 352dc1b8ba693fc0ed53a9610eed052daf3be1b5
Parents: 7189bb2 072ed61
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 6 22:47:12 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 6 22:47:12 2013 -0500

--

--




[1/4] git commit: ACCUMULO-1864 Drop provided scope and add explicit dependencies

2013-12-06 Thread ctubbsii
Updated Branches:
  refs/heads/master 4832f90ec - 0bec52b51


ACCUMULO-1864 Drop provided scope and add explicit dependencies


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

Branch: refs/heads/master
Commit: 7189bb2d2e5744e43c19dacb8b50f17540d67565
Parents: 5a179cf
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 6 19:33:17 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 6 19:33:17 2013 -0500

--
 core/pom.xml| 59 
 examples/simple/pom.xml | 41 +++---
 fate/pom.xml|  3 -
 minicluster/pom.xml | 25 -
 .../apache/accumulo/minicluster/MemoryUnit.java | 14 ++---
 .../minicluster/MiniAccumuloInstance.java   |  4 +-
 .../minicluster/MiniAccumuloRunner.java | 48 
 .../minicluster/ProcessNotFoundException.java   |  2 +-
 .../accumulo/minicluster/ProcessReference.java  |  6 +-
 proxy/pom.xml   | 28 --
 server/extras/pom.xml   | 19 +++
 server/gc/pom.xml   | 19 +++
 server/master/pom.xml   | 28 --
 server/monitor/pom.xml  | 29 --
 server/tracer/pom.xml   | 19 +++
 server/tserver/pom.xml  | 55 --
 start/pom.xml   | 12 ++--
 test/pom.xml| 54 +-
 trace/pom.xml   | 11 ++--
 19 files changed, 211 insertions(+), 265 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7189bb2d/core/pom.xml
--
diff --git a/core/pom.xml b/core/pom.xml
index 0a3fe64..10c9bdd 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -35,83 +35,72 @@
   artifactIdguava/artifactId
 /dependency
 dependency
-  groupIdjline/groupId
-  artifactIdjline/artifactId
-/dependency
-dependency
-  groupIdorg.apache.accumulo/groupId
-  artifactIdaccumulo-fate/artifactId
-/dependency
-dependency
-  groupIdorg.apache.accumulo/groupId
-  artifactIdaccumulo-start/artifactId
-/dependency
-dependency
-  groupIdorg.apache.accumulo/groupId
-  artifactIdaccumulo-trace/artifactId
-/dependency
-dependency
-  groupIdorg.apache.commons/groupId
-  artifactIdcommons-vfs2/artifactId
-/dependency
-dependency
-  groupIdorg.apache.thrift/groupId
-  artifactIdlibthrift/artifactId
-/dependency
-dependency
   groupIdcommons-cli/groupId
   artifactIdcommons-cli/artifactId
-  scopeprovided/scope
 /dependency
 dependency
   groupIdcommons-codec/groupId
   artifactIdcommons-codec/artifactId
-  scopeprovided/scope
 /dependency
 dependency
   groupIdcommons-collections/groupId
   artifactIdcommons-collections/artifactId
-  scopeprovided/scope
 /dependency
 dependency
   groupIdcommons-configuration/groupId
   artifactIdcommons-configuration/artifactId
-  scopeprovided/scope
 /dependency
 dependency
   groupIdcommons-io/groupId
   artifactIdcommons-io/artifactId
-  scopeprovided/scope
 /dependency
 dependency
   groupIdcommons-lang/groupId
   artifactIdcommons-lang/artifactId
-  scopeprovided/scope
 /dependency
 dependency
   groupIdcommons-logging/groupId
   artifactIdcommons-logging/artifactId
-  scopeprovided/scope
+/dependency
+dependency
+  groupIdjline/groupId
+  artifactIdjline/artifactId
 /dependency
 dependency
   groupIdlog4j/groupId
   artifactIdlog4j/artifactId
-  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.accumulo/groupId
+  artifactIdaccumulo-fate/artifactId
+/dependency
+dependency
+  groupIdorg.apache.accumulo/groupId
+  artifactIdaccumulo-start/artifactId
+/dependency
+dependency
+  groupIdorg.apache.accumulo/groupId
+  artifactIdaccumulo-trace/artifactId
+/dependency
+dependency
+  groupIdorg.apache.commons/groupId
+  artifactIdcommons-vfs2/artifactId
 /dependency
 dependency
   groupIdorg.apache.hadoop/groupId
   artifactIdhadoop-client/artifactId
-  scopeprovided/scope
+/dependency
+dependency
+  groupIdorg.apache.thrift/groupId
+  artifactIdlibthrift/artifactId
 

[4/4] git commit: Merge branch '1.6.0-SNAPSHOT'

2013-12-06 Thread ctubbsii
Merge branch '1.6.0-SNAPSHOT'


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

Branch: refs/heads/master
Commit: 0bec52b51be05641144089dcc427644a511f658f
Parents: 4832f90 352dc1b
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 6 22:47:43 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 6 22:47:43 2013 -0500

--
 core/pom.xml| 59 
 examples/simple/pom.xml | 41 +++---
 fate/pom.xml|  3 -
 minicluster/pom.xml | 25 -
 .../apache/accumulo/minicluster/MemoryUnit.java | 14 ++---
 .../minicluster/MiniAccumuloInstance.java   |  4 +-
 .../minicluster/MiniAccumuloRunner.java | 48 
 .../minicluster/ProcessNotFoundException.java   |  2 +-
 .../accumulo/minicluster/ProcessReference.java  |  6 +-
 proxy/pom.xml   | 28 --
 server/extras/pom.xml   | 19 +++
 server/gc/pom.xml   | 19 +++
 server/master/pom.xml   | 28 --
 server/monitor/pom.xml  | 29 --
 server/tracer/pom.xml   | 19 +++
 server/tserver/pom.xml  | 55 --
 start/pom.xml   | 12 ++--
 test/pom.xml| 54 +-
 trace/pom.xml   | 11 ++--
 19 files changed, 211 insertions(+), 265 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/core/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/examples/simple/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/fate/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/minicluster/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/proxy/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/server/extras/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/server/gc/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/server/master/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/server/monitor/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/server/tracer/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/server/tserver/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/start/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/test/pom.xml
--

http://git-wip-us.apache.org/repos/asf/accumulo/blob/0bec52b5/trace/pom.xml
--



[2/4] git commit: ACCUMULO-1992 Remove CachedConfiguration from examples

2013-12-11 Thread ctubbsii
ACCUMULO-1992 Remove CachedConfiguration from examples


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 7b7521dd92b81f4c91eae2415f6d835944b15355
Parents: 5f90d0b
Author: Christopher Tubbs ctubb...@apache.org
Authored: Mon Dec 9 13:22:21 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 11 16:59:48 2013 -0500

--
 .../simple/filedata/CharacterHistogram.java | 28 +++---
 .../examples/simple/mapreduce/NGramIngest.java  | 36 
 .../examples/simple/mapreduce/RegexExample.java | 24 ++---
 .../examples/simple/mapreduce/RowHash.java  | 22 ++---
 .../examples/simple/mapreduce/TableToFile.java  | 28 +++---
 .../simple/mapreduce/TeraSortIngest.java| 97 ++--
 .../simple/mapreduce/TokenFileWordCount.java| 33 +++
 .../simple/mapreduce/UniqueColumns.java | 44 -
 .../examples/simple/mapreduce/WordCount.java| 29 +++---
 .../mapreduce/bulk/BulkIngestExample.java   | 51 +-
 .../simple/mapreduce/bulk/GenerateTestData.java | 20 ++--
 .../simple/filedata/ChunkInputFormatTest.java   | 58 ++--
 12 files changed, 235 insertions(+), 235 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7b7521dd/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/CharacterHistogram.java
--
diff --git 
a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/CharacterHistogram.java
 
b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/CharacterHistogram.java
index 11eda3e..d0662b6 100644
--- 
a/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/CharacterHistogram.java
+++ 
b/examples/simple/src/main/java/org/apache/accumulo/examples/simple/filedata/CharacterHistogram.java
@@ -29,8 +29,8 @@ import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.user.SummingArrayCombiner;
 import org.apache.accumulo.core.security.ColumnVisibility;
-import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.examples.simple.mapreduce.JobUtil;
+import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.mapreduce.Job;
@@ -46,14 +46,15 @@ import com.beust.jcommander.Parameter;
  */
 public class CharacterHistogram extends Configured implements Tool {
   public static final String VIS = vis;
-  
+
   public static void main(String[] args) throws Exception {
-System.exit(ToolRunner.run(CachedConfiguration.getInstance(), new 
CharacterHistogram(), args));
+System.exit(ToolRunner.run(new Configuration(), new CharacterHistogram(), 
args));
   }
-  
+
   public static class HistMapper extends 
MapperListEntryKey,Value,InputStream,Text,Mutation {
 private ColumnVisibility cv;
-
+
+@Override
 public void map(ListEntryKey,Value k, InputStream v, Context context) 
throws IOException, InterruptedException {
   Long[] hist = new Long[256];
   for (int i = 0; i  hist.length; i++)
@@ -68,19 +69,18 @@ public class CharacterHistogram extends Configured 
implements Tool {
   m.put(info, hist, cv, new 
Value(SummingArrayCombiner.STRING_ARRAY_ENCODER.encode(Arrays.asList(hist;
   context.write(new Text(), m);
 }
-
+
 @Override
 protected void setup(Context context) throws IOException, 
InterruptedException {
   cv = new ColumnVisibility(context.getConfiguration().get(VIS, ));
 }
   }
-  
+
   static class Opts extends ClientOnRequiredTable {
-@Parameter(names=--vis)
+@Parameter(names = --vis)
 String visibilities = ;
   }
-  
-  
+
   @Override
   public int run(String[] args) throws Exception {
 Job job = JobUtil.getJob(getConf());
@@ -93,15 +93,15 @@ public class CharacterHistogram extends Configured 
implements Tool {
 job.setInputFormatClass(ChunkInputFormat.class);
 opts.setAccumuloConfigs(job);
 job.getConfiguration().set(VIS, opts.visibilities.toString());
-
+
 job.setMapperClass(HistMapper.class);
 job.setMapOutputKeyClass(Text.class);
 job.setMapOutputValueClass(Mutation.class);
-
+
 job.setNumReduceTasks(0);
-
+
 job.setOutputFormatClass(AccumuloOutputFormat.class);
-
+
 job.waitForCompletion(true);
 return job.isSuccessful() ? 0 : 1;
   }


[3/4] ACCUMULO-1599 Stop using /tmp wherever possible

2013-12-11 Thread ctubbsii
http://git-wip-us.apache.org/repos/asf/accumulo/blob/c1fbeac5/test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterTest.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterTest.java 
b/test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterTest.java
deleted file mode 100644
index b92eede..000
--- a/test/src/test/java/org/apache/accumulo/test/MultiTableBatchWriterTest.java
+++ /dev/null
@@ -1,565 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the License); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.test;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.accumulo.core.client.BatchWriter;
-import org.apache.accumulo.core.client.BatchWriterConfig;
-import org.apache.accumulo.core.client.ClientConfiguration;
-import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.client.MultiTableBatchWriter;
-import org.apache.accumulo.core.client.MutationsRejectedException;
-import org.apache.accumulo.core.client.Scanner;
-import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.client.TableOfflineException;
-import org.apache.accumulo.core.client.ZooKeeperInstance;
-import org.apache.accumulo.core.client.admin.TableOperations;
-import org.apache.accumulo.core.client.impl.MultiTableBatchWriterImpl;
-import org.apache.accumulo.core.client.security.tokens.PasswordToken;
-import org.apache.accumulo.core.data.Key;
-import org.apache.accumulo.core.data.Mutation;
-import org.apache.accumulo.core.data.Range;
-import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.security.Credentials;
-import org.apache.accumulo.minicluster.MiniAccumuloCluster;
-import org.apache.accumulo.minicluster.MiniAccumuloConfig;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
-
-import com.google.common.collect.Maps;
-
-public class MultiTableBatchWriterTest {
-  public static TemporaryFolder folder = new TemporaryFolder();
-  public static MiniAccumuloCluster cluster;
-  private static final PasswordToken password = new PasswordToken(secret);
-
-  @BeforeClass
-  public static void setUpBeforeClass() throws Exception {
-folder.create();
-MiniAccumuloConfig cfg = new 
MiniAccumuloConfig(folder.newFolder(miniAccumulo), new 
String(password.getPassword()));
-cluster = new MiniAccumuloCluster(cfg);
-cluster.start();
-  }
-
-  @AfterClass
-  public static void tearDownAfterClass() throws Exception {
-cluster.stop();
-folder.delete();
-  }
-
-  @Test
-  public void testTableRenameDataValidation() throws Exception {
-ZooKeeperInstance instance = new ZooKeeperInstance(new 
ClientConfiguration().withInstance(cluster.getInstanceName()).withZkHosts(cluster.getZooKeepers()));
-Connector connector = instance.getConnector(root, password);
-
-BatchWriterConfig config = new BatchWriterConfig();
-
-Credentials creds = new Credentials(root, password);
-MultiTableBatchWriter mtbw = new MultiTableBatchWriterImpl(instance, 
creds, config, 60, TimeUnit.SECONDS);
-
-try {
-  final String table1 = testTableRenameDataValidation_table1, table2 = 
testTableRenameDataValidation_table2;
-
-  TableOperations tops = connector.tableOperations();
-  tops.create(table1);
-
-  BatchWriter bw1 = mtbw.getBatchWriter(table1);
-
-  Mutation m1 = new Mutation(foo);
-  m1.put(col1, , val1);
-
-  bw1.addMutation(m1);
-
-  tops.rename(table1, table2);
-  tops.create(table1);
-
-  BatchWriter bw2 = mtbw.getBatchWriter(table1);
-
-  Mutation m2 = new Mutation(bar);
-  m2.put(col1, , val1);
-
-  bw1.addMutation(m2);
-  bw2.addMutation(m2);
-
-  mtbw.close();
-
-  MapEntryString,String,String table1Expectations = new 
HashMapEntryString,String,String();
-  table1Expectations.put(Maps.immutableEntry(bar, col1), val1);
-
-  MapEntryString,String,String 

[1/4] git commit: ACCUMULO-1981 Convert inert class to unit test

2013-12-11 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 5f90d0b8a - c1fbeac50


ACCUMULO-1981 Convert inert class to unit test


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 96956216c406eb7f2ba4f149933afcb5a02c9edd
Parents: 7b7521d
Author: Christopher Tubbs ctubb...@apache.org
Authored: Mon Dec 9 13:38:07 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 11 16:59:48 2013 -0500

--
 .../core/file/BloomFilterLayerLookupTest.java   | 121 ++-
 1 file changed, 63 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/96956216/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
--
diff --git 
a/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
 
b/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
index 3078daf..24bde38 100644
--- 
a/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
+++ 
b/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
@@ -16,8 +16,10 @@
  */
 package org.apache.accumulo.core.file;
 
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
 import java.io.IOException;
-import java.io.PrintStream;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
@@ -27,114 +29,117 @@ import 
org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.ConfigurationCopy;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.ByteSequence;
+import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.PartialKey;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.file.keyfunctor.ColumnFamilyFunctor;
 import org.apache.accumulo.core.file.rfile.RFile;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.io.Text;
+import org.apache.log4j.Logger;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import org.junit.rules.TestName;
 
 public class BloomFilterLayerLookupTest {
-  public static void main(String[] args) throws IOException {
-PrintStream out = System.out;
-
-Random r = new Random();
-
+
+  private static final Logger LOG = 
Logger.getLogger(BloomFilterLayerLookupTest.class);
+  private static Random random = new Random();
+
+  @Rule
+  public TestName testName = new TestName();
+
+  @Rule
+  public TemporaryFolder tempDir = new TemporaryFolder(new 
File(System.getProperty(user.dir) + /target));
+
+  @Test
+  public void test() throws IOException {
 HashSetInteger valsSet = new HashSetInteger();
-
 for (int i = 0; i  10; i++) {
-  valsSet.add(r.nextInt(Integer.MAX_VALUE));
+  valsSet.add(random.nextInt(Integer.MAX_VALUE));
 }
-
+
 ArrayListInteger vals = new ArrayListInteger(valsSet);
 Collections.sort(vals);
-
+
 ConfigurationCopy acuconf = new 
ConfigurationCopy(AccumuloConfiguration.getDefaultConfiguration());
 acuconf.set(Property.TABLE_BLOOM_ENABLED, true);
-acuconf.set(Property.TABLE_BLOOM_KEY_FUNCTOR, 
accumulo.core.file.keyfunctor.ColumnFamilyFunctor);
+acuconf.set(Property.TABLE_BLOOM_KEY_FUNCTOR, 
ColumnFamilyFunctor.class.getName());
 acuconf.set(Property.TABLE_FILE_TYPE, RFile.EXTENSION);
 acuconf.set(Property.TABLE_BLOOM_LOAD_THRESHOLD, 1);
 acuconf.set(Property.TSERV_BLOOM_LOAD_MAXCONCURRENT, 1);
-
+
 Configuration conf = CachedConfiguration.getInstance();
 FileSystem fs = FileSystem.get(conf);
-
+
+// get output file name
 String suffix = FileOperations.getNewFileExtension(acuconf);
-String fname = /tmp/test. + suffix;
+String fname = new File(tempDir.getRoot(), testName + . + 
suffix).getAbsolutePath();
 FileSKVWriter bmfw = FileOperations.getInstance().openWriter(fname, fs, 
conf, acuconf);
-
+
+// write data to file
 long t1 = System.currentTimeMillis();
-
 bmfw.startDefaultLocalityGroup();
-
 for (Integer i : vals) {
   String fi = String.format(%010d, i);
-  bmfw.append(new org.apache.accumulo.core.data.Key(new Text(r + fi), 
new Text(cf1)), new Value((v + fi).getBytes()));
-  bmfw.append(new org.apache.accumulo.core.data.Key(new Text(r + fi), 
new Text(cf2)), new Value((v + fi).getBytes()));
+  

[2/6] git commit: ACCUMULO-1981 Convert inert class to unit test

2013-12-11 Thread ctubbsii
ACCUMULO-1981 Convert inert class to unit test


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

Branch: refs/heads/master
Commit: 96956216c406eb7f2ba4f149933afcb5a02c9edd
Parents: 7b7521d
Author: Christopher Tubbs ctubb...@apache.org
Authored: Mon Dec 9 13:38:07 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Dec 11 16:59:48 2013 -0500

--
 .../core/file/BloomFilterLayerLookupTest.java   | 121 ++-
 1 file changed, 63 insertions(+), 58 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/96956216/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
--
diff --git 
a/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
 
b/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
index 3078daf..24bde38 100644
--- 
a/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
+++ 
b/core/src/test/java/org/apache/accumulo/core/file/BloomFilterLayerLookupTest.java
@@ -16,8 +16,10 @@
  */
 package org.apache.accumulo.core.file;
 
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
 import java.io.IOException;
-import java.io.PrintStream;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
@@ -27,114 +29,117 @@ import 
org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.ConfigurationCopy;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.ByteSequence;
+import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.PartialKey;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.file.keyfunctor.ColumnFamilyFunctor;
 import org.apache.accumulo.core.file.rfile.RFile;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.io.Text;
+import org.apache.log4j.Logger;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import org.junit.rules.TestName;
 
 public class BloomFilterLayerLookupTest {
-  public static void main(String[] args) throws IOException {
-PrintStream out = System.out;
-
-Random r = new Random();
-
+
+  private static final Logger LOG = 
Logger.getLogger(BloomFilterLayerLookupTest.class);
+  private static Random random = new Random();
+
+  @Rule
+  public TestName testName = new TestName();
+
+  @Rule
+  public TemporaryFolder tempDir = new TemporaryFolder(new 
File(System.getProperty(user.dir) + /target));
+
+  @Test
+  public void test() throws IOException {
 HashSetInteger valsSet = new HashSetInteger();
-
 for (int i = 0; i  10; i++) {
-  valsSet.add(r.nextInt(Integer.MAX_VALUE));
+  valsSet.add(random.nextInt(Integer.MAX_VALUE));
 }
-
+
 ArrayListInteger vals = new ArrayListInteger(valsSet);
 Collections.sort(vals);
-
+
 ConfigurationCopy acuconf = new 
ConfigurationCopy(AccumuloConfiguration.getDefaultConfiguration());
 acuconf.set(Property.TABLE_BLOOM_ENABLED, true);
-acuconf.set(Property.TABLE_BLOOM_KEY_FUNCTOR, 
accumulo.core.file.keyfunctor.ColumnFamilyFunctor);
+acuconf.set(Property.TABLE_BLOOM_KEY_FUNCTOR, 
ColumnFamilyFunctor.class.getName());
 acuconf.set(Property.TABLE_FILE_TYPE, RFile.EXTENSION);
 acuconf.set(Property.TABLE_BLOOM_LOAD_THRESHOLD, 1);
 acuconf.set(Property.TSERV_BLOOM_LOAD_MAXCONCURRENT, 1);
-
+
 Configuration conf = CachedConfiguration.getInstance();
 FileSystem fs = FileSystem.get(conf);
-
+
+// get output file name
 String suffix = FileOperations.getNewFileExtension(acuconf);
-String fname = /tmp/test. + suffix;
+String fname = new File(tempDir.getRoot(), testName + . + 
suffix).getAbsolutePath();
 FileSKVWriter bmfw = FileOperations.getInstance().openWriter(fname, fs, 
conf, acuconf);
-
+
+// write data to file
 long t1 = System.currentTimeMillis();
-
 bmfw.startDefaultLocalityGroup();
-
 for (Integer i : vals) {
   String fi = String.format(%010d, i);
-  bmfw.append(new org.apache.accumulo.core.data.Key(new Text(r + fi), 
new Text(cf1)), new Value((v + fi).getBytes()));
-  bmfw.append(new org.apache.accumulo.core.data.Key(new Text(r + fi), 
new Text(cf2)), new Value((v + fi).getBytes()));
+  bmfw.append(new Key(new Text(r + fi), new Text(cf1)), new Value((v 
+ 

git commit: ACCUMULO-2011 Escape unescaped underscores to fix LaTeX

2013-12-13 Thread ctubbsii
Updated Branches:
  refs/heads/1.4.5-SNAPSHOT 72106a626 - 07a0433bd


ACCUMULO-2011 Escape unescaped underscores to fix LaTeX


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

Branch: refs/heads/1.4.5-SNAPSHOT
Commit: 07a0433bd73295d733bc3430db64de86b4088ea3
Parents: 72106a6
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 13 16:05:46 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 13 16:05:46 2013 -0500

--
 docs/src/user_manual/chapters/administration.tex | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/07a0433b/docs/src/user_manual/chapters/administration.tex
--
diff --git a/docs/src/user_manual/chapters/administration.tex 
b/docs/src/user_manual/chapters/administration.tex
index d0533d9..4723481 100644
--- a/docs/src/user_manual/chapters/administration.tex
+++ b/docs/src/user_manual/chapters/administration.tex
@@ -186,14 +186,14 @@ take some time for particular configurations.
 
 \subsection{Adding a Node}
 
-Update your \texttt{\$ACCUMULO_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO_CONF_DIR/slaves}) file to account for the addition.
+Update your \texttt{\$ACCUMULO\_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO\_CONF\_DIR/slaves}) file to account for the addition.
 
 \begin{verbatim}
 $ACCUMULO_HOME/bin/accumulo admin start host(s) {host ...}
 \end{verbatim}
 
 Alternatively, you can ssh to each of the hosts you want to add and run 
-\texttt{\$ACCUMULO_HOME/bin/start-here.sh}.
+\texttt{\$ACCUMULO\_HOME/bin/start-here.sh}.
 
 Make sure the host in question has the new configuration, or else the tablet 
 server won't start; at a minimum this needs to be on the host(s) being added, 
@@ -209,9 +209,9 @@ $ACCUMULO_HOME/bin/accumulo admin stop host(s) {host 
...}
 \end{verbatim}
 
 Alternatively, you can ssh to each of the hosts you want to remove and run 
-\texttt{\$ACCUMULO_HOME/bin/stop-here.sh}.
+\texttt{\$ACCUMULO\_HOME/bin/stop-here.sh}.
 
-Be sure to update your \texttt{\$ACCUMULO_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO_CONF_DIR/slaves}) file to 
+Be sure to update your \texttt{\$ACCUMUL\_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO\_CONF\_DIR/slaves}) file to 
 account for the removal of these hosts. Bear in mind that the monitor will not 
re-read the 
 slaves file automatically, so it will report the decomissioned servers as 
down; it's 
 recommended that you restart the monitor so that the node list is up to date.



[2/2] git commit: Merge remote-tracking branch 'origin/1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT

2013-12-13 Thread ctubbsii
Merge remote-tracking branch 'origin/1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: b65bdd60cd928e05da91d0b22658fac4c638624f
Parents: 5fa1a75 07a0433
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 13 16:46:04 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 13 16:46:04 2013 -0500

--
 .../latex/accumulo_user_manual/chapters/administration.tex   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b65bdd60/docs/src/main/latex/accumulo_user_manual/chapters/administration.tex
--
diff --cc docs/src/main/latex/accumulo_user_manual/chapters/administration.tex
index 086f41c,000..204f549
mode 100644,00..100644
--- a/docs/src/main/latex/accumulo_user_manual/chapters/administration.tex
+++ b/docs/src/main/latex/accumulo_user_manual/chapters/administration.tex
@@@ -1,394 -1,0 +1,394 @@@
 +
 +% Licensed to the Apache Software Foundation (ASF) under one or more
 +% contributor license agreements. See the NOTICE file distributed with
 +% this work for additional information regarding copyright ownership.
 +% The ASF licenses this file to You under the Apache License, Version 2.0
 +% (the License); you may not use this file except in compliance with
 +% the License. You may obtain a copy of the License at
 +%
 +% http://www.apache.org/licenses/LICENSE-2.0
 +%
 +% Unless required by applicable law or agreed to in writing, software
 +% distributed under the License is distributed on an AS IS BASIS,
 +% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +% See the License for the specific language governing permissions and
 +% limitations under the License.
 +
 +\chapter{Administration}
 +
 +\section{Hardware}
 +
 +Because we are running essentially two or three systems simultaneously layered
 +across the cluster: HDFS, Accumulo and MapReduce, it is typical for hardware 
to
 +consist of 4 to 8 cores, and 8 to 32 GB RAM. This is so each running process 
can have
 +at least one core and 2 - 4 GB each.
 +
 +One core running HDFS can typically keep 2 to 4 disks busy, so each machine 
may
 +typically have as little as 2 x 300GB disks and as much as 4 x 1TB or 2TB 
disks.
 +
 +It is possible to do with less than this, such as with 1u servers with 2 
cores and 4GB
 +each, but in this case it is recommended to only run up to two processes per
 +machine - i.e. DataNode and TabletServer or DataNode and MapReduce worker but
 +not all three. The constraint here is having enough available heap space for 
all the
 +processes on a machine.
 +
 +\section{Network}
 +
 +Accumulo communicates via remote procedure calls over TCP/IP for both passing
 +data and control messages. In addition, Accumulo uses HDFS clients to
 +communicate with HDFS. To achieve good ingest and query performance, 
sufficient
 +network bandwidth must be available between any two machines.
 +
 +\section{Installation}
 +Choose a directory for the Accumulo installation. This directory will be 
referenced
 +by the environment variable \texttt{\$ACCUMULO\_HOME}. Run the following:
 +
 +\small
 +\begin{verbatim}
 +$ tar xzf accumulo-1.5.0-bin.tar.gz# unpack to subdirectory
 +$ mv accumulo-1.5.0 $ACCUMULO_HOME # move to desired location
 +\end{verbatim}
 +\normalsize
 +
 +Repeat this step at each machine within the cluster. Usually all machines 
have the
 +same \texttt{\$ACCUMULO\_HOME}.
 +
 +\section{Dependencies}
 +Accumulo requires HDFS and ZooKeeper to be configured and running
 +before starting. Password-less SSH should be configured between at least the
 +Accumulo master and TabletServer machines. It is also a good idea to run 
Network
 +Time Protocol (NTP) within the cluster to ensure nodes' clocks don't get too 
out of
 +sync, which can cause problems with automatically timestamped data. 
 +
 +\section{Configuration}
 +
 +Accumulo is configured by editing several Shell and XML files found in
 +\texttt{\$ACCUMULO\_HOME/conf}. The structure closely resembles Hadoop's 
configuration
 +files.
 +
 +\subsection{Edit conf/accumulo-env.sh}
 +
 +Accumulo needs to know where to find the software it depends on. Edit 
accumulo-env.sh 
 +and specify the following:
 +
 +\begin{enumerate}
 +\item{Enter the location of the installation directory of Accumulo for 
\texttt{\$ACCUMULO\_HOME}}
 +\item{Enter your system's Java home for \texttt{\$JAVA\_HOME}}
 +\item{Enter the location of Hadoop for \texttt{\$HADOOP\_PREFIX}}
 +\item{Choose 

[1/2] git commit: ACCUMULO-2011 Escape unescaped underscores to fix LaTeX

2013-12-13 Thread ctubbsii
Updated Branches:
  refs/heads/1.5.1-SNAPSHOT 5fa1a75e3 - b65bdd60c


ACCUMULO-2011 Escape unescaped underscores to fix LaTeX


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: 07a0433bd73295d733bc3430db64de86b4088ea3
Parents: 72106a6
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 13 16:05:46 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 13 16:05:46 2013 -0500

--
 docs/src/user_manual/chapters/administration.tex | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/07a0433b/docs/src/user_manual/chapters/administration.tex
--
diff --git a/docs/src/user_manual/chapters/administration.tex 
b/docs/src/user_manual/chapters/administration.tex
index d0533d9..4723481 100644
--- a/docs/src/user_manual/chapters/administration.tex
+++ b/docs/src/user_manual/chapters/administration.tex
@@ -186,14 +186,14 @@ take some time for particular configurations.
 
 \subsection{Adding a Node}
 
-Update your \texttt{\$ACCUMULO_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO_CONF_DIR/slaves}) file to account for the addition.
+Update your \texttt{\$ACCUMULO\_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO\_CONF\_DIR/slaves}) file to account for the addition.
 
 \begin{verbatim}
 $ACCUMULO_HOME/bin/accumulo admin start host(s) {host ...}
 \end{verbatim}
 
 Alternatively, you can ssh to each of the hosts you want to add and run 
-\texttt{\$ACCUMULO_HOME/bin/start-here.sh}.
+\texttt{\$ACCUMULO\_HOME/bin/start-here.sh}.
 
 Make sure the host in question has the new configuration, or else the tablet 
 server won't start; at a minimum this needs to be on the host(s) being added, 
@@ -209,9 +209,9 @@ $ACCUMULO_HOME/bin/accumulo admin stop host(s) {host 
...}
 \end{verbatim}
 
 Alternatively, you can ssh to each of the hosts you want to remove and run 
-\texttt{\$ACCUMULO_HOME/bin/stop-here.sh}.
+\texttt{\$ACCUMULO\_HOME/bin/stop-here.sh}.
 
-Be sure to update your \texttt{\$ACCUMULO_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO_CONF_DIR/slaves}) file to 
+Be sure to update your \texttt{\$ACCUMUL\_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO\_CONF\_DIR/slaves}) file to 
 account for the removal of these hosts. Bear in mind that the monitor will not 
re-read the 
 slaves file automatically, so it will report the decomissioned servers as 
down; it's 
 recommended that you restart the monitor so that the node list is up to date.



[1/3] git commit: ACCUMULO-2011 Escape unescaped underscores to fix LaTeX

2013-12-13 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 624829969 - f6a3f907b


ACCUMULO-2011 Escape unescaped underscores to fix LaTeX


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 07a0433bd73295d733bc3430db64de86b4088ea3
Parents: 72106a6
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 13 16:05:46 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 13 16:05:46 2013 -0500

--
 docs/src/user_manual/chapters/administration.tex | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/07a0433b/docs/src/user_manual/chapters/administration.tex
--
diff --git a/docs/src/user_manual/chapters/administration.tex 
b/docs/src/user_manual/chapters/administration.tex
index d0533d9..4723481 100644
--- a/docs/src/user_manual/chapters/administration.tex
+++ b/docs/src/user_manual/chapters/administration.tex
@@ -186,14 +186,14 @@ take some time for particular configurations.
 
 \subsection{Adding a Node}
 
-Update your \texttt{\$ACCUMULO_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO_CONF_DIR/slaves}) file to account for the addition.
+Update your \texttt{\$ACCUMULO\_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO\_CONF\_DIR/slaves}) file to account for the addition.
 
 \begin{verbatim}
 $ACCUMULO_HOME/bin/accumulo admin start host(s) {host ...}
 \end{verbatim}
 
 Alternatively, you can ssh to each of the hosts you want to add and run 
-\texttt{\$ACCUMULO_HOME/bin/start-here.sh}.
+\texttt{\$ACCUMULO\_HOME/bin/start-here.sh}.
 
 Make sure the host in question has the new configuration, or else the tablet 
 server won't start; at a minimum this needs to be on the host(s) being added, 
@@ -209,9 +209,9 @@ $ACCUMULO_HOME/bin/accumulo admin stop host(s) {host 
...}
 \end{verbatim}
 
 Alternatively, you can ssh to each of the hosts you want to remove and run 
-\texttt{\$ACCUMULO_HOME/bin/stop-here.sh}.
+\texttt{\$ACCUMULO\_HOME/bin/stop-here.sh}.
 
-Be sure to update your \texttt{\$ACCUMULO_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO_CONF_DIR/slaves}) file to 
+Be sure to update your \texttt{\$ACCUMUL\_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO\_CONF\_DIR/slaves}) file to 
 account for the removal of these hosts. Bear in mind that the monitor will not 
re-read the 
 slaves file automatically, so it will report the decomissioned servers as 
down; it's 
 recommended that you restart the monitor so that the node list is up to date.



[1/2] ACCUMULO-2010 Remove Closeable from interfaces

2013-12-13 Thread ctubbsii
Updated Branches:
  refs/heads/1.4.5-SNAPSHOT 07a0433bd - 335f693a4


http://git-wip-us.apache.org/repos/asf/accumulo/blob/335f693a/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
--
diff --git 
a/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
 
b/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
index 491b8ec..2caf7cd 100644
--- 
a/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
+++ 
b/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
@@ -49,96 +49,100 @@ import org.apache.hadoop.io.Text;
  * 
  */
 public class UndefinedAnalyzer {
-  
+
   static class UndefinedNode {
-
+
 public UndefinedNode(String undef2, String ref2) {
   this.undef = undef2;
   this.ref = ref2;
 }
-
+
 String undef;
 String ref;
   }
-  
+
   static class IngestInfo {
-
+
 MapString,TreeMapLong,Long flushes = new 
HashMapString,TreeMapLong,Long();
-
+
 public IngestInfo(String logDir) throws Exception {
   File dir = new File(logDir);
   File[] ingestLogs = dir.listFiles(new FilenameFilter() {
+@Override
 public boolean accept(java.io.File dir, String name) {
   return name.endsWith(ingest.out);
 }
   });
-  
+
   for (File log : ingestLogs) {
 parseLog(log);
   }
 }
-
+
 private void parseLog(File log) throws Exception {
   BufferedReader reader = new BufferedReader(new FileReader(log));
-  
-  String line;
-  TreeMapLong,Long tm = null;
-  
-  while ((line = reader.readLine()) != null) {
-if (!line.startsWith(UUID))
-  continue;
-String[] tokens = line.split(\\s);
-String time = tokens[1];
-String uuid = tokens[2];
-
-if (flushes.containsKey(uuid)) {
-  System.err.println(WARN Duplicate uuid  + log);
+  try {
+String line;
+TreeMapLong,Long tm = null;
+
+while ((line = reader.readLine()) != null) {
+  if (!line.startsWith(UUID))
+continue;
+  String[] tokens = line.split(\\s);
+  String time = tokens[1];
+  String uuid = tokens[2];
+
+  if (flushes.containsKey(uuid)) {
+System.err.println(WARN Duplicate uuid  + log);
+return;
+  }
+
+  tm = new TreeMapLong,Long(Collections.reverseOrder());
+  tm.put(0l, Long.parseLong(time));
+  flushes.put(uuid, tm);
+  break;
+
+}
+
+if (tm == null) {
+  System.err.println(WARN Bad ingest log  + log);
   return;
 }
-
-tm = new TreeMapLong,Long(Collections.reverseOrder());
-tm.put(0l, Long.parseLong(time));
-flushes.put(uuid, tm);
-break;
-
-  }
-  
-  if (tm == null) {
-System.err.println(WARN Bad ingest log  + log);
-return;
-  }
-  
-  while ((line = reader.readLine()) != null) {
-String[] tokens = line.split(\\s);
-
-if (!tokens[0].equals(FLUSH))
-  continue;
-
-String time = tokens[1];
-String count = tokens[4];
-
-tm.put(Long.parseLong(count), Long.parseLong(time));
+
+while ((line = reader.readLine()) != null) {
+  String[] tokens = line.split(\\s);
+
+  if (!tokens[0].equals(FLUSH))
+continue;
+
+  String time = tokens[1];
+  String count = tokens[4];
+
+  tm.put(Long.parseLong(count), Long.parseLong(time));
+}
+  } finally {
+if (reader != null)
+  reader.close();
   }
-  
 }
-
+
 IteratorLong getTimes(String uuid, long count) {
   TreeMapLong,Long tm = flushes.get(uuid);
-  
+
   if (tm == null)
 return null;
-  
+
   return tm.tailMap(count).values().iterator();
 }
   }
-  
+
   static class TabletAssignment {
 String tablet;
 String endRow;
 String prevEndRow;
 String server;
 long time;
-
+
 TabletAssignment(String tablet, String er, String per, String server, long 
time) {
   this.tablet = new String(tablet);
   this.endRow = new String(er);
@@ -146,133 +150,139 @@ public class UndefinedAnalyzer {
   this.server = new String(server);
   this.time = time;
 }
-
+
 public boolean contains(String row) {
   return prevEndRow.compareTo(row)  0  endRow.compareTo(row) = 0;
 }
   }
-  
+
   static class TabletHistory {
-
+
 ListTabletAssignment assignments = new ArrayListTabletAssignment();
-
+
 TabletHistory(String tableId, String acuLogDir) throws Exception {
   File dir = new File(acuLogDir);
   File[] masterLogs = dir.listFiles(new 

[1/3] ACCUMULO-2010 Remove Closeable from interfaces

2013-12-13 Thread ctubbsii
Updated Branches:
  refs/heads/1.5.1-SNAPSHOT b65bdd60c - c84acfc9a


http://git-wip-us.apache.org/repos/asf/accumulo/blob/335f693a/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
--
diff --git 
a/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
 
b/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
index 491b8ec..2caf7cd 100644
--- 
a/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
+++ 
b/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
@@ -49,96 +49,100 @@ import org.apache.hadoop.io.Text;
  * 
  */
 public class UndefinedAnalyzer {
-  
+
   static class UndefinedNode {
-
+
 public UndefinedNode(String undef2, String ref2) {
   this.undef = undef2;
   this.ref = ref2;
 }
-
+
 String undef;
 String ref;
   }
-  
+
   static class IngestInfo {
-
+
 MapString,TreeMapLong,Long flushes = new 
HashMapString,TreeMapLong,Long();
-
+
 public IngestInfo(String logDir) throws Exception {
   File dir = new File(logDir);
   File[] ingestLogs = dir.listFiles(new FilenameFilter() {
+@Override
 public boolean accept(java.io.File dir, String name) {
   return name.endsWith(ingest.out);
 }
   });
-  
+
   for (File log : ingestLogs) {
 parseLog(log);
   }
 }
-
+
 private void parseLog(File log) throws Exception {
   BufferedReader reader = new BufferedReader(new FileReader(log));
-  
-  String line;
-  TreeMapLong,Long tm = null;
-  
-  while ((line = reader.readLine()) != null) {
-if (!line.startsWith(UUID))
-  continue;
-String[] tokens = line.split(\\s);
-String time = tokens[1];
-String uuid = tokens[2];
-
-if (flushes.containsKey(uuid)) {
-  System.err.println(WARN Duplicate uuid  + log);
+  try {
+String line;
+TreeMapLong,Long tm = null;
+
+while ((line = reader.readLine()) != null) {
+  if (!line.startsWith(UUID))
+continue;
+  String[] tokens = line.split(\\s);
+  String time = tokens[1];
+  String uuid = tokens[2];
+
+  if (flushes.containsKey(uuid)) {
+System.err.println(WARN Duplicate uuid  + log);
+return;
+  }
+
+  tm = new TreeMapLong,Long(Collections.reverseOrder());
+  tm.put(0l, Long.parseLong(time));
+  flushes.put(uuid, tm);
+  break;
+
+}
+
+if (tm == null) {
+  System.err.println(WARN Bad ingest log  + log);
   return;
 }
-
-tm = new TreeMapLong,Long(Collections.reverseOrder());
-tm.put(0l, Long.parseLong(time));
-flushes.put(uuid, tm);
-break;
-
-  }
-  
-  if (tm == null) {
-System.err.println(WARN Bad ingest log  + log);
-return;
-  }
-  
-  while ((line = reader.readLine()) != null) {
-String[] tokens = line.split(\\s);
-
-if (!tokens[0].equals(FLUSH))
-  continue;
-
-String time = tokens[1];
-String count = tokens[4];
-
-tm.put(Long.parseLong(count), Long.parseLong(time));
+
+while ((line = reader.readLine()) != null) {
+  String[] tokens = line.split(\\s);
+
+  if (!tokens[0].equals(FLUSH))
+continue;
+
+  String time = tokens[1];
+  String count = tokens[4];
+
+  tm.put(Long.parseLong(count), Long.parseLong(time));
+}
+  } finally {
+if (reader != null)
+  reader.close();
   }
-  
 }
-
+
 IteratorLong getTimes(String uuid, long count) {
   TreeMapLong,Long tm = flushes.get(uuid);
-  
+
   if (tm == null)
 return null;
-  
+
   return tm.tailMap(count).values().iterator();
 }
   }
-  
+
   static class TabletAssignment {
 String tablet;
 String endRow;
 String prevEndRow;
 String server;
 long time;
-
+
 TabletAssignment(String tablet, String er, String per, String server, long 
time) {
   this.tablet = new String(tablet);
   this.endRow = new String(er);
@@ -146,133 +150,139 @@ public class UndefinedAnalyzer {
   this.server = new String(server);
   this.time = time;
 }
-
+
 public boolean contains(String row) {
   return prevEndRow.compareTo(row)  0  endRow.compareTo(row) = 0;
 }
   }
-  
+
   static class TabletHistory {
-
+
 ListTabletAssignment assignments = new ArrayListTabletAssignment();
-
+
 TabletHistory(String tableId, String acuLogDir) throws Exception {
   File dir = new File(acuLogDir);
   File[] masterLogs = dir.listFiles(new 

[1/4] ACCUMULO-2010 Remove Closeable from interfaces

2013-12-13 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT f6a3f907b - 7fc8d8344


http://git-wip-us.apache.org/repos/asf/accumulo/blob/335f693a/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
--
diff --git 
a/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
 
b/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
index 491b8ec..2caf7cd 100644
--- 
a/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
+++ 
b/src/server/src/main/java/org/apache/accumulo/server/test/continuous/UndefinedAnalyzer.java
@@ -49,96 +49,100 @@ import org.apache.hadoop.io.Text;
  * 
  */
 public class UndefinedAnalyzer {
-  
+
   static class UndefinedNode {
-
+
 public UndefinedNode(String undef2, String ref2) {
   this.undef = undef2;
   this.ref = ref2;
 }
-
+
 String undef;
 String ref;
   }
-  
+
   static class IngestInfo {
-
+
 MapString,TreeMapLong,Long flushes = new 
HashMapString,TreeMapLong,Long();
-
+
 public IngestInfo(String logDir) throws Exception {
   File dir = new File(logDir);
   File[] ingestLogs = dir.listFiles(new FilenameFilter() {
+@Override
 public boolean accept(java.io.File dir, String name) {
   return name.endsWith(ingest.out);
 }
   });
-  
+
   for (File log : ingestLogs) {
 parseLog(log);
   }
 }
-
+
 private void parseLog(File log) throws Exception {
   BufferedReader reader = new BufferedReader(new FileReader(log));
-  
-  String line;
-  TreeMapLong,Long tm = null;
-  
-  while ((line = reader.readLine()) != null) {
-if (!line.startsWith(UUID))
-  continue;
-String[] tokens = line.split(\\s);
-String time = tokens[1];
-String uuid = tokens[2];
-
-if (flushes.containsKey(uuid)) {
-  System.err.println(WARN Duplicate uuid  + log);
+  try {
+String line;
+TreeMapLong,Long tm = null;
+
+while ((line = reader.readLine()) != null) {
+  if (!line.startsWith(UUID))
+continue;
+  String[] tokens = line.split(\\s);
+  String time = tokens[1];
+  String uuid = tokens[2];
+
+  if (flushes.containsKey(uuid)) {
+System.err.println(WARN Duplicate uuid  + log);
+return;
+  }
+
+  tm = new TreeMapLong,Long(Collections.reverseOrder());
+  tm.put(0l, Long.parseLong(time));
+  flushes.put(uuid, tm);
+  break;
+
+}
+
+if (tm == null) {
+  System.err.println(WARN Bad ingest log  + log);
   return;
 }
-
-tm = new TreeMapLong,Long(Collections.reverseOrder());
-tm.put(0l, Long.parseLong(time));
-flushes.put(uuid, tm);
-break;
-
-  }
-  
-  if (tm == null) {
-System.err.println(WARN Bad ingest log  + log);
-return;
-  }
-  
-  while ((line = reader.readLine()) != null) {
-String[] tokens = line.split(\\s);
-
-if (!tokens[0].equals(FLUSH))
-  continue;
-
-String time = tokens[1];
-String count = tokens[4];
-
-tm.put(Long.parseLong(count), Long.parseLong(time));
+
+while ((line = reader.readLine()) != null) {
+  String[] tokens = line.split(\\s);
+
+  if (!tokens[0].equals(FLUSH))
+continue;
+
+  String time = tokens[1];
+  String count = tokens[4];
+
+  tm.put(Long.parseLong(count), Long.parseLong(time));
+}
+  } finally {
+if (reader != null)
+  reader.close();
   }
-  
 }
-
+
 IteratorLong getTimes(String uuid, long count) {
   TreeMapLong,Long tm = flushes.get(uuid);
-  
+
   if (tm == null)
 return null;
-  
+
   return tm.tailMap(count).values().iterator();
 }
   }
-  
+
   static class TabletAssignment {
 String tablet;
 String endRow;
 String prevEndRow;
 String server;
 long time;
-
+
 TabletAssignment(String tablet, String er, String per, String server, long 
time) {
   this.tablet = new String(tablet);
   this.endRow = new String(er);
@@ -146,133 +150,139 @@ public class UndefinedAnalyzer {
   this.server = new String(server);
   this.time = time;
 }
-
+
 public boolean contains(String row) {
   return prevEndRow.compareTo(row)  0  endRow.compareTo(row) = 0;
 }
   }
-  
+
   static class TabletHistory {
-
+
 ListTabletAssignment assignments = new ArrayListTabletAssignment();
-
+
 TabletHistory(String tableId, String acuLogDir) throws Exception {
   File dir = new File(acuLogDir);
   File[] masterLogs = dir.listFiles(new 

[4/4] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

2013-12-13 Thread ctubbsii
Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 7fc8d83444364ea30f72f663b9015f6e1603c756
Parents: f6a3f90 c84acfc
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 13 18:00:45 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 13 18:00:45 2013 -0500

--
 .../apache/accumulo/core/client/Instance.java   |   6 +-
 .../apache/accumulo/core/data/RangeTest.java| 337 ++-
 .../accumulo/fate/zookeeper/ZooCache.java   | 110 +++---
 .../accumulo/fate/zookeeper/ZooReader.java  |  39 ++-
 4 files changed, 244 insertions(+), 248 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7fc8d834/core/src/main/java/org/apache/accumulo/core/client/Instance.java
--



[2/8] git commit: Merge remote-tracking branch 'origin/1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT

2013-12-13 Thread ctubbsii
Merge remote-tracking branch 'origin/1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT


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

Branch: refs/heads/master
Commit: b65bdd60cd928e05da91d0b22658fac4c638624f
Parents: 5fa1a75 07a0433
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 13 16:46:04 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 13 16:46:04 2013 -0500

--
 .../latex/accumulo_user_manual/chapters/administration.tex   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b65bdd60/docs/src/main/latex/accumulo_user_manual/chapters/administration.tex
--
diff --cc docs/src/main/latex/accumulo_user_manual/chapters/administration.tex
index 086f41c,000..204f549
mode 100644,00..100644
--- a/docs/src/main/latex/accumulo_user_manual/chapters/administration.tex
+++ b/docs/src/main/latex/accumulo_user_manual/chapters/administration.tex
@@@ -1,394 -1,0 +1,394 @@@
 +
 +% Licensed to the Apache Software Foundation (ASF) under one or more
 +% contributor license agreements. See the NOTICE file distributed with
 +% this work for additional information regarding copyright ownership.
 +% The ASF licenses this file to You under the Apache License, Version 2.0
 +% (the License); you may not use this file except in compliance with
 +% the License. You may obtain a copy of the License at
 +%
 +% http://www.apache.org/licenses/LICENSE-2.0
 +%
 +% Unless required by applicable law or agreed to in writing, software
 +% distributed under the License is distributed on an AS IS BASIS,
 +% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +% See the License for the specific language governing permissions and
 +% limitations under the License.
 +
 +\chapter{Administration}
 +
 +\section{Hardware}
 +
 +Because we are running essentially two or three systems simultaneously layered
 +across the cluster: HDFS, Accumulo and MapReduce, it is typical for hardware 
to
 +consist of 4 to 8 cores, and 8 to 32 GB RAM. This is so each running process 
can have
 +at least one core and 2 - 4 GB each.
 +
 +One core running HDFS can typically keep 2 to 4 disks busy, so each machine 
may
 +typically have as little as 2 x 300GB disks and as much as 4 x 1TB or 2TB 
disks.
 +
 +It is possible to do with less than this, such as with 1u servers with 2 
cores and 4GB
 +each, but in this case it is recommended to only run up to two processes per
 +machine - i.e. DataNode and TabletServer or DataNode and MapReduce worker but
 +not all three. The constraint here is having enough available heap space for 
all the
 +processes on a machine.
 +
 +\section{Network}
 +
 +Accumulo communicates via remote procedure calls over TCP/IP for both passing
 +data and control messages. In addition, Accumulo uses HDFS clients to
 +communicate with HDFS. To achieve good ingest and query performance, 
sufficient
 +network bandwidth must be available between any two machines.
 +
 +\section{Installation}
 +Choose a directory for the Accumulo installation. This directory will be 
referenced
 +by the environment variable \texttt{\$ACCUMULO\_HOME}. Run the following:
 +
 +\small
 +\begin{verbatim}
 +$ tar xzf accumulo-1.5.0-bin.tar.gz# unpack to subdirectory
 +$ mv accumulo-1.5.0 $ACCUMULO_HOME # move to desired location
 +\end{verbatim}
 +\normalsize
 +
 +Repeat this step at each machine within the cluster. Usually all machines 
have the
 +same \texttt{\$ACCUMULO\_HOME}.
 +
 +\section{Dependencies}
 +Accumulo requires HDFS and ZooKeeper to be configured and running
 +before starting. Password-less SSH should be configured between at least the
 +Accumulo master and TabletServer machines. It is also a good idea to run 
Network
 +Time Protocol (NTP) within the cluster to ensure nodes' clocks don't get too 
out of
 +sync, which can cause problems with automatically timestamped data. 
 +
 +\section{Configuration}
 +
 +Accumulo is configured by editing several Shell and XML files found in
 +\texttt{\$ACCUMULO\_HOME/conf}. The structure closely resembles Hadoop's 
configuration
 +files.
 +
 +\subsection{Edit conf/accumulo-env.sh}
 +
 +Accumulo needs to know where to find the software it depends on. Edit 
accumulo-env.sh 
 +and specify the following:
 +
 +\begin{enumerate}
 +\item{Enter the location of the installation directory of Accumulo for 
\texttt{\$ACCUMULO\_HOME}}
 +\item{Enter your system's Java home for \texttt{\$JAVA\_HOME}}
 +\item{Enter the location of Hadoop for \texttt{\$HADOOP\_PREFIX}}
 +\item{Choose a 

[7/8] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

2013-12-13 Thread ctubbsii
Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT


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

Branch: refs/heads/master
Commit: 7fc8d83444364ea30f72f663b9015f6e1603c756
Parents: f6a3f90 c84acfc
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 13 18:00:45 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 13 18:00:45 2013 -0500

--
 .../apache/accumulo/core/client/Instance.java   |   6 +-
 .../apache/accumulo/core/data/RangeTest.java| 337 ++-
 .../accumulo/fate/zookeeper/ZooCache.java   | 110 +++---
 .../accumulo/fate/zookeeper/ZooReader.java  |  39 ++-
 4 files changed, 244 insertions(+), 248 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7fc8d834/core/src/main/java/org/apache/accumulo/core/client/Instance.java
--



[8/8] git commit: Merge branch '1.6.0-SNAPSHOT'

2013-12-13 Thread ctubbsii
Merge branch '1.6.0-SNAPSHOT'


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

Branch: refs/heads/master
Commit: 1ee57286f49936f3dcd6d45b18fed574f49d5496
Parents: 3dc5630 7fc8d83
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 13 18:01:22 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 13 18:01:22 2013 -0500

--
 .../apache/accumulo/core/client/Instance.java   |   6 +-
 .../apache/accumulo/core/data/RangeTest.java| 337 ++-
 .../chapters/administration.tex |   8 +-
 .../accumulo/fate/zookeeper/ZooCache.java   | 110 +++---
 .../accumulo/fate/zookeeper/ZooReader.java  |  39 ++-
 5 files changed, 248 insertions(+), 252 deletions(-)
--




[1/8] git commit: ACCUMULO-2011 Escape unescaped underscores to fix LaTeX

2013-12-13 Thread ctubbsii
Updated Branches:
  refs/heads/master 3dc5630d8 - 1ee57286f


ACCUMULO-2011 Escape unescaped underscores to fix LaTeX


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

Branch: refs/heads/master
Commit: 07a0433bd73295d733bc3430db64de86b4088ea3
Parents: 72106a6
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 13 16:05:46 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 13 16:05:46 2013 -0500

--
 docs/src/user_manual/chapters/administration.tex | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/07a0433b/docs/src/user_manual/chapters/administration.tex
--
diff --git a/docs/src/user_manual/chapters/administration.tex 
b/docs/src/user_manual/chapters/administration.tex
index d0533d9..4723481 100644
--- a/docs/src/user_manual/chapters/administration.tex
+++ b/docs/src/user_manual/chapters/administration.tex
@@ -186,14 +186,14 @@ take some time for particular configurations.
 
 \subsection{Adding a Node}
 
-Update your \texttt{\$ACCUMULO_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO_CONF_DIR/slaves}) file to account for the addition.
+Update your \texttt{\$ACCUMULO\_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO\_CONF\_DIR/slaves}) file to account for the addition.
 
 \begin{verbatim}
 $ACCUMULO_HOME/bin/accumulo admin start host(s) {host ...}
 \end{verbatim}
 
 Alternatively, you can ssh to each of the hosts you want to add and run 
-\texttt{\$ACCUMULO_HOME/bin/start-here.sh}.
+\texttt{\$ACCUMULO\_HOME/bin/start-here.sh}.
 
 Make sure the host in question has the new configuration, or else the tablet 
 server won't start; at a minimum this needs to be on the host(s) being added, 
@@ -209,9 +209,9 @@ $ACCUMULO_HOME/bin/accumulo admin stop host(s) {host 
...}
 \end{verbatim}
 
 Alternatively, you can ssh to each of the hosts you want to remove and run 
-\texttt{\$ACCUMULO_HOME/bin/stop-here.sh}.
+\texttt{\$ACCUMULO\_HOME/bin/stop-here.sh}.
 
-Be sure to update your \texttt{\$ACCUMULO_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO_CONF_DIR/slaves}) file to 
+Be sure to update your \texttt{\$ACCUMUL\_HOME/conf/slaves} (or 
\texttt{\$ACCUMULO\_CONF\_DIR/slaves}) file to 
 account for the removal of these hosts. Bear in mind that the monitor will not 
re-read the 
 slaves file automatically, so it will report the decomissioned servers as 
down; it's 
 recommended that you restart the monitor so that the node list is up to date.



git commit: ACCUMULO-2093 Exclude incomplete tables from listing.

2013-12-24 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT db746960f - 3cddee9ef


ACCUMULO-2093 Exclude incomplete tables from listing.

  Specifically, tables who can't resolve with a fully-qualified table
  name are excluded from a table listing. This ensures that tables being
  created and/or deleted aren't shown in an inconsistent state.


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 3cddee9ef10049219b551d578bbfa9f779697993
Parents: db74696
Author: Christopher Tubbs ctubb...@apache.org
Authored: Tue Dec 24 16:18:15 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Tue Dec 24 16:18:15 2013 -0500

--
 .../java/org/apache/accumulo/core/client/impl/Tables.java | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/3cddee9e/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java 
b/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
index 7cf5ccc..f3f46d5 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
@@ -53,9 +53,7 @@ public class Tables {
 ZooCache zc = getZooCache(instance);
 
 ListString tableIds = zc.getChildren(ZooUtil.getRoot(instance) + 
Constants.ZTABLES);
-
 TreeMapString,String tableMap = new TreeMapString,String();
-
 MapString,String namespaceIdToNameMap = new HashMapString,String();
 
 for (String tableId : tableIds) {
@@ -63,7 +61,9 @@ public class Tables {
   byte[] nId = zc.get(ZooUtil.getRoot(instance) + Constants.ZTABLES + / 
+ tableId + Constants.ZTABLE_NAMESPACE);
   String namespaceName = Constants.DEFAULT_NAMESPACE;
   // create fully qualified table name
-  if (nId != null) {
+  if (nId == null) {
+namespaceName = null;
+  } else if (nId != null) {
 String namespaceId = new String(nId, Constants.UTF8);
 if (!namespaceId.equals(Constants.DEFAULT_NAMESPACE_ID)) {
   try {
@@ -73,12 +73,12 @@ public class Tables {
   namespaceIdToNameMap.put(namespaceId, namespaceName);
 }
   } catch (NamespaceNotFoundException e) {
-log.error(Table ( + tableId + ) contains reference to namespace 
( + namespaceId + ) that doesn't exist);
+log.error(Table ( + tableId + ) contains reference to namespace 
( + namespaceId + ) that doesn't exist, e);
 continue;
   }
 }
   }
-  if (tableName != null) {
+  if (tableName != null  namespaceName != null) {
 String tableNameStr = qualified(new String(tableName, Constants.UTF8), 
namespaceName);
 if (nameAsKey)
   tableMap.put(tableNameStr, tableId);



git commit: ACCUMULO-2094 Consolidate namespaceId addition with creating table

2013-12-24 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 3cddee9ef - 86f5927f1


ACCUMULO-2094 Consolidate namespaceId addition with creating table

  Also clean up related initialize and upgrade code, and consolidate
  duplicate code.


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 86f5927f1177730ab09e9e9c1df055639adadee3
Parents: 3cddee9
Author: Christopher Tubbs ctubb...@apache.org
Authored: Tue Dec 24 18:25:08 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Tue Dec 24 18:25:08 2013 -0500

--
 .../accumulo/core/client/impl/Namespaces.java   |  6 ++
 .../apache/accumulo/server/init/Initialize.java | 24 ++---
 .../accumulo/server/tables/TableManager.java| 95 +---
 .../java/org/apache/accumulo/master/Master.java | 62 +
 .../master/tableOps/CreateNamespace.java|  2 +-
 .../accumulo/master/tableOps/CreateTable.java   |  4 +-
 .../accumulo/master/tableOps/ImportTable.java   |  4 +-
 7 files changed, 58 insertions(+), 139 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/86f5927f/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java 
b/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
index 2480f68..64a6441 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
@@ -58,6 +58,12 @@ public class Namespaces {
 return namespaceMap;
   }
 
+  public static boolean exists(Instance instance, String namespaceId) {
+ZooCache zc = getZooCache(instance);
+ListString namespaceIds = zc.getChildren(ZooUtil.getRoot(instance) + 
Constants.ZNAMESPACES);
+return namespaceIds.contains(namespaceId);
+  }
+
   public static String getNamespaceId(Instance instance, String namespace) 
throws NamespaceNotFoundException {
 String id = getNameToIdMap(instance).get(namespace);
 if (id == null)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/86f5927f/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 a120dbd..7f5e44e 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
@@ -394,8 +394,11 @@ public class Initialize {
 String zkInstanceRoot = Constants.ZROOT + / + uuid;
 zoo.putPersistentData(zkInstanceRoot, new byte[0], NodeExistsPolicy.FAIL);
 zoo.putPersistentData(zkInstanceRoot + Constants.ZTABLES, 
Constants.ZTABLES_INITIAL_ID, NodeExistsPolicy.FAIL);
-TableManager.prepareNewTableState(uuid, RootTable.ID, RootTable.NAME, 
TableState.ONLINE, NodeExistsPolicy.FAIL);
-TableManager.prepareNewTableState(uuid, MetadataTable.ID, 
MetadataTable.NAME, TableState.ONLINE, NodeExistsPolicy.FAIL);
+zoo.putPersistentData(zkInstanceRoot + Constants.ZNAMESPACES, new byte[0], 
NodeExistsPolicy.FAIL);
+TableManager.prepareNewNamespaceState(uuid, 
Constants.DEFAULT_NAMESPACE_ID, Constants.DEFAULT_NAMESPACE, 
NodeExistsPolicy.FAIL);
+TableManager.prepareNewNamespaceState(uuid, 
Constants.ACCUMULO_NAMESPACE_ID, Constants.ACCUMULO_NAMESPACE, 
NodeExistsPolicy.FAIL);
+TableManager.prepareNewTableState(uuid, RootTable.ID, 
Constants.ACCUMULO_NAMESPACE_ID, RootTable.NAME, TableState.ONLINE, 
NodeExistsPolicy.FAIL);
+TableManager.prepareNewTableState(uuid, MetadataTable.ID, 
Constants.ACCUMULO_NAMESPACE_ID, MetadataTable.NAME, TableState.ONLINE, 
NodeExistsPolicy.FAIL);
 zoo.putPersistentData(zkInstanceRoot + Constants.ZTSERVERS, new byte[0], 
NodeExistsPolicy.FAIL);
 zoo.putPersistentData(zkInstanceRoot + Constants.ZPROBLEMS, new byte[0], 
NodeExistsPolicy.FAIL);
 zoo.putPersistentData(zkInstanceRoot + RootTable.ZROOT_TABLET, new 
byte[0], NodeExistsPolicy.FAIL);
@@ -412,23 +415,6 @@ public class Initialize {
 zoo.putPersistentData(zkInstanceRoot + Constants.ZHDFS_RESERVATIONS, new 
byte[0], NodeExistsPolicy.FAIL);
 zoo.putPersistentData(zkInstanceRoot + Constants.ZNEXT_FILE, new byte[] 
{'0'}, NodeExistsPolicy.FAIL);
 zoo.putPersistentData(zkInstanceRoot + Constants.ZRECOVERY, new byte[] 
{'0'}, NodeExistsPolicy.FAIL);
-

git commit: ACCUMULO-2108 set dependency management version for submodules via maven project version.

2013-12-27 Thread ctubbsii
Updated Branches:
  refs/heads/1.4.5-SNAPSHOT 79266cba1 - fc7a0a336


ACCUMULO-2108 set dependency management version for submodules via maven 
project version.

Signed-off-by: Christopher Tubbs ctubb...@apache.org


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

Branch: refs/heads/1.4.5-SNAPSHOT
Commit: fc7a0a336a8e2623fb7eca1f01ab8a63cdc24967
Parents: 79266cb
Author: Sean Busbey bus...@clouderagovt.com
Authored: Fri Dec 27 16:51:32 2013 -0600
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 27 17:59:30 2013 -0500

--
 pom.xml | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fc7a0a33/pom.xml
--
diff --git a/pom.xml b/pom.xml
index fc0222e..20916c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -778,27 +778,27 @@
   dependency
 groupIdorg.apache.accumulo/groupId
 artifactIdcloudtrace/artifactId
-version1.4.5-SNAPSHOT/version
+version${project.version}/version
   /dependency
   dependency
 groupIdorg.apache.accumulo/groupId
 artifactIdaccumulo-start/artifactId
-version1.4.5-SNAPSHOT/version
+version${project.version}/version
   /dependency
   dependency
 groupIdorg.apache.accumulo/groupId
 artifactIdaccumulo-core/artifactId
-version1.4.5-SNAPSHOT/version
+version${project.version}/version
   /dependency
   dependency
 groupIdorg.apache.accumulo/groupId
 artifactIdaccumulo-server/artifactId
-version1.4.5-SNAPSHOT/version
+version${project.version}/version
   /dependency
   dependency
 groupIdorg.apache.accumulo/groupId
 artifactIdaccumulo-minicluster/artifactId
-version1.4.5-SNAPSHOT/version
+version${project.version}/version
   /dependency
 
   !-- additional dependencies we need to provide --



[2/2] git commit: Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT (-sours)

2013-12-27 Thread ctubbsii
Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT (-sours)


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: 0c1ea722afe36c2acd22bf517666e320d6d7284b
Parents: b315fe2 fc7a0a3
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 27 18:02:10 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 27 18:02:10 2013 -0500

--

--




[1/2] git commit: ACCUMULO-2108 set dependency management version for submodules via maven project version.

2013-12-27 Thread ctubbsii
Updated Branches:
  refs/heads/1.5.1-SNAPSHOT b315fe2d4 - 0c1ea722a


ACCUMULO-2108 set dependency management version for submodules via maven 
project version.

Signed-off-by: Christopher Tubbs ctubb...@apache.org


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: fc7a0a336a8e2623fb7eca1f01ab8a63cdc24967
Parents: 79266cb
Author: Sean Busbey bus...@clouderagovt.com
Authored: Fri Dec 27 16:51:32 2013 -0600
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 27 17:59:30 2013 -0500

--
 pom.xml | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/fc7a0a33/pom.xml
--
diff --git a/pom.xml b/pom.xml
index fc0222e..20916c7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -778,27 +778,27 @@
   dependency
 groupIdorg.apache.accumulo/groupId
 artifactIdcloudtrace/artifactId
-version1.4.5-SNAPSHOT/version
+version${project.version}/version
   /dependency
   dependency
 groupIdorg.apache.accumulo/groupId
 artifactIdaccumulo-start/artifactId
-version1.4.5-SNAPSHOT/version
+version${project.version}/version
   /dependency
   dependency
 groupIdorg.apache.accumulo/groupId
 artifactIdaccumulo-core/artifactId
-version1.4.5-SNAPSHOT/version
+version${project.version}/version
   /dependency
   dependency
 groupIdorg.apache.accumulo/groupId
 artifactIdaccumulo-server/artifactId
-version1.4.5-SNAPSHOT/version
+version${project.version}/version
   /dependency
   dependency
 groupIdorg.apache.accumulo/groupId
 artifactIdaccumulo-minicluster/artifactId
-version1.4.5-SNAPSHOT/version
+version${project.version}/version
   /dependency
 
   !-- additional dependencies we need to provide --



[2/7] ACCUMULO-1965 Fix exception handling for namespaces

2013-12-27 Thread ctubbsii
http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
--
diff --git 
a/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
 
b/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
new file mode 100644
index 000..dc654ae
--- /dev/null
+++ 
b/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
@@ -0,0 +1,463 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.master;
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.IsolatedScanner;
+import org.apache.accumulo.core.client.RowIterator;
+import org.apache.accumulo.core.client.Scanner;
+import org.apache.accumulo.core.client.TableNotFoundException;
+import org.apache.accumulo.core.client.impl.Tables;
+import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
+import org.apache.accumulo.core.client.impl.thrift.TableOperation;
+import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType;
+import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
+import 
org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
+import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.KeyExtent;
+import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.data.thrift.TKeyExtent;
+import org.apache.accumulo.core.master.thrift.MasterClientService;
+import org.apache.accumulo.core.master.thrift.MasterGoalState;
+import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
+import org.apache.accumulo.core.master.thrift.MasterState;
+import org.apache.accumulo.core.master.thrift.TableInfo;
+import org.apache.accumulo.core.master.thrift.TabletLoadState;
+import org.apache.accumulo.core.master.thrift.TabletServerStatus;
+import org.apache.accumulo.core.master.thrift.TabletSplit;
+import org.apache.accumulo.core.metadata.MetadataTable;
+import org.apache.accumulo.core.metadata.RootTable;
+import org.apache.accumulo.core.metadata.schema.MetadataSchema;
+import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
+import 
org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.LogColumnFamily;
+import org.apache.accumulo.core.security.Authorizations;
+import org.apache.accumulo.core.security.thrift.TCredentials;
+import org.apache.accumulo.core.util.ByteBufferUtil;
+import org.apache.accumulo.core.util.UtilWaitThread;
+import org.apache.accumulo.core.zookeeper.ZooUtil;
+import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
+import org.apache.accumulo.fate.zookeeper.IZooReaderWriter.Mutator;
+import org.apache.accumulo.master.tableOps.TraceRepo;
+import org.apache.accumulo.master.tserverOps.ShutdownTServer;
+import org.apache.accumulo.server.client.ClientServiceHandler;
+import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.master.LiveTServerSet.TServerConnection;
+import org.apache.accumulo.server.master.balancer.DefaultLoadBalancer;
+import org.apache.accumulo.server.master.balancer.TabletBalancer;
+import org.apache.accumulo.server.master.state.DeadServerList;
+import org.apache.accumulo.server.master.state.TServerInstance;
+import org.apache.accumulo.server.master.state.TabletServerState;
+import org.apache.accumulo.server.util.DefaultMap;
+import org.apache.accumulo.server.util.NamespacePropUtil;
+import org.apache.accumulo.server.util.SystemPropUtil;
+import org.apache.accumulo.server.util.TableInfoUtil;
+import org.apache.accumulo.server.util.TablePropUtil;
+import 

[8/8] git commit: Merge branch '1.6.0-SNAPSHOT'

2013-12-27 Thread ctubbsii
Merge branch '1.6.0-SNAPSHOT'


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

Branch: refs/heads/master
Commit: a267d349dc6ad46b9da4ae4cfa010d5a279166c9
Parents: 2c37c45 f35e3f4
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Dec 27 20:07:06 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Dec 27 20:07:06 2013 -0500

--
 .../org/apache/accumulo/core/Constants.java |4 -
 .../core/client/TableNotFoundException.java |   21 +-
 .../core/client/admin/NamespaceOperations.java  |2 +-
 .../client/admin/NamespaceOperationsImpl.java   |  193 +-
 .../client/admin/TableOperationsHelper.java |   35 +-
 .../core/client/admin/TableOperationsImpl.java  |  256 +-
 .../core/client/impl/ConnectorImpl.java |   55 +-
 .../accumulo/core/client/impl/MasterClient.java |   76 +-
 .../accumulo/core/client/impl/Namespaces.java   |   33 +-
 .../accumulo/core/client/impl/Tables.java   |   32 +-
 .../thrift/TableOperationExceptionType.java |   11 +-
 .../accumulo/core/client/mock/MockAccumulo.java |6 +-
 .../core/client/mock/MockTableOperations.java   |   12 +-
 .../core/master/thrift/FateOperation.java   |  103 +
 .../core/master/thrift/FateService.java | 5017 +
 .../core/master/thrift/MasterClientService.java | 9946 +-
 .../core/master/thrift/TableOperation.java  |   94 -
 .../accumulo/core/metadata/MetadataTable.java   |4 +-
 .../accumulo/core/metadata/RootTable.java   |4 +-
 .../util/shell/commands/NamespacesCommand.java  |4 +-
 core/src/main/thrift/client.thrift  |  203 +-
 core/src/main/thrift/master.thrift  |  222 +-
 .../core/client/mock/MockNamespacesTest.java|5 +-
 .../client/mock/MockTableOperationsTest.java|   49 +-
 .../server/client/ClientServiceHandler.java |   37 +-
 .../server/conf/NamespaceConfiguration.java |5 +-
 .../apache/accumulo/server/init/Initialize.java |9 +-
 .../accumulo/server/master/LiveTServerSet.java  |  114 +-
 .../security/AuditedSecurityOperation.java  |8 +-
 .../server/security/SecurityOperation.java  |6 +-
 .../server/security/handler/ZKPermHandler.java  |6 +-
 .../accumulo/master/FateServiceHandler.java |  412 +
 .../java/org/apache/accumulo/master/Master.java |  852 +-
 .../master/MasterClientServiceHandler.java  |  463 +
 .../accumulo/master/tableOps/CloneTable.java|   10 +-
 .../master/tableOps/RenameNamespace.java|3 +-
 .../accumulo/master/tableOps/RenameTable.java   |3 +-
 .../apache/accumulo/master/tableOps/Utils.java  |4 +-
 .../test/randomwalk/concurrent/Config.java  |4 +-
 .../org/apache/accumulo/test/NamespacesIT.java  | 1202 ++-
 .../org/apache/accumulo/test/ShellServerIT.java |6 +-
 41 files changed, 7683 insertions(+), 11848 deletions(-)
--




[2/8] ACCUMULO-1965 Fix exception handling for namespaces

2013-12-27 Thread ctubbsii
http://git-wip-us.apache.org/repos/asf/accumulo/blob/f35e3f47/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
--
diff --git 
a/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
 
b/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
new file mode 100644
index 000..dc654ae
--- /dev/null
+++ 
b/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
@@ -0,0 +1,463 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the License); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.accumulo.master;
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.client.AccumuloException;
+import org.apache.accumulo.core.client.AccumuloSecurityException;
+import org.apache.accumulo.core.client.Connector;
+import org.apache.accumulo.core.client.IsolatedScanner;
+import org.apache.accumulo.core.client.RowIterator;
+import org.apache.accumulo.core.client.Scanner;
+import org.apache.accumulo.core.client.TableNotFoundException;
+import org.apache.accumulo.core.client.impl.Tables;
+import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
+import org.apache.accumulo.core.client.impl.thrift.TableOperation;
+import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType;
+import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
+import 
org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
+import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.data.Key;
+import org.apache.accumulo.core.data.KeyExtent;
+import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.data.thrift.TKeyExtent;
+import org.apache.accumulo.core.master.thrift.MasterClientService;
+import org.apache.accumulo.core.master.thrift.MasterGoalState;
+import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
+import org.apache.accumulo.core.master.thrift.MasterState;
+import org.apache.accumulo.core.master.thrift.TableInfo;
+import org.apache.accumulo.core.master.thrift.TabletLoadState;
+import org.apache.accumulo.core.master.thrift.TabletServerStatus;
+import org.apache.accumulo.core.master.thrift.TabletSplit;
+import org.apache.accumulo.core.metadata.MetadataTable;
+import org.apache.accumulo.core.metadata.RootTable;
+import org.apache.accumulo.core.metadata.schema.MetadataSchema;
+import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
+import 
org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.LogColumnFamily;
+import org.apache.accumulo.core.security.Authorizations;
+import org.apache.accumulo.core.security.thrift.TCredentials;
+import org.apache.accumulo.core.util.ByteBufferUtil;
+import org.apache.accumulo.core.util.UtilWaitThread;
+import org.apache.accumulo.core.zookeeper.ZooUtil;
+import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
+import org.apache.accumulo.fate.zookeeper.IZooReaderWriter.Mutator;
+import org.apache.accumulo.master.tableOps.TraceRepo;
+import org.apache.accumulo.master.tserverOps.ShutdownTServer;
+import org.apache.accumulo.server.client.ClientServiceHandler;
+import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.master.LiveTServerSet.TServerConnection;
+import org.apache.accumulo.server.master.balancer.DefaultLoadBalancer;
+import org.apache.accumulo.server.master.balancer.TabletBalancer;
+import org.apache.accumulo.server.master.state.DeadServerList;
+import org.apache.accumulo.server.master.state.TServerInstance;
+import org.apache.accumulo.server.master.state.TabletServerState;
+import org.apache.accumulo.server.util.DefaultMap;
+import org.apache.accumulo.server.util.NamespacePropUtil;
+import org.apache.accumulo.server.util.SystemPropUtil;
+import org.apache.accumulo.server.util.TableInfoUtil;
+import org.apache.accumulo.server.util.TablePropUtil;
+import 

git commit: ACCUMULO-2030 Clean up javadoc

2013-12-30 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT cbbcaac88 - 063c88d7e


ACCUMULO-2030 Clean up javadoc

  Fix ambiguous javadoc reference by removing it
  Remove incorrect exception declaration
  Remove unused import warning


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 063c88d7e28573888ebb56773071ba344920a1dd
Parents: cbbcaac
Author: Christopher Tubbs ctubb...@apache.org
Authored: Mon Dec 30 13:01:00 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Mon Dec 30 13:01:00 2013 -0500

--
 .../accumulo/core/security/Authorizations.java  | 137 ++-
 .../accumulo/core/security/Credentials.java |  48 ---
 .../apache/accumulo/test/randomwalk/State.java  |  59 
 3 files changed, 127 insertions(+), 117 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/063c88d7/core/src/main/java/org/apache/accumulo/core/security/Authorizations.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/security/Authorizations.java 
b/core/src/main/java/org/apache/accumulo/core/security/Authorizations.java
index 67349d4..6047352 100644
--- a/core/src/main/java/org/apache/accumulo/core/security/Authorizations.java
+++ b/core/src/main/java/org/apache/accumulo/core/security/Authorizations.java
@@ -38,72 +38,74 @@ import org.apache.commons.codec.binary.Base64;
  * A collection of authorization strings.
  */
 public class Authorizations implements Iterablebyte[], Serializable, 
AuthorizationContainer {
-  
+
   private static final long serialVersionUID = 1L;
-  
+
   private SetByteSequence auths = new HashSetByteSequence();
-  private Listbyte[] authsList = new ArrayListbyte[]();  // sorted order
-  
+  private Listbyte[] authsList = new ArrayListbyte[](); // sorted order
+
   /**
* An empty set of authorizations.
*/
   public static final Authorizations EMPTY = new Authorizations();
-  
+
   private static final boolean[] validAuthChars = new boolean[256];
-  
+
   /**
* A special header string used when serializing instances of this class.
-   *
+   * 
* @see #serialize()
*/
   public static final String HEADER = !AUTH1:;
-  
+
   static {
 for (int i = 0; i  256; i++) {
   validAuthChars[i] = false;
 }
-
+
 for (int i = 'a'; i = 'z'; i++) {
   validAuthChars[i] = true;
 }
-
+
 for (int i = 'A'; i = 'Z'; i++) {
   validAuthChars[i] = true;
 }
-
+
 for (int i = '0'; i = '9'; i++) {
   validAuthChars[i] = true;
 }
-
+
 validAuthChars['_'] = true;
 validAuthChars['-'] = true;
 validAuthChars[':'] = true;
 validAuthChars['.'] = true;
 validAuthChars['/'] = true;
   }
-  
+
   static final boolean isValidAuthChar(byte b) {
 return validAuthChars[0xff  b];
   }
-  
+
   private void checkAuths() {
 SetByteSequence sortedAuths = new TreeSetByteSequence(auths);
-
+
 for (ByteSequence bs : sortedAuths) {
   if (bs.length() == 0) {
 throw new IllegalArgumentException(Empty authorization);
   }
-  
+
   authsList.add(bs.toArray());
 }
   }
-  
+
   /**
-   * Constructs an authorization object from a collection of string 
authorizations that have each already been encoded as UTF-8 bytes. Warning: 
This method
-   * does not verify that each encoded string is valid UTF-8.
+   * Constructs an authorization object from a collection of string 
authorizations that have each already been encoded as UTF-8 bytes. Warning: 
This method does
+   * not verify that each encoded string is valid UTF-8.
* 
-   * @param authorizations collection of authorizations, as strings encoded in 
UTF-8
-   * @throws IllegalArgumentException if authorizations is null
+   * @param authorizations
+   *  collection of authorizations, as strings encoded in UTF-8
+   * @throws IllegalArgumentException
+   *   if authorizations is null
* @see #Authorizations(String...)
*/
   public Authorizations(Collectionbyte[] authorizations) {
@@ -112,13 +114,15 @@ public class Authorizations implements Iterablebyte[], 
Serializable, Authoriza
   auths.add(new ArrayByteSequence(auth));
 checkAuths();
   }
-  
+
   /**
* Constructs an authorization object from a list of string authorizations 
that have each already been encoded as UTF-8 bytes. Warning: This method does 
not
* verify that each encoded string is valid UTF-8.
* 
-   * @param authorizations list of authorizations, as strings encoded in UTF-8 
and placed in buffers
-   * @throws 

git commit: ACCUMULO-2110 cannot remove a FileRef with a Path

2013-12-31 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 379881e69 - 16ccbf5e1


ACCUMULO-2110 cannot remove a FileRef with a Path


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 16ccbf5e16467729b558cf08a379770cba10f5ab
Parents: 379881e
Author: Eric Newton eric.new...@gmail.com
Authored: Tue Dec 31 14:26:29 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Tue Dec 31 15:22:11 2013 -0500

--
 .../src/main/java/org/apache/accumulo/tserver/Tablet.java| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/16ccbf5e/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
--
diff --git 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
index 3c62a86..c4a2770 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java
@@ -704,7 +704,7 @@ public class Tablet {
 ListFileRef files = MetadataTableUtil.getBulkFilesLoaded(conn, 
extent, tid);
 
 for (FileRef file : files)
-  if (paths.keySet().remove(file.path()))
+  if (paths.keySet().remove(file))
 log.debug(Ignoring request to re-import a file already imported: 
 + extent + :  + file);
 
 if (paths.size()  0) {
@@ -3565,7 +3565,7 @@ public class Tablet {
   String time = tabletTime.getMetadataValue();
 
   // it is possible that some of the bulk loading flags will be deleted 
after being read below because the bulk load
-  // finishes therefore split could propogate load flags for a 
finished bulk load... there is a special iterator
+  // finishes therefore split could propagate load flags for a 
finished bulk load... there is a special iterator
   // on the metadata table to clean up this type of garbage
   MapFileRef,Long bulkLoadedFiles = 
MetadataTableUtil.getBulkFilesLoaded(SystemCredentials.get(), extent);
 



[3/3] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

2013-12-31 Thread ctubbsii
Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

Conflicts:
test/system/auto/simple/examples.py


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: b5e84bcd3108b446747e92a4915f7c7afe7f4a2c
Parents: 114b58d d63cf6f
Author: Christopher Tubbs ctubb...@apache.org
Authored: Tue Dec 31 17:43:13 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Tue Dec 31 17:43:13 2013 -0500

--

--




[1/3] git commit: ACCUMULO-2116 Examples functional test should run from outside of ACCUMULO_HOME.

2013-12-31 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 114b58dca - b5e84bcd3


ACCUMULO-2116 Examples functional test should run from outside of ACCUMULO_HOME.

Signed-off-by: Christopher Tubbs ctubb...@apache.org


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 1ad1151ab0ae2c57ff998cf563cbe6a019994724
Parents: d605ebb
Author: Sean Busbey bus...@clouderagovt.com
Authored: Tue Dec 31 15:30:48 2013 -0600
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Tue Dec 31 17:28:43 2013 -0500

--
 test/system/auto/simple/examples.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/1ad1151a/test/system/auto/simple/examples.py
--
diff --git a/test/system/auto/simple/examples.py 
b/test/system/auto/simple/examples.py
index bed321f..f05e58f 100755
--- a/test/system/auto/simple/examples.py
+++ b/test/system/auto/simple/examples.py
@@ -124,8 +124,8 @@ class Examples(TestUtilsMixin, unittest.TestCase):
 self.comment(Creating a sharded index of the accumulo java files)
 self.ashell('createtable shard\ncreatetable doc2term\nquit\n')
 self.execute('/bin/sh', '-c',
- 'find src -name *.java | xargs ./bin/accumulo 
org.apache.accumulo.examples.simple.shard.Index %s %s shard %s %s 30' %
- (INSTANCE_NAME, ZOOKEEPERS, ROOT, ROOT_PASSWORD))
+ 'find %s/src -name *.java | xargs %s/bin/accumulo 
org.apache.accumulo.examples.simple.shard.Index %s %s shard %s %s 30' %
+ (ACCUMULO_HOME, ACCUMULO_HOME, INSTANCE_NAME, ZOOKEEPERS, 
ROOT, ROOT_PASSWORD))
 self.execute(self.accumulo_sh(), 
'org.apache.accumulo.examples.simple.shard.Query',
  INSTANCE_NAME, ZOOKEEPERS, 'shard', ROOT, ROOT_PASSWORD,
  'foo', 'bar')



[2/3] git commit: Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT

2013-12-31 Thread ctubbsii
Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT

Conflicts:
test/system/auto/simple/examples.py


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: d63cf6fe57ccc788e4b3a4ce3b187f0b252784e6
Parents: 89c9962 1ad1151
Author: Christopher Tubbs ctubb...@apache.org
Authored: Tue Dec 31 17:33:35 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Tue Dec 31 17:33:35 2013 -0500

--
 test/system/auto/simple/examples.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d63cf6fe/test/system/auto/simple/examples.py
--
diff --cc test/system/auto/simple/examples.py
index 3ba425e,f05e58f..ba05174
--- a/test/system/auto/simple/examples.py
+++ b/test/system/auto/simple/examples.py
@@@ -128,10 -124,10 +128,10 @@@ class Examples(TestUtilsMixin, unittest
  self.comment(Creating a sharded index of the accumulo java files)
  self.ashell('createtable shard\ncreatetable doc2term\nquit\n')
  self.execute('/bin/sh', '-c',
-  'find server -name *.java | xargs ./bin/accumulo 
org.apache.accumulo.examples.simple.shard.Index -i %s -z %s -t shard -u %s -p 
%s --partitions 30' %
-  (INSTANCE_NAME, ZOOKEEPERS, ROOT, ROOT_PASSWORD))
 - 'find %s/src -name *.java | xargs %s/bin/accumulo 
org.apache.accumulo.examples.simple.shard.Index %s %s shard %s %s 30' %
++ 'find %s/server -name *.java | xargs %s/bin/accumulo 
org.apache.accumulo.examples.simple.shard.Index -i %s -z %s -t shard -u %s -p 
%s --partitions 30' %
+  (ACCUMULO_HOME, ACCUMULO_HOME, INSTANCE_NAME, 
ZOOKEEPERS, ROOT, ROOT_PASSWORD))
  self.execute(self.accumulo_sh(), 
'org.apache.accumulo.examples.simple.shard.Query',
 - INSTANCE_NAME, ZOOKEEPERS, 'shard', ROOT, ROOT_PASSWORD,
 + '-i', INSTANCE_NAME, '-z', ZOOKEEPERS, '-t', 'shard', 
'-u', ROOT, '-p', ROOT_PASSWORD,
   'foo', 'bar')
  self.comment(Creating a word index of the sharded files)
  self.execute(self.accumulo_sh(), 
'org.apache.accumulo.examples.simple.shard.Reverse',



[1/3] git commit: ACCUMULO-2117 ClassLoader test fails to tell the difference on Combiner change.

2013-12-31 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT b5e84bcd3 - 417902e21


ACCUMULO-2117 ClassLoader test fails to tell the difference on Combiner change.

Signed-off-by: Christopher Tubbs ctubb...@apache.org


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 0b6749a4f75bc3fa3ea256c75e5e2ad86103fdb3
Parents: 1ad1151
Author: Sean Busbey bus...@clouderagovt.com
Authored: Tue Dec 31 16:31:07 2013 -0600
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Tue Dec 31 17:48:50 2013 -0500

--
 test/system/auto/TestCombinerY.jar | Bin 4335 - 4129 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0b6749a4/test/system/auto/TestCombinerY.jar
--
diff --git a/test/system/auto/TestCombinerY.jar 
b/test/system/auto/TestCombinerY.jar
index 6cffd86..30da0cb 100644
Binary files a/test/system/auto/TestCombinerY.jar and 
b/test/system/auto/TestCombinerY.jar differ



git commit: ACCUMULO-2117 ClassLoader test fails to tell the difference on Combiner change.

2013-12-31 Thread ctubbsii
Updated Branches:
  refs/heads/1.4.5-SNAPSHOT 1ad1151ab - 0b6749a4f


ACCUMULO-2117 ClassLoader test fails to tell the difference on Combiner change.

Signed-off-by: Christopher Tubbs ctubb...@apache.org


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

Branch: refs/heads/1.4.5-SNAPSHOT
Commit: 0b6749a4f75bc3fa3ea256c75e5e2ad86103fdb3
Parents: 1ad1151
Author: Sean Busbey bus...@clouderagovt.com
Authored: Tue Dec 31 16:31:07 2013 -0600
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Tue Dec 31 17:48:50 2013 -0500

--
 test/system/auto/TestCombinerY.jar | Bin 4335 - 4129 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0b6749a4/test/system/auto/TestCombinerY.jar
--
diff --git a/test/system/auto/TestCombinerY.jar 
b/test/system/auto/TestCombinerY.jar
index 6cffd86..30da0cb 100644
Binary files a/test/system/auto/TestCombinerY.jar and 
b/test/system/auto/TestCombinerY.jar differ



[2/3] git commit: Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT

2013-12-31 Thread ctubbsii
Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 712e946d15786a8bc8e7bed49790cdadcfd134b4
Parents: d63cf6f 0b6749a
Author: Christopher Tubbs ctubb...@apache.org
Authored: Tue Dec 31 17:49:03 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Tue Dec 31 17:49:03 2013 -0500

--
 test/system/auto/TestCombinerY.jar | Bin 4335 - 4129 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
--




[3/3] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

2013-12-31 Thread ctubbsii
Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 417902e218c566333b6ea5ac492186ae305e5e16
Parents: b5e84bc 712e946
Author: Christopher Tubbs ctubb...@apache.org
Authored: Tue Dec 31 17:49:17 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Tue Dec 31 17:49:17 2013 -0500

--
 test/src/test/resources/TestCombinerY.jar | Bin 4335 - 4129 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/417902e2/test/src/test/resources/TestCombinerY.jar
--
diff --cc test/src/test/resources/TestCombinerY.jar
index 6cffd86,000..30da0cb
mode 100644,00..100644
Binary files differ



[2/2] git commit: Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT

2013-12-31 Thread ctubbsii
Merge branch '1.4.5-SNAPSHOT' into 1.5.1-SNAPSHOT


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: 712e946d15786a8bc8e7bed49790cdadcfd134b4
Parents: d63cf6f 0b6749a
Author: Christopher Tubbs ctubb...@apache.org
Authored: Tue Dec 31 17:49:03 2013 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Tue Dec 31 17:49:03 2013 -0500

--
 test/system/auto/TestCombinerY.jar | Bin 4335 - 4129 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
--




git commit: ACCUMULO-2079 Prevent table creation in system namespace

2014-01-03 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT c44fa4f37 - 764884e75


ACCUMULO-2079 Prevent table creation in system namespace

  Consolidated code that checked for preconditions in fate operations,
  and made the checks more explicit and readable, which common exception
  handling. This does not address client side exceptions, but does
  ensure that descriptive messages are sent back to the client.


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 764884e753ba4ff8bab071f622e0bfbb6c8fc6a4
Parents: c44fa4f
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Jan 3 21:58:47 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Jan 3 21:58:47 2014 -0500

--
 .../org/apache/accumulo/core/Constants.java |   2 -
 .../core/client/admin/TableOperations.java  |   2 +-
 .../accumulo/core/client/impl/Namespaces.java   |  41 
 .../accumulo/core/client/impl/Tables.java   |  74 ++-
 .../client/mock/MockNamespaceOperations.java|   4 +-
 .../core/client/mock/MockTableOperations.java   |   3 +-
 .../accumulo/core/util/ArgumentChecker.java |  33 +++
 .../util/shell/commands/CreateTableCommand.java |   4 +-
 .../server/client/ClientServiceHandler.java |  10 +-
 .../accumulo/master/FateServiceHandler.java | 215 +--
 .../master/MasterClientServiceHandler.java  |   4 +-
 .../org/apache/accumulo/test/NamespacesIT.java  |  37 ++--
 12 files changed, 285 insertions(+), 144 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/764884e7/core/src/main/java/org/apache/accumulo/core/Constants.java
--
diff --git a/core/src/main/java/org/apache/accumulo/core/Constants.java 
b/core/src/main/java/org/apache/accumulo/core/Constants.java
index c151abb..7dee32c 100644
--- a/core/src/main/java/org/apache/accumulo/core/Constants.java
+++ b/core/src/main/java/org/apache/accumulo/core/Constants.java
@@ -101,8 +101,6 @@ public class Constants {
 
   public static final int MAX_DATA_TO_PRINT = 64;
   public static final String CORE_PACKAGE_NAME = org.apache.accumulo.core;
-  public static final String VALID_TABLE_NAME_REGEX = ^(\\w+\\.)?(\\w+)$;
-  public static final String VALID_NAMESPACE_REGEX = ^\\w+$;
   public static final String MAPFILE_EXTENSION = map;
   public static final String GENERATED_TABLET_DIRECTORY_PREFIX = t-;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/764884e7/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
index 97066c4..4f6c315 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
@@ -344,7 +344,7 @@ public interface TableOperations {
* @param oldTableName
*  the old table name
* @param newTableName
-   *  the new table name
+   *  the new table name, which must be either unqualified (no 
namespace) or in the same namespace as the oldTableName
* @throws AccumuloException
*   if a general error occurs
* @throws AccumuloSecurityException

http://git-wip-us.apache.org/repos/asf/accumulo/blob/764884e7/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java 
b/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
index 1ca5dee..c134c04 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/Namespaces.java
@@ -26,10 +26,50 @@ import java.util.TreeMap;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.client.NamespaceNotFoundException;
+import org.apache.accumulo.core.util.ArgumentChecker.Validator;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
 
 public class Namespaces {
+  public static final String VALID_NAME_REGEX = ^\\w*$;
+  public static final ValidatorString VALID_NAME = new ValidatorString() {
+@Override
+public boolean isValid(String namespace) {
+  return namespace != null  

[2/2] git commit: Merge branch '1.6.0-SNAPSHOT'

2014-01-03 Thread ctubbsii
Merge branch '1.6.0-SNAPSHOT'


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

Branch: refs/heads/master
Commit: de79c0c8958aa08f89479b419e673f0cb6e15c90
Parents: 1bfa738 764884e
Author: Christopher Tubbs ctubb...@apache.org
Authored: Fri Jan 3 22:01:53 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Fri Jan 3 22:01:53 2014 -0500

--
 .../org/apache/accumulo/core/Constants.java |   2 -
 .../core/client/admin/TableOperations.java  |   2 +-
 .../accumulo/core/client/impl/Namespaces.java   |  41 
 .../accumulo/core/client/impl/Tables.java   |  74 ++-
 .../client/mock/MockNamespaceOperations.java|   4 +-
 .../core/client/mock/MockTableOperations.java   |   3 +-
 .../accumulo/core/util/ArgumentChecker.java |  33 +++
 .../util/shell/commands/CreateTableCommand.java |   4 +-
 .../server/client/ClientServiceHandler.java |  10 +-
 .../accumulo/master/FateServiceHandler.java | 215 +--
 .../master/MasterClientServiceHandler.java  |   4 +-
 .../org/apache/accumulo/test/NamespacesIT.java  |  37 ++--
 12 files changed, 285 insertions(+), 144 deletions(-)
--




git commit: ACCUMULO-1976 Fix upgrade broken by ACCUMULO-2093

2014-01-06 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 9c092cadd - ea8fe5414


ACCUMULO-1976 Fix upgrade broken by ACCUMULO-2093


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: ea8fe54145b306310a93e9df65ea5277dff2853e
Parents: 9c092ca
Author: Christopher Tubbs ctubb...@apache.org
Authored: Mon Jan 6 21:19:00 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Mon Jan 6 21:22:16 2014 -0500

--
 .../accumulo/server/tables/TableManager.java|  5 ++-
 .../java/org/apache/accumulo/master/Master.java | 41 
 2 files changed, 28 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ea8fe541/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java 
b/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
index 0766a17..0f73ae4 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
@@ -59,7 +59,7 @@ public class TableManager {
 
   public static void prepareNewNamespaceState(String instanceId, String 
namespaceId, String namespace, NodeExistsPolicy existsPolicy) throws 
KeeperException,
   InterruptedException {
-// state gets created last
+log.debug(Creating ZooKeeper entries for new namespace  + namespace +  
(ID:  + namespaceId + ));
 String zPath = Constants.ZROOT + / + instanceId + Constants.ZNAMESPACES 
+ / + namespaceId;
 
 IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
@@ -71,6 +71,7 @@ public class TableManager {
   public static void prepareNewTableState(String instanceId, String tableId, 
String namespaceId, String tableName, TableState state,
   NodeExistsPolicy existsPolicy) throws KeeperException, 
InterruptedException {
 // state gets created last
+log.debug(Creating ZooKeeper entries for new table  + tableName +  (ID: 
 + tableId + ) in namespace (ID:  + namespaceId + ));
 PairString,String qualifiedTableName = Tables.qualify(tableName);
 tableName = qualifiedTableName.getSecond();
 String zTablePath = Constants.ZROOT + / + instanceId + Constants.ZTABLES 
+ / + tableId;
@@ -79,10 +80,10 @@ public class TableManager {
 zoo.putPersistentData(zTablePath + Constants.ZTABLE_CONF, new byte[0], 
existsPolicy);
 zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAMESPACE, 
namespaceId.getBytes(Constants.UTF8), existsPolicy);
 zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAME, 
tableName.getBytes(Constants.UTF8), existsPolicy);
-zoo.putPersistentData(zTablePath + Constants.ZTABLE_STATE, 
state.name().getBytes(Constants.UTF8), existsPolicy);
 zoo.putPersistentData(zTablePath + Constants.ZTABLE_FLUSH_ID, 
0.getBytes(Constants.UTF8), existsPolicy);
 zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_ID, 
0.getBytes(Constants.UTF8), existsPolicy);
 zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_CANCEL_ID, 
0.getBytes(Constants.UTF8), existsPolicy);
+zoo.putPersistentData(zTablePath + Constants.ZTABLE_STATE, 
state.name().getBytes(Constants.UTF8), existsPolicy);
   }
 
   public synchronized static TableManager getInstance() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ea8fe541/server/master/src/main/java/org/apache/accumulo/master/Master.java
--
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java 
b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index 304366c..86a35cd 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -64,6 +64,7 @@ import org.apache.accumulo.core.security.NamespacePermission;
 import org.apache.accumulo.core.security.SecurityUtil;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.util.Daemon;
+import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.AgeOffStore;
@@ -127,6 +128,8 @@ import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.data.Stat;
 
+import com.google.common.collect.Iterables;
+
 /**
  * The Master is responsible for assigning and 

[2/2] git commit: Merge branch '1.6.0-SNAPSHOT'

2014-01-06 Thread ctubbsii
Merge branch '1.6.0-SNAPSHOT'


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

Branch: refs/heads/master
Commit: 33a094de4aab9bb26c896a6744e168628316597a
Parents: 4fbba38 ea8fe54
Author: Christopher Tubbs ctubb...@apache.org
Authored: Mon Jan 6 21:26:23 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Mon Jan 6 21:26:23 2014 -0500

--
 .../accumulo/server/tables/TableManager.java|  5 ++-
 .../java/org/apache/accumulo/master/Master.java | 41 
 2 files changed, 28 insertions(+), 18 deletions(-)
--




[1/2] git commit: ACCUMULO-1976 Fix upgrade broken by ACCUMULO-2093

2014-01-06 Thread ctubbsii
Updated Branches:
  refs/heads/master 4fbba38ae - 33a094de4


ACCUMULO-1976 Fix upgrade broken by ACCUMULO-2093


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

Branch: refs/heads/master
Commit: ea8fe54145b306310a93e9df65ea5277dff2853e
Parents: 9c092ca
Author: Christopher Tubbs ctubb...@apache.org
Authored: Mon Jan 6 21:19:00 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Mon Jan 6 21:22:16 2014 -0500

--
 .../accumulo/server/tables/TableManager.java|  5 ++-
 .../java/org/apache/accumulo/master/Master.java | 41 
 2 files changed, 28 insertions(+), 18 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ea8fe541/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java 
b/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
index 0766a17..0f73ae4 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/tables/TableManager.java
@@ -59,7 +59,7 @@ public class TableManager {
 
   public static void prepareNewNamespaceState(String instanceId, String 
namespaceId, String namespace, NodeExistsPolicy existsPolicy) throws 
KeeperException,
   InterruptedException {
-// state gets created last
+log.debug(Creating ZooKeeper entries for new namespace  + namespace +  
(ID:  + namespaceId + ));
 String zPath = Constants.ZROOT + / + instanceId + Constants.ZNAMESPACES 
+ / + namespaceId;
 
 IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
@@ -71,6 +71,7 @@ public class TableManager {
   public static void prepareNewTableState(String instanceId, String tableId, 
String namespaceId, String tableName, TableState state,
   NodeExistsPolicy existsPolicy) throws KeeperException, 
InterruptedException {
 // state gets created last
+log.debug(Creating ZooKeeper entries for new table  + tableName +  (ID: 
 + tableId + ) in namespace (ID:  + namespaceId + ));
 PairString,String qualifiedTableName = Tables.qualify(tableName);
 tableName = qualifiedTableName.getSecond();
 String zTablePath = Constants.ZROOT + / + instanceId + Constants.ZTABLES 
+ / + tableId;
@@ -79,10 +80,10 @@ public class TableManager {
 zoo.putPersistentData(zTablePath + Constants.ZTABLE_CONF, new byte[0], 
existsPolicy);
 zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAMESPACE, 
namespaceId.getBytes(Constants.UTF8), existsPolicy);
 zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAME, 
tableName.getBytes(Constants.UTF8), existsPolicy);
-zoo.putPersistentData(zTablePath + Constants.ZTABLE_STATE, 
state.name().getBytes(Constants.UTF8), existsPolicy);
 zoo.putPersistentData(zTablePath + Constants.ZTABLE_FLUSH_ID, 
0.getBytes(Constants.UTF8), existsPolicy);
 zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_ID, 
0.getBytes(Constants.UTF8), existsPolicy);
 zoo.putPersistentData(zTablePath + Constants.ZTABLE_COMPACT_CANCEL_ID, 
0.getBytes(Constants.UTF8), existsPolicy);
+zoo.putPersistentData(zTablePath + Constants.ZTABLE_STATE, 
state.name().getBytes(Constants.UTF8), existsPolicy);
   }
 
   public synchronized static TableManager getInstance() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/ea8fe541/server/master/src/main/java/org/apache/accumulo/master/Master.java
--
diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java 
b/server/master/src/main/java/org/apache/accumulo/master/Master.java
index 304366c..86a35cd 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java
@@ -64,6 +64,7 @@ import org.apache.accumulo.core.security.NamespacePermission;
 import org.apache.accumulo.core.security.SecurityUtil;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.util.Daemon;
+import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.AgeOffStore;
@@ -127,6 +128,8 @@ import org.apache.zookeeper.WatchedEvent;
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.data.Stat;
 
+import com.google.common.collect.Iterables;
+
 /**
  * The Master is responsible for assigning and balancing 

[1/2] git commit: ACCUMULO-2128 Remove warnings introduced by merge

2014-01-06 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT da9e0f40a - 98211f581


ACCUMULO-2128 Remove warnings introduced by merge


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 21b1b1108b6094d9706d1a01125d8e36041b484c
Parents: 400b991
Author: Christopher Tubbs ctubb...@apache.org
Authored: Mon Jan 6 21:38:20 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Mon Jan 6 21:38:20 2014 -0500

--
 .../apache/accumulo/core/client/ZooKeeperInstance.java   | 11 +--
 .../org/apache/accumulo/test/functional/CleanUpTest.java |  4 ++--
 2 files changed, 7 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/21b1b110/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java 
b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
index ccfb328..18d55a6 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
@@ -37,7 +37,6 @@ import org.apache.accumulo.core.util.ByteBufferUtil;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.OpTimer;
 import org.apache.accumulo.core.util.TextUtil;
-import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
 import org.apache.hadoop.fs.FileStatus;
@@ -222,12 +221,12 @@ public class ZooKeeperInstance implements Instance {
   public Connector getConnector(String principal, AuthenticationToken token) 
throws AccumuloException, AccumuloSecurityException {
 return getConnector(CredentialHelper.create(principal, token, 
getInstanceID()));
   }
-  
+
   @SuppressWarnings(deprecation)
   private Connector getConnector(TCredentials credential) throws 
AccumuloException, AccumuloSecurityException {
 return new ConnectorImpl(this, credential);
   }
-  
+
   @Override
   @Deprecated
   public Connector getConnector(String principal, byte[] pass) throws 
AccumuloException, AccumuloSecurityException {
@@ -255,7 +254,7 @@ public class ZooKeeperInstance implements Instance {
   public static String 
lookupInstanceName(org.apache.accumulo.core.zookeeper.ZooCache zooCache, UUID 
instanceId) {
 return lookupInstanceName((ZooCache) zooCache, instanceId);
   }
-  
+
   /**
* Given a zooCache and instanceId, look up the instance name.
* 
@@ -275,7 +274,7 @@ public class ZooKeeperInstance implements Instance {
 }
 return null;
   }
-  
+
   /**
* To be moved to server code. Only lives here to support certain client 
side utilities to minimize command-line options.
*/
@@ -304,7 +303,7 @@ public class ZooKeeperInstance implements Instance {
   throw new RuntimeException(Accumulo not initialized, there is no 
instance id at  + instanceDirectory, e);
 }
   }
-  
+
   @Deprecated
   @Override
   public Connector 
getConnector(org.apache.accumulo.core.security.thrift.AuthInfo auth) throws 
AccumuloException, AccumuloSecurityException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/21b1b110/test/src/main/java/org/apache/accumulo/test/functional/CleanUpTest.java
--
diff --git 
a/test/src/main/java/org/apache/accumulo/test/functional/CleanUpTest.java 
b/test/src/main/java/org/apache/accumulo/test/functional/CleanUpTest.java
index 5a0ca26..e4cefbf 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/CleanUpTest.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/CleanUpTest.java
@@ -24,6 +24,7 @@ import java.util.Map.Entry;
 import java.util.Set;
 
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -49,10 +50,9 @@ public class CleanUpTest extends FunctionalTest {
   @Override
   public void run() throws Exception {
 
-
 getConnector().tableOperations().create(test);
 
-BatchWriter bw = getConnector().createBatchWriter(test, 100, 6, 
1);
+BatchWriter bw = getConnector().createBatchWriter(test, new 
BatchWriterConfig());
 
 Mutation m1 = new Mutation(r1);
 m1.put(cf1, cq1, 1, 5);



[3/3] git commit: Merge branch '1.6.0-SNAPSHOT'

2014-01-06 Thread ctubbsii
Merge branch '1.6.0-SNAPSHOT'


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

Branch: refs/heads/master
Commit: a2652c3c41fd2c4b50c5b4d98d8edf07dcbc99f3
Parents: ac28b22 98211f5
Author: Christopher Tubbs ctubb...@apache.org
Authored: Mon Jan 6 21:50:12 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Mon Jan 6 21:50:12 2014 -0500

--
 .../java/org/apache/accumulo/core/client/ZooKeeperInstance.java | 1 -
 1 file changed, 1 deletion(-)
--




[2/3] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

2014-01-06 Thread ctubbsii
Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

Conflicts:

core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
test/src/test/java/org/apache/accumulo/test/functional/CleanUpIT.java


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

Branch: refs/heads/master
Commit: 98211f5812c3900963953b38f231827af7ea6397
Parents: da9e0f4 21b1b11
Author: Christopher Tubbs ctubb...@apache.org
Authored: Mon Jan 6 21:49:41 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Mon Jan 6 21:49:41 2014 -0500

--
 .../java/org/apache/accumulo/core/client/ZooKeeperInstance.java | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/98211f58/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
--
diff --cc 
core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
index 1497153,18d55a6..8b0546a
--- a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
@@@ -28,17 -28,20 +28,16 @@@ import org.apache.accumulo.core.client.
  import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
  import org.apache.accumulo.core.client.security.tokens.PasswordToken;
  import org.apache.accumulo.core.conf.AccumuloConfiguration;
 -import org.apache.accumulo.core.conf.Property;
 -import org.apache.accumulo.core.file.FileUtil;
 -import org.apache.accumulo.core.security.CredentialHelper;
 -import org.apache.accumulo.core.security.thrift.TCredentials;
 +import org.apache.accumulo.core.conf.DefaultConfiguration;
 +import org.apache.accumulo.core.metadata.RootTable;
 +import org.apache.accumulo.core.security.Credentials;
  import org.apache.accumulo.core.util.ArgumentChecker;
  import org.apache.accumulo.core.util.ByteBufferUtil;
 -import org.apache.accumulo.core.util.CachedConfiguration;
  import org.apache.accumulo.core.util.OpTimer;
  import org.apache.accumulo.core.util.TextUtil;
- import org.apache.accumulo.core.util.ThriftUtil;
  import org.apache.accumulo.core.zookeeper.ZooUtil;
  import org.apache.accumulo.fate.zookeeper.ZooCache;
 -import org.apache.hadoop.fs.FileStatus;
 -import org.apache.hadoop.fs.FileSystem;
 -import org.apache.hadoop.fs.Path;
 +import org.apache.commons.configuration.Configuration;
  import org.apache.hadoop.io.Text;
  import org.apache.log4j.Level;
  import org.apache.log4j.Logger;



[1/3] git commit: ACCUMULO-2128 Remove warnings introduced by merge

2014-01-06 Thread ctubbsii
Updated Branches:
  refs/heads/master ac28b2253 - a2652c3c4


ACCUMULO-2128 Remove warnings introduced by merge


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

Branch: refs/heads/master
Commit: 21b1b1108b6094d9706d1a01125d8e36041b484c
Parents: 400b991
Author: Christopher Tubbs ctubb...@apache.org
Authored: Mon Jan 6 21:38:20 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Mon Jan 6 21:38:20 2014 -0500

--
 .../apache/accumulo/core/client/ZooKeeperInstance.java   | 11 +--
 .../org/apache/accumulo/test/functional/CleanUpTest.java |  4 ++--
 2 files changed, 7 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/21b1b110/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java 
b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
index ccfb328..18d55a6 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
@@ -37,7 +37,6 @@ import org.apache.accumulo.core.util.ByteBufferUtil;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.OpTimer;
 import org.apache.accumulo.core.util.TextUtil;
-import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
 import org.apache.hadoop.fs.FileStatus;
@@ -222,12 +221,12 @@ public class ZooKeeperInstance implements Instance {
   public Connector getConnector(String principal, AuthenticationToken token) 
throws AccumuloException, AccumuloSecurityException {
 return getConnector(CredentialHelper.create(principal, token, 
getInstanceID()));
   }
-  
+
   @SuppressWarnings(deprecation)
   private Connector getConnector(TCredentials credential) throws 
AccumuloException, AccumuloSecurityException {
 return new ConnectorImpl(this, credential);
   }
-  
+
   @Override
   @Deprecated
   public Connector getConnector(String principal, byte[] pass) throws 
AccumuloException, AccumuloSecurityException {
@@ -255,7 +254,7 @@ public class ZooKeeperInstance implements Instance {
   public static String 
lookupInstanceName(org.apache.accumulo.core.zookeeper.ZooCache zooCache, UUID 
instanceId) {
 return lookupInstanceName((ZooCache) zooCache, instanceId);
   }
-  
+
   /**
* Given a zooCache and instanceId, look up the instance name.
* 
@@ -275,7 +274,7 @@ public class ZooKeeperInstance implements Instance {
 }
 return null;
   }
-  
+
   /**
* To be moved to server code. Only lives here to support certain client 
side utilities to minimize command-line options.
*/
@@ -304,7 +303,7 @@ public class ZooKeeperInstance implements Instance {
   throw new RuntimeException(Accumulo not initialized, there is no 
instance id at  + instanceDirectory, e);
 }
   }
-  
+
   @Deprecated
   @Override
   public Connector 
getConnector(org.apache.accumulo.core.security.thrift.AuthInfo auth) throws 
AccumuloException, AccumuloSecurityException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/21b1b110/test/src/main/java/org/apache/accumulo/test/functional/CleanUpTest.java
--
diff --git 
a/test/src/main/java/org/apache/accumulo/test/functional/CleanUpTest.java 
b/test/src/main/java/org/apache/accumulo/test/functional/CleanUpTest.java
index 5a0ca26..e4cefbf 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/CleanUpTest.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/CleanUpTest.java
@@ -24,6 +24,7 @@ import java.util.Map.Entry;
 import java.util.Set;
 
 import org.apache.accumulo.core.client.BatchWriter;
+import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -49,10 +50,9 @@ public class CleanUpTest extends FunctionalTest {
   @Override
   public void run() throws Exception {
 
-
 getConnector().tableOperations().create(test);
 
-BatchWriter bw = getConnector().createBatchWriter(test, 100, 6, 
1);
+BatchWriter bw = getConnector().createBatchWriter(test, new 
BatchWriterConfig());
 
 Mutation m1 = new Mutation(r1);
 m1.put(cf1, cq1, 1, 5);



git commit: ACCUMULO-2196 ConfigurableMacIT tests should each use their own dirs

2014-01-23 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 9440d15cb - e36ac378d


ACCUMULO-2196 ConfigurableMacIT tests should each use their own dirs

Signed-off-by: Christopher Tubbs ctubb...@apache.org


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: e36ac378d13535b869336c0e6737274d255c72df
Parents: 9440d15
Author: Vikram Srivastava vikr...@cloudera.com
Authored: Thu Jan 23 15:33:49 2014 -0800
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Thu Jan 23 18:38:37 2014 -0500

--
 .../org/apache/accumulo/test/functional/ConfigurableMacIT.java| 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e36ac378/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
--
diff --git 
a/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java 
b/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
index 8dafe53..7899bf9 100644
--- 
a/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
+++ 
b/test/src/test/java/org/apache/accumulo/test/functional/ConfigurableMacIT.java
@@ -41,7 +41,8 @@ public class ConfigurableMacIT extends AbstractMacIT {
 
   @Before
   public void setUp() throws Exception {
-MiniAccumuloConfigImpl cfg = new 
MiniAccumuloConfigImpl(createTestDir(this.getClass().getName()), ROOT_PASSWORD);
+MiniAccumuloConfigImpl cfg = new MiniAccumuloConfigImpl(
+createTestDir(this.getClass().getName() + _ + 
this.testName.getMethodName()), ROOT_PASSWORD);
 cfg.setNativeLibPaths(NativeMapIT.nativeMapLocation().getAbsolutePath());
 configure(cfg);
 cfg.setProperty(Property.TSERV_NATIVEMAP_ENABLED, Boolean.TRUE.toString());



git commit: ACCUMULO-1961 Fix/remove some more trivial warnings

2014-02-05 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT a72dd7867 - 7820120fb


ACCUMULO-1961 Fix/remove some more trivial warnings


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 7820120fb2ce4c18317ab77b6439197084ceac8f
Parents: a72dd78
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 5 15:36:27 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 5 15:36:27 2014 -0500

--
 .../core/client/ClientConfiguration.java|   2 +-
 .../lib/partition/RangePartitioner.java |  27 ++--
 .../mapreduce/AccumuloInputFormatTest.java  |   3 +-
 .../apache/accumulo/fate/util/AddressUtil.java  |  27 ++--
 .../minicluster/MiniAccumuloCluster.java|   2 -
 .../impl/MiniAccumuloConfigImpl.java|   2 -
 .../accumulo/server/util/SendLogToChainsaw.java |  69 +-
 .../org/apache/accumulo/test/VerifyIngest.java  |  89 ++--
 .../test/continuous/UndefinedAnalyzer.java  | 134 ++-
 .../accumulo/test/functional/TabletIT.java  |   2 -
 10 files changed, 177 insertions(+), 180 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7820120f/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java 
b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
index a3d51cf..b0ae537 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java
@@ -128,7 +128,7 @@ public class ClientConfiguration extends 
CompositeConfiguration {
* the one in the configuration.
* 
* @see PropertiesConfiguration
-   * @see File.pathSeparator
+   * @see File#pathSeparator
*/
   public static ClientConfiguration loadDefault() {
 return loadFromSearchPath(getDefaultSearchPath());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7820120f/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
 
b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
index 3cb69ad..1569579 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
@@ -19,7 +19,6 @@ package 
org.apache.accumulo.core.client.mapreduce.lib.partition;
 import java.io.BufferedReader;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
-import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.net.URI;
@@ -45,9 +44,9 @@ public class RangePartitioner extends 
PartitionerText,Writable implements Conf
   private static final String PREFIX = RangePartitioner.class.getName();
   private static final String CUTFILE_KEY = PREFIX + .cutFile;
   private static final String NUM_SUBBINS = PREFIX + .subBins;
-  
+
   private Configuration conf;
-  
+
   @Override
   public int getPartition(Text key, Writable value, int numPartitions) {
 try {
@@ -56,21 +55,21 @@ public class RangePartitioner extends 
PartitionerText,Writable implements Conf
   throw new RuntimeException(e);
 }
   }
-  
+
   int findPartition(Text key, Text[] array, int numSubBins) {
 // find the bin for the range, and guarantee it is positive
 int index = Arrays.binarySearch(array, key);
 index = index  0 ? (index + 1) * -1 : index;
-
+
 // both conditions work with numSubBins == 1, but this check is to avoid
 // hashing, when we don't need to, for speed
 if (numSubBins  2)
   return index;
 return (key.toString().hashCode()  Integer.MAX_VALUE) % numSubBins + 
index * numSubBins;
   }
-  
+
   private int _numSubBins = 0;
-  
+
   private synchronized int getNumSubBins() {
 if (_numSubBins  1) {
   // get number of sub-bins and guarantee it is positive
@@ -78,14 +77,14 @@ public class RangePartitioner extends 
PartitionerText,Writable implements Conf
 }
 return _numSubBins;
   }
-  
+
   private Text cutPointArray[] = null;
-  
+
   private synchronized Text[] getCutPoints() throws IOException {
 if (cutPointArray == null) {
   String cutFileName = 

git commit: ACCUMULO-2114 Move built-in namespace names to a method

2014-02-05 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 7820120fb - 7f789ecbd


ACCUMULO-2114 Move built-in namespace names to a method


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 7f789ecbdcb902f9a14ddb2192ffa5a42bb2787b
Parents: 7820120
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 5 15:53:08 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 5 15:53:08 2014 -0500

--
 .../accumulo/core/client/ClientConstants.java   | 22 ---
 .../core/client/admin/NamespaceOperations.java  | 23 
 .../client/admin/NamespaceOperationsHelper.java | 11 ++
 .../accumulo/core/client/impl/Namespaces.java   |  3 +--
 .../org/apache/accumulo/test/NamespacesIT.java  |  8 ++-
 5 files changed, 38 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f789ecb/core/src/main/java/org/apache/accumulo/core/client/ClientConstants.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/ClientConstants.java 
b/core/src/main/java/org/apache/accumulo/core/client/ClientConstants.java
deleted file mode 100644
index 4514e82..000
--- a/core/src/main/java/org/apache/accumulo/core/client/ClientConstants.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the License); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.core.client;
-
-
-public class ClientConstants {
-  public static final String DEFAULT_NAMESPACE = ;
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f789ecb/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
index 269e563..c6dff92 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
@@ -40,6 +40,22 @@ import 
org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
 public interface NamespaceOperations {
 
   /**
+   * Returns the name of the system reserved namespace
+   * 
+   * @return the name of the system namespace
+   * @since 1.6.0
+   */
+  String systemNamespace();
+
+  /**
+   * Returns the name of the default namespace
+   * 
+   * @return the name of the default namespace
+   * @since 1.6.0
+   */
+  String defaultNamespace();
+
+  /**
* Retrieve a list of namespaces in Accumulo.
* 
* @return List of namespaces in accumulo
@@ -293,8 +309,8 @@ public interface NamespaceOperations {
*   if the specified namespace doesn't exist
* @since 1.6.0
*/
-  void checkIteratorConflicts(String namespace, IteratorSetting setting, 
EnumSetIteratorScope scopes) throws AccumuloException,
-  AccumuloSecurityException, NamespaceNotFoundException;
+  void checkIteratorConflicts(String namespace, IteratorSetting setting, 
EnumSetIteratorScope scopes) throws AccumuloException, 
AccumuloSecurityException,
+  NamespaceNotFoundException;
 
   /**
* Add a new constraint to a namespace.
@@ -365,6 +381,5 @@ public interface NamespaceOperations {
*   if the specified namespace doesn't exist
* @since 1.6.0
*/
-  boolean testClassLoad(String namespace, String className, String asTypeName) 
throws AccumuloException, AccumuloSecurityException,
-  NamespaceNotFoundException;
+  boolean testClassLoad(String namespace, String className, String asTypeName) 
throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
 }


[2/2] git commit: ACCUMULO-1989 Use default namespace name explicitly in shell

2014-02-05 Thread ctubbsii
ACCUMULO-1989 Use default namespace name explicitly in shell


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: a8f154e45d60304827e681d6a74cc7f9dc3aab94
Parents: ec4bc2f
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 5 18:59:56 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 5 18:59:56 2014 -0500

--
 .../org/apache/accumulo/core/util/shell/Shell.java |  4 ++--
 .../core/util/shell/commands/NamespacesCommand.java|  2 +-
 .../java/org/apache/accumulo/test/ShellServerIT.java   | 13 +++--
 3 files changed, 10 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a8f154e4/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
--
diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java 
b/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
index e4a01f9..7f1b8dc 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
@@ -751,8 +751,7 @@ public class Shell extends ShellOptions {
   modifiedUserlist.add(a.replaceAll(([\\s'\]), $1));
 for (String a : namespaces) {
   String b = a.replaceAll(([\\s'\]), $1);
-  if (!b.isEmpty())
-modifiedNamespaces.add(b);
+  modifiedNamespaces.add(b.isEmpty() ? \\ : b);
 }
 
 options.put(Command.CompletionSet.USERNAMES, modifiedUserlist);
@@ -881,6 +880,7 @@ public class Shell extends ShellOptions {
 
   public interface PrintLine {
 void print(String s);
+
 void close();
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a8f154e4/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
 
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
index 7f41c32..16ee645 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/util/shell/commands/NamespacesCommand.java
@@ -37,7 +37,7 @@ import com.google.common.collect.Iterators;
 public class NamespacesCommand extends Command {
   private Option disablePaginationOpt, namespaceIdOption;
 
-  private static final String DEFAULT_NAMESPACE_DISPLAY_NAME = (default);
+  private static final String DEFAULT_NAMESPACE_DISPLAY_NAME = \\;
 
   @Override
   public int execute(final String fullCommand, final CommandLine cl, final 
Shell shellState) throws AccumuloException, AccumuloSecurityException, 
IOException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a8f154e4/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
--
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java 
b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
index 58652c7..5e6a353 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
@@ -415,9 +415,9 @@ public class ShellServerIT extends SimpleMacIT {
 tableName = tableName + 1;
 
 exec(createtable  + tableName, true);
- 
+
 input.set(customcfcounter\nname1 value1\nname2 value2\n\n);
- 
+
 // Name on the CLI should override OptionDescriber (or user input name, in 
this case)
 exec(setiter -scan -class 
org.apache.accumulo.core.iterators.ColumnFamilyCounter -p 30, true);
 expectedKey = table.iterator.scan.customcfcounter;
@@ -432,7 +432,7 @@ public class ShellServerIT extends SimpleMacIT {
 
 exec(deletetable  + tableName, true);
 tableName = tableName + 1;
- 
+
 exec(createtable  + tableName, true);
 
 input.set(\nname1 value1.1,value1.2,value1.3\nname2 value2\n\n);
@@ -449,7 +449,7 @@ public class ShellServerIT extends SimpleMacIT {
 expectedValue = value2;
 checkTableForProperty(tops, tableName, expectedKey, expectedValue);
   }
-  
+
   protected void checkTableForProperty(TableOperations tops, String tableName, 
String expectedKey, String expectedValue) throws Exception {
 for (int i = 0; i  5; i++) {
   for (EntryString,String entry : tops.getProperties(tableName)) {
@@ -460,7 +460,7 @@ public class ShellServerIT extends SimpleMacIT {
   }
   Thread.sleep(500);
 }
-

[1/2] git commit: ACCUMULO-2317 Apply ClientOpts fix to shell also

2014-02-05 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 7f789ecbd - a8f154e45


ACCUMULO-2317 Apply ClientOpts fix to shell also


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: ec4bc2fb274003e09fab0107f0b6d37a7df0df3a
Parents: 7f789ec
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 5 18:57:59 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 5 18:57:59 2014 -0500

--
 .../core/util/shell/ShellOptionsJC.java | 100 ++-
 1 file changed, 52 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ec4bc2fb/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java 
b/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
index 7032e0d..38692a0 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
@@ -40,12 +40,13 @@ import com.beust.jcommander.converters.FileConverter;
 public class ShellOptionsJC {
   // Use the Shell logger because this is really just an extension.
   public static final Logger log = Logger.getLogger(Shell.class);
-  
+
   @Parameter(names = {-u, --user}, description = username (defaults to 
your OS user))
   private String username = System.getProperty(user.name, root);
-  
+
   public static class PasswordConverter implements IStringConverterString {
 public static final String STDIN = stdin;
+
 private enum KeyType {
   PASS(pass:), ENV(env:) {
 @Override
@@ -74,49 +75,50 @@ public class ShellOptionsJC {
 public boolean matches(String value) {
   return prefix.equals(value);
 }
-
+
 @Override
 public String convert(String value) {
   // Will check for this later
   return prefix;
 }
   };
-  
+
   String prefix;
-  
+
   private KeyType(String prefix) {
 this.prefix = prefix;
   }
-  
+
   public boolean matches(String value) {
 return value.startsWith(prefix);
   }
-  
+
   public String convert(String value) {
 return process(value.substring(prefix.length()));
   }
-  
+
   String process(String value) {
 return value;
   }
 };
-
+
+@Override
 public String convert(String value) {
   for (KeyType keyType : KeyType.values()) {
 if (keyType.matches(value)) {
   return keyType.convert(value);
 }
   }
-  
+
   return value;
 }
   }
-  
+
   // Note: Don't use password = true because then it will prompt even if we 
have a token
   @Parameter(names = {-p, --password}, description = password (can be 
specified as 'pass:password', 'file:local file containing the password', 
   + 'env:variable containing the pass', or stdin), converter = 
PasswordConverter.class)
   private String password;
-  
+
   public static class TokenConverter implements 
IStringConverterAuthenticationToken {
 @Override
 public AuthenticationToken convert(String value) {
@@ -128,114 +130,116 @@ public class ShellOptionsJC {
   }
 }
   }
-  
+
   @Parameter(names = {-tc, --tokenClass}, description = token type to 
create, use the -l to pass options, converter = TokenConverter.class)
   private AuthenticationToken authenticationToken;
-  
+
   @DynamicParameter(names = {-l, --tokenProperty}, description = login 
properties in the format key=value. Reuse -l for each property)
   private MapString,String tokenProperties = new TreeMapString,String();
-  
+
   @Parameter(names = --disable-tab-completion, description = disables tab 
completion (for less overhead when scripting))
   private boolean tabCompletionDisabled;
-  
+
   @Parameter(names = --debug, description = enables client debugging)
   private boolean debugEnabled;
-  
+
   @Parameter(names = --fake, description = fake a connection to accumulo)
   private boolean fake;
-  
+
   @Parameter(names = {-?, --help}, help = true, description = display 
this help)
   private boolean helpEnabled;
-  
+
   @Parameter(names = {-e, --execute-command}, description = executes a 
command, and then exits)
   private String execCommand;
-  
+
   @Parameter(names = {-f, --execute-file}, description = executes 
commands from a file at startup, converter = FileConverter.class)
   private File execFile;
-  
+
   @Parameter(names = {-fv, 

git commit: ACCUMULO-2092 Make client view of table existence consistent

2014-02-05 Thread ctubbsii
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT a8f154e45 - b0b2c4992


ACCUMULO-2092 Make client view of table existence consistent

  Clear the cache after exceptions, instead of just successful fate
  operations. This ensures that a failure as the result of a
  TableNotFoundException or TableExistsException will be consistent with
  the client's view, if they check it right after the failure.


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: b0b2c49925735ca02019773e31c0ebee0e4a4260
Parents: a8f154e
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 5 19:14:06 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 5 19:14:06 2014 -0500

--
 .../core/client/admin/TableOperationsImpl.java| 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b0b2c499/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
index f459275..0245ef1 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
@@ -309,7 +309,6 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 return null;
   }
   String ret = waitForFateOperation(opid);
-  Tables.clearCache(instance);
   return ret;
 } catch (ThriftSecurityException e) {
   String tableName = ByteBufferUtil.toString(args.get(0));
@@ -340,6 +339,7 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 } catch (Exception e) {
   throw new AccumuloException(e.getMessage(), e);
 } finally {
+  Tables.clearCache(instance);
   // always finish table op, even when exception
   if (opid != null)
 try {
@@ -528,8 +528,8 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 
 ArgumentChecker.notNull(tableName);
 ByteBuffer EMPTY = ByteBuffer.allocate(0);
-ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)), start == 
null ? EMPTY : TextUtil.getByteBuffer(start), end == null ? EMPTY
-: TextUtil.getByteBuffer(end));
+ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)), start == 
null ? EMPTY : TextUtil.getByteBuffer(start),
+end == null ? EMPTY : TextUtil.getByteBuffer(end));
 MapString,String opts = new HashMapString,String();
 try {
   doTableFateOperation(tableName, TableNotFoundException.class, 
FateOperation.TABLE_MERGE, args, opts);
@@ -544,8 +544,8 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 
 ArgumentChecker.notNull(tableName);
 ByteBuffer EMPTY = ByteBuffer.allocate(0);
-ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)), start == 
null ? EMPTY : TextUtil.getByteBuffer(start), end == null ? EMPTY
-: TextUtil.getByteBuffer(end));
+ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)), start == 
null ? EMPTY : TextUtil.getByteBuffer(start),
+end == null ? EMPTY : TextUtil.getByteBuffer(end));
 MapString,String opts = new HashMapString,String();
 try {
   doTableFateOperation(tableName, TableNotFoundException.class, 
FateOperation.TABLE_DELETE_RANGE, args, opts);
@@ -787,8 +787,8 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 if (flush)
   _flush(tableId, start, end, true);
 
-ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableId.getBytes(Constants.UTF8)), start == null 
? EMPTY : TextUtil.getByteBuffer(start), end == null ? EMPTY
-: TextUtil.getByteBuffer(end), 
ByteBuffer.wrap(IteratorUtil.encodeIteratorSettings(iterators)));
+ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableId.getBytes(Constants.UTF8)), start == null 
? EMPTY : TextUtil.getByteBuffer(start),
+end == null ? EMPTY : TextUtil.getByteBuffer(end), 
ByteBuffer.wrap(IteratorUtil.encodeIteratorSettings(iterators)));
 
 MapString,String opts = new HashMapString,String();
 try {



[3/6] git commit: ACCUMULO-2317 Apply ClientOpts fix to shell also

2014-02-05 Thread ctubbsii
ACCUMULO-2317 Apply ClientOpts fix to shell also


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

Branch: refs/heads/master
Commit: ec4bc2fb274003e09fab0107f0b6d37a7df0df3a
Parents: 7f789ec
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 5 18:57:59 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 5 18:57:59 2014 -0500

--
 .../core/util/shell/ShellOptionsJC.java | 100 ++-
 1 file changed, 52 insertions(+), 48 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ec4bc2fb/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java 
b/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
index 7032e0d..38692a0 100644
--- a/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/ShellOptionsJC.java
@@ -40,12 +40,13 @@ import com.beust.jcommander.converters.FileConverter;
 public class ShellOptionsJC {
   // Use the Shell logger because this is really just an extension.
   public static final Logger log = Logger.getLogger(Shell.class);
-  
+
   @Parameter(names = {-u, --user}, description = username (defaults to 
your OS user))
   private String username = System.getProperty(user.name, root);
-  
+
   public static class PasswordConverter implements IStringConverterString {
 public static final String STDIN = stdin;
+
 private enum KeyType {
   PASS(pass:), ENV(env:) {
 @Override
@@ -74,49 +75,50 @@ public class ShellOptionsJC {
 public boolean matches(String value) {
   return prefix.equals(value);
 }
-
+
 @Override
 public String convert(String value) {
   // Will check for this later
   return prefix;
 }
   };
-  
+
   String prefix;
-  
+
   private KeyType(String prefix) {
 this.prefix = prefix;
   }
-  
+
   public boolean matches(String value) {
 return value.startsWith(prefix);
   }
-  
+
   public String convert(String value) {
 return process(value.substring(prefix.length()));
   }
-  
+
   String process(String value) {
 return value;
   }
 };
-
+
+@Override
 public String convert(String value) {
   for (KeyType keyType : KeyType.values()) {
 if (keyType.matches(value)) {
   return keyType.convert(value);
 }
   }
-  
+
   return value;
 }
   }
-  
+
   // Note: Don't use password = true because then it will prompt even if we 
have a token
   @Parameter(names = {-p, --password}, description = password (can be 
specified as 'pass:password', 'file:local file containing the password', 
   + 'env:variable containing the pass', or stdin), converter = 
PasswordConverter.class)
   private String password;
-  
+
   public static class TokenConverter implements 
IStringConverterAuthenticationToken {
 @Override
 public AuthenticationToken convert(String value) {
@@ -128,114 +130,116 @@ public class ShellOptionsJC {
   }
 }
   }
-  
+
   @Parameter(names = {-tc, --tokenClass}, description = token type to 
create, use the -l to pass options, converter = TokenConverter.class)
   private AuthenticationToken authenticationToken;
-  
+
   @DynamicParameter(names = {-l, --tokenProperty}, description = login 
properties in the format key=value. Reuse -l for each property)
   private MapString,String tokenProperties = new TreeMapString,String();
-  
+
   @Parameter(names = --disable-tab-completion, description = disables tab 
completion (for less overhead when scripting))
   private boolean tabCompletionDisabled;
-  
+
   @Parameter(names = --debug, description = enables client debugging)
   private boolean debugEnabled;
-  
+
   @Parameter(names = --fake, description = fake a connection to accumulo)
   private boolean fake;
-  
+
   @Parameter(names = {-?, --help}, help = true, description = display 
this help)
   private boolean helpEnabled;
-  
+
   @Parameter(names = {-e, --execute-command}, description = executes a 
command, and then exits)
   private String execCommand;
-  
+
   @Parameter(names = {-f, --execute-file}, description = executes 
commands from a file at startup, converter = FileConverter.class)
   private File execFile;
-  
+
   @Parameter(names = {-fv, --execute-file-verbose}, description = 
executes commands from a file at 

[2/6] git commit: ACCUMULO-2114 Move built-in namespace names to a method

2014-02-05 Thread ctubbsii
ACCUMULO-2114 Move built-in namespace names to a method


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

Branch: refs/heads/master
Commit: 7f789ecbdcb902f9a14ddb2192ffa5a42bb2787b
Parents: 7820120
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 5 15:53:08 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 5 15:53:08 2014 -0500

--
 .../accumulo/core/client/ClientConstants.java   | 22 ---
 .../core/client/admin/NamespaceOperations.java  | 23 
 .../client/admin/NamespaceOperationsHelper.java | 11 ++
 .../accumulo/core/client/impl/Namespaces.java   |  3 +--
 .../org/apache/accumulo/test/NamespacesIT.java  |  8 ++-
 5 files changed, 38 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f789ecb/core/src/main/java/org/apache/accumulo/core/client/ClientConstants.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/ClientConstants.java 
b/core/src/main/java/org/apache/accumulo/core/client/ClientConstants.java
deleted file mode 100644
index 4514e82..000
--- a/core/src/main/java/org/apache/accumulo/core/client/ClientConstants.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the License); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.core.client;
-
-
-public class ClientConstants {
-  public static final String DEFAULT_NAMESPACE = ;
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f789ecb/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
index 269e563..c6dff92 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperations.java
@@ -40,6 +40,22 @@ import 
org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
 public interface NamespaceOperations {
 
   /**
+   * Returns the name of the system reserved namespace
+   * 
+   * @return the name of the system namespace
+   * @since 1.6.0
+   */
+  String systemNamespace();
+
+  /**
+   * Returns the name of the default namespace
+   * 
+   * @return the name of the default namespace
+   * @since 1.6.0
+   */
+  String defaultNamespace();
+
+  /**
* Retrieve a list of namespaces in Accumulo.
* 
* @return List of namespaces in accumulo
@@ -293,8 +309,8 @@ public interface NamespaceOperations {
*   if the specified namespace doesn't exist
* @since 1.6.0
*/
-  void checkIteratorConflicts(String namespace, IteratorSetting setting, 
EnumSetIteratorScope scopes) throws AccumuloException,
-  AccumuloSecurityException, NamespaceNotFoundException;
+  void checkIteratorConflicts(String namespace, IteratorSetting setting, 
EnumSetIteratorScope scopes) throws AccumuloException, 
AccumuloSecurityException,
+  NamespaceNotFoundException;
 
   /**
* Add a new constraint to a namespace.
@@ -365,6 +381,5 @@ public interface NamespaceOperations {
*   if the specified namespace doesn't exist
* @since 1.6.0
*/
-  boolean testClassLoad(String namespace, String className, String asTypeName) 
throws AccumuloException, AccumuloSecurityException,
-  NamespaceNotFoundException;
+  boolean testClassLoad(String namespace, String className, String asTypeName) 
throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException;
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f789ecb/core/src/main/java/org/apache/accumulo/core/client/admin/NamespaceOperationsHelper.java

[6/6] git commit: Merge remote-tracking branch 'origin/1.6.0-SNAPSHOT'

2014-02-05 Thread ctubbsii
Merge remote-tracking branch 'origin/1.6.0-SNAPSHOT'


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

Branch: refs/heads/master
Commit: 275d7941b3215087d068ea6924b87bac7462f821
Parents: fcc17fc b0b2c49
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 5 19:26:45 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 5 19:26:45 2014 -0500

--
 .../core/client/ClientConfiguration.java|   2 +-
 .../accumulo/core/client/ClientConstants.java   |  22 ---
 .../core/client/admin/NamespaceOperations.java  |  23 +++-
 .../client/admin/NamespaceOperationsHelper.java |  11 ++
 .../core/client/admin/TableOperationsImpl.java  |  14 +-
 .../accumulo/core/client/impl/Namespaces.java   |   3 +-
 .../lib/partition/RangePartitioner.java |  27 ++--
 .../apache/accumulo/core/util/shell/Shell.java  |   4 +-
 .../core/util/shell/ShellOptionsJC.java | 100 +++---
 .../util/shell/commands/NamespacesCommand.java  |   2 +-
 .../mapreduce/AccumuloInputFormatTest.java  |   3 +-
 .../apache/accumulo/fate/util/AddressUtil.java  |  27 ++--
 .../minicluster/MiniAccumuloCluster.java|   1 -
 .../accumulo/server/util/SendLogToChainsaw.java |  69 +-
 .../org/apache/accumulo/test/VerifyIngest.java  |  89 ++--
 .../test/continuous/UndefinedAnalyzer.java  | 134 ++-
 .../org/apache/accumulo/test/NamespacesIT.java  |   8 +-
 .../org/apache/accumulo/test/ShellServerIT.java |  13 +-
 .../accumulo/test/functional/TabletIT.java  |   2 -
 19 files changed, 284 insertions(+), 270 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/275d7941/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
--



[5/6] git commit: ACCUMULO-2092 Make client view of table existence consistent

2014-02-05 Thread ctubbsii
ACCUMULO-2092 Make client view of table existence consistent

  Clear the cache after exceptions, instead of just successful fate
  operations. This ensures that a failure as the result of a
  TableNotFoundException or TableExistsException will be consistent with
  the client's view, if they check it right after the failure.


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

Branch: refs/heads/master
Commit: b0b2c49925735ca02019773e31c0ebee0e4a4260
Parents: a8f154e
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 5 19:14:06 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 5 19:14:06 2014 -0500

--
 .../core/client/admin/TableOperationsImpl.java| 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/b0b2c499/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
--
diff --git 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
index f459275..0245ef1 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
@@ -309,7 +309,6 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 return null;
   }
   String ret = waitForFateOperation(opid);
-  Tables.clearCache(instance);
   return ret;
 } catch (ThriftSecurityException e) {
   String tableName = ByteBufferUtil.toString(args.get(0));
@@ -340,6 +339,7 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 } catch (Exception e) {
   throw new AccumuloException(e.getMessage(), e);
 } finally {
+  Tables.clearCache(instance);
   // always finish table op, even when exception
   if (opid != null)
 try {
@@ -528,8 +528,8 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 
 ArgumentChecker.notNull(tableName);
 ByteBuffer EMPTY = ByteBuffer.allocate(0);
-ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)), start == 
null ? EMPTY : TextUtil.getByteBuffer(start), end == null ? EMPTY
-: TextUtil.getByteBuffer(end));
+ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)), start == 
null ? EMPTY : TextUtil.getByteBuffer(start),
+end == null ? EMPTY : TextUtil.getByteBuffer(end));
 MapString,String opts = new HashMapString,String();
 try {
   doTableFateOperation(tableName, TableNotFoundException.class, 
FateOperation.TABLE_MERGE, args, opts);
@@ -544,8 +544,8 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 
 ArgumentChecker.notNull(tableName);
 ByteBuffer EMPTY = ByteBuffer.allocate(0);
-ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)), start == 
null ? EMPTY : TextUtil.getByteBuffer(start), end == null ? EMPTY
-: TextUtil.getByteBuffer(end));
+ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableName.getBytes(Constants.UTF8)), start == 
null ? EMPTY : TextUtil.getByteBuffer(start),
+end == null ? EMPTY : TextUtil.getByteBuffer(end));
 MapString,String opts = new HashMapString,String();
 try {
   doTableFateOperation(tableName, TableNotFoundException.class, 
FateOperation.TABLE_DELETE_RANGE, args, opts);
@@ -787,8 +787,8 @@ public class TableOperationsImpl extends 
TableOperationsHelper {
 if (flush)
   _flush(tableId, start, end, true);
 
-ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableId.getBytes(Constants.UTF8)), start == null 
? EMPTY : TextUtil.getByteBuffer(start), end == null ? EMPTY
-: TextUtil.getByteBuffer(end), 
ByteBuffer.wrap(IteratorUtil.encodeIteratorSettings(iterators)));
+ListByteBuffer args = 
Arrays.asList(ByteBuffer.wrap(tableId.getBytes(Constants.UTF8)), start == null 
? EMPTY : TextUtil.getByteBuffer(start),
+end == null ? EMPTY : TextUtil.getByteBuffer(end), 
ByteBuffer.wrap(IteratorUtil.encodeIteratorSettings(iterators)));
 
 MapString,String opts = new HashMapString,String();
 try {



Git Push Summary

2014-02-14 Thread ctubbsii
Repository: accumulo
Updated Branches:
  refs/heads/INFRA-7312-test [created] b0a1f6d61


Git Push Summary

2014-02-14 Thread ctubbsii
Repository: accumulo-wikisearch
Updated Branches:
  refs/heads/INFRA-7312-test f11759eb5 - 78a7ca1a3 (forced update)


git commit: ACCUMULO-1961 Fix more recently introduced javadoc problems.

2014-02-18 Thread ctubbsii
Repository: accumulo
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 732f037ea - 4abb3f1af


ACCUMULO-1961 Fix more recently introduced javadoc problems.


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 4abb3f1afd7c0f44cb71671148629cfcbbf5746f
Parents: 732f037
Author: Christopher Tubbs ctubb...@apache.org
Authored: Tue Feb 18 15:33:36 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Tue Feb 18 15:33:36 2014 -0500

--
 .../java/org/apache/accumulo/core/client/Instance.java| 10 --
 .../accumulo/server/watcher/MonitorLog4jWatcher.java  | 10 ++
 2 files changed, 6 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/4abb3f1a/core/src/main/java/org/apache/accumulo/core/client/Instance.java
--
diff --git a/core/src/main/java/org/apache/accumulo/core/client/Instance.java 
b/core/src/main/java/org/apache/accumulo/core/client/Instance.java
index c6f6f33..05cc7f2 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/Instance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/Instance.java
@@ -121,14 +121,13 @@ public interface Instance {
*/
   @Deprecated
   Connector getConnector(String user, CharSequence pass) throws 
AccumuloException, AccumuloSecurityException;
-  
+
   /**
* Returns the AccumuloConfiguration to use when interacting with this 
instance.
* 
* @return the AccumuloConfiguration that specifies properties related to 
interacting with this instance
-   * @deprecated since 1.6.0.
-   * This method makes very little sense in the context of the client API and 
never should have been exposed.
-   * @see {@link InstanceOperations#getConfiguration()} for client-side 
reading of the server-side configuration.
+   * @deprecated since 1.6.0. This method makes very little sense in the 
context of the client API and never should have been exposed.
+   * @see {@link InstanceOperations#getSystemConfiguration()} for client-side 
reading of the server-side configuration.
*/
   @Deprecated
   AccumuloConfiguration getConfiguration();
@@ -138,8 +137,7 @@ public interface Instance {
* 
* @param conf
*  accumulo configuration
-   * @deprecated since 1.6.0.
-   * This method makes very little sense in the context of the client API and 
never should have been exposed.
+   * @deprecated since 1.6.0. This method makes very little sense in the 
context of the client API and never should have been exposed.
* @see {@link InstanceOperations#setProperty(String, String)}
*/
   @Deprecated

http://git-wip-us.apache.org/repos/asf/accumulo/blob/4abb3f1a/server/base/src/main/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcher.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcher.java
 
b/server/base/src/main/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcher.java
index d0ca27f..ac3426e 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcher.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcher.java
@@ -43,12 +43,6 @@ public class MonitorLog4jWatcher extends FileWatchdog 
implements Watcher {
   private boolean loggingDisabled = false;
   protected String path;
 
-  /**
-   * @param zkPath
-   * @param filename
-   * @param delay
-   * @param propertyName
-   */
   public MonitorLog4jWatcher(String instance, String filename, int delay) {
 super(filename);
 setDelay(delay);
@@ -78,7 +72,7 @@ public class MonitorLog4jWatcher extends FileWatchdog 
implements Watcher {
   resetLogger();
   return;
 }
-
+
 synchronized (lock) {
   // We might triggered by file-reloading or from ZK update.
   // Either way will result in log-forwarding being restarted
@@ -87,7 +81,7 @@ public class MonitorLog4jWatcher extends FileWatchdog 
implements Watcher {
   resetLogger();
 }
   }
-  
+
   private void resetLogger() {
 // Force a reset on the logger's configuration
 LogManager.resetConfiguration();



git commit: ACCUMULO-1961 Re-apply inadvertently dropped 4abb3f1 to master branch

2014-02-19 Thread ctubbsii
Repository: accumulo
Updated Branches:
  refs/heads/master 47a1a72a7 - dcc19ccba


ACCUMULO-1961 Re-apply inadvertently dropped 4abb3f1 to master branch

  Fixes trivial warnings and broken javadocs which have been recently
  introduced. Specifically, removes references to private and
  package-private (default) classes in public javadoc comments (internal
  details aren't relevant to the API and subject to change). Another
  common warning was unused imports and javadoc param tags that refer to
  non-existent parameters.

  Commits against the following JIRA issues introduced these:
  ACCUMULO-1948, ACCUMULO-1974, ACCUMULO-2021, ACCUMULO-2136,
  ACCUMULO-2322, ACCUMULO-2334, ACCUMULO-2350


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

Branch: refs/heads/master
Commit: dcc19ccbada8c2f0a206ec797455294015e8ca6d
Parents: 47a1a72
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 19 14:59:58 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 19 14:59:58 2014 -0500

--
 .../apache/accumulo/core/client/Instance.java   |  36 +++---
 .../org/apache/accumulo/core/conf/Property.java |  87 +++---
 .../accumulo/core/util/ValidatorTest.java   |   6 +-
 .../java/org/apache/accumulo/fate/Fate.java |  67 ++-
 .../server/watcher/MonitorLog4jWatcher.java |  10 +-
 .../tserver/log/TabletServerLogger.java | 112 ++-
 .../tserver/TabletResourceManagerTest.java  |   8 +-
 7 files changed, 158 insertions(+), 168 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/dcc19ccb/core/src/main/java/org/apache/accumulo/core/client/Instance.java
--
diff --git a/core/src/main/java/org/apache/accumulo/core/client/Instance.java 
b/core/src/main/java/org/apache/accumulo/core/client/Instance.java
index c6f6f33..bcdd0e5 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/Instance.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/Instance.java
@@ -26,54 +26,54 @@ import org.apache.accumulo.core.conf.AccumuloConfiguration;
 
 /**
  * This class represents the information a client needs to know to connect to 
an instance of accumulo.
- * 
+ *
  */
 public interface Instance {
   /**
* Returns the location of the tablet server that is serving the root tablet.
-   * 
+   *
* @return location in hostname:port form
*/
   String getRootTabletLocation();
 
   /**
* Returns the location(s) of the accumulo master and any redundant servers.
-   * 
+   *
* @return a list of locations in hostname:port form
*/
   ListString getMasterLocations();
 
   /**
* Returns a unique string that identifies this instance of accumulo.
-   * 
+   *
* @return a UUID
*/
   String getInstanceID();
 
   /**
* Returns the instance name given at system initialization time.
-   * 
+   *
* @return current instance name
*/
   String getInstanceName();
 
   /**
* Returns a comma-separated list of zookeeper servers the instance is using.
-   * 
+   *
* @return the zookeeper servers this instance is using in hostname:port 
form
*/
   String getZooKeepers();
 
   /**
* Returns the zookeeper connection timeout.
-   * 
+   *
* @return the configured timeout to connect to zookeeper
*/
   int getZooKeepersSessionTimeOut();
 
   /**
* Returns a connection to accumulo.
-   * 
+   *
* @param user
*  a valid accumulo user
* @param pass
@@ -90,7 +90,7 @@ public interface Instance {
 
   /**
* Returns a connection to accumulo.
-   * 
+   *
* @param user
*  a valid accumulo user
* @param pass
@@ -107,7 +107,7 @@ public interface Instance {
 
   /**
* Returns a connection to this instance of accumulo.
-   * 
+   *
* @param user
*  a valid accumulo user
* @param pass
@@ -121,25 +121,23 @@ public interface Instance {
*/
   @Deprecated
   Connector getConnector(String user, CharSequence pass) throws 
AccumuloException, AccumuloSecurityException;
-  
+
   /**
* Returns the AccumuloConfiguration to use when interacting with this 
instance.
-   * 
+   *
* @return the AccumuloConfiguration that specifies properties related to 
interacting with this instance
-   * @deprecated since 1.6.0.
-   * This method makes very little sense in the context of the client API and 
never should have been exposed.
-   * @see {@link InstanceOperations#getConfiguration()} for client-side 
reading of the server-side configuration.
+   * @deprecated since 1.6.0. This method makes very little sense in the 
context 

git commit: ACCUMULO-2411 Fix warnings in 1.5 branch

2014-02-26 Thread ctubbsii
Repository: accumulo
Updated Branches:
  refs/heads/1.5.1-SNAPSHOT 625801848 - e2efee6d5


ACCUMULO-2411 Fix warnings in 1.5 branch

  Remove useless/no-op/broken javadocs and unused warnings. Isolate and
  suppress deprecation warning related to hadoop FileSystem replication
  support across HDFS versions.


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

Branch: refs/heads/1.5.1-SNAPSHOT
Commit: e2efee6d58f1ad67554134dddbfb3f28df025f3a
Parents: 6258018
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 26 14:35:36 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 26 14:35:36 2014 -0500

--
 .../apache/accumulo/fate/util/AddressUtil.java  | 27 ++--
 .../server/tabletserver/log/DfsLogger.java  | 44 +++-
 .../server/watcher/MonitorLog4jWatcher.java | 10 +
 3 files changed, 30 insertions(+), 51 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e2efee6d/fate/src/main/java/org/apache/accumulo/fate/util/AddressUtil.java
--
diff --git a/fate/src/main/java/org/apache/accumulo/fate/util/AddressUtil.java 
b/fate/src/main/java/org/apache/accumulo/fate/util/AddressUtil.java
index 7a8c269..fce7a62 100644
--- a/fate/src/main/java/org/apache/accumulo/fate/util/AddressUtil.java
+++ b/fate/src/main/java/org/apache/accumulo/fate/util/AddressUtil.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.fate.util;
 
-import java.net.InetAddress; // workaround to enable @see/@link hyperlink
+import java.net.InetAddress;
 import java.net.UnknownHostException;
 import java.security.Security;
 
@@ -27,28 +27,29 @@ public class AddressUtil {
   private static final Logger log = Logger.getLogger(AddressUtil.class);
 
   /**
-   * Fetch the security value that determines how long DNS failures are cached.
-   * Looks up the security property 'networkaddress.cache.negative.ttl'. 
Should that fail returns
-   * the default value used in the Oracle JVM 1.4+, which is 10 seconds.
-   *
-   * @param originalException the host lookup that is the source of needing 
this lookup. maybe be null.
+   * Fetch the security value that determines how long DNS failures are 
cached. Looks up the security property 'networkaddress.cache.negative.ttl'. 
Should that
+   * fail returns the default value used in the Oracle JVM 1.4+, which is 10 
seconds.
+   * 
+   * @param originalException
+   *  the host lookup that is the source of needing this lookup. maybe 
be null.
* @return positive integer number of seconds
-   * @see java.net.InetAddress
-   * @throws IllegalArgumentException if dns failures are cached forever
+   * @see InetAddress
+   * @throws IllegalArgumentException
+   *   if dns failures are cached forever
*/
   static public int getAddressCacheNegativeTtl(UnknownHostException 
originalException) {
 int negativeTtl = 10;
 try {
   negativeTtl = 
Integer.parseInt(Security.getProperty(networkaddress.cache.negative.ttl));
 } catch (NumberFormatException exception) {
-  log.warn(Failed to get JVM negative DNS respones cache TTL due to 
format problem (e.g. this JVM might not have the  +
-property). Falling back to default based on Oracle JVM 1.6 
(10s), exception);
+  log.warn(Failed to get JVM negative DNS respones cache TTL due to 
format problem (e.g. this JVM might not have the 
+  + property). Falling back to default based on Oracle JVM 1.6 
(10s), exception);
 } catch (SecurityException exception) {
   log.warn(Failed to get JVM negative DNS response cache TTL due to 
security manager. Falling back to default based on Oracle JVM 1.6 (10s), 
exception);
 }
 if (-1 == negativeTtl) {
-  log.error(JVM negative DNS repsonse cache TTL is set to 'forever' and 
host lookup failed. TTL can be changed with security property  +
-'networkaddress.cache.negative.ttl', see 
java.net.InetAddress., originalException);
+  log.error(JVM negative DNS repsonse cache TTL is set to 'forever' and 
host lookup failed. TTL can be changed with security property 
+  + 'networkaddress.cache.negative.ttl', see java.net.InetAddress., 
originalException);
   throw new IllegalArgumentException(originalException);
 } else if (0  negativeTtl) {
   log.warn(JVM specified negative DNS response cache TTL was negative 
(and not 'forever'). Falling back to default based on Oracle JVM 1.6 (10s));
@@ -56,5 +57,5 @@ public class AddressUtil {
 }
 return negativeTtl;
   }
-  
+
 }


[2/3] git commit: Merge branch '1.5.1-SNAPSHOT' of https://git-wip-us.apache.org/repos/asf/accumulo into 1.5.1-SNAPSHOT

2014-02-26 Thread ctubbsii
Merge branch '1.5.1-SNAPSHOT' of 
https://git-wip-us.apache.org/repos/asf/accumulo into 1.5.1-SNAPSHOT


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 5dba407cce3da15900b0fbbecea234ee55943dbf
Parents: 0bd62e3 e2efee6
Author: Eric Newton eric.new...@gmail.com
Authored: Wed Feb 26 14:40:51 2014 -0500
Committer: Eric Newton eric.new...@gmail.com
Committed: Wed Feb 26 14:40:51 2014 -0500

--
 .../apache/accumulo/fate/util/AddressUtil.java  | 27 ++--
 .../server/tabletserver/log/DfsLogger.java  | 44 +++-
 .../server/watcher/MonitorLog4jWatcher.java | 10 +
 3 files changed, 30 insertions(+), 51 deletions(-)
--




[3/3] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

2014-02-26 Thread ctubbsii
Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

Conflicts:

server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 59716f06bad0b9d8a63c699ac75a645c7e2f4a8e
Parents: 4e72516 5dba407
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 26 15:41:42 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 26 15:41:42 2014 -0500

--
 .../apache/accumulo/tserver/log/DfsLogger.java  | 137 +--
 1 file changed, 65 insertions(+), 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/59716f06/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
index 33d7722,000..55df118
mode 100644,00..100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
@@@ -1,545 -1,0 +1,538 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the License); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an AS IS BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.tserver.log;
 +
 +import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_FINISH;
 +import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_START;
 +import static org.apache.accumulo.tserver.logger.LogEvents.DEFINE_TABLET;
 +import static org.apache.accumulo.tserver.logger.LogEvents.MANY_MUTATIONS;
 +import static org.apache.accumulo.tserver.logger.LogEvents.OPEN;
 +
 +import java.io.DataInputStream;
 +import java.io.DataOutputStream;
 +import java.io.IOException;
 +import java.io.OutputStream;
 +import java.lang.reflect.Method;
 +import java.nio.channels.ClosedChannelException;
 +import java.util.ArrayList;
 +import java.util.Arrays;
 +import java.util.Collections;
 +import java.util.HashMap;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Set;
 +import java.util.UUID;
 +import java.util.concurrent.CountDownLatch;
 +import java.util.concurrent.LinkedBlockingQueue;
 +
 +import org.apache.accumulo.core.Constants;
 +import org.apache.accumulo.core.conf.AccumuloConfiguration;
 +import org.apache.accumulo.core.conf.Property;
 +import org.apache.accumulo.core.data.KeyExtent;
 +import org.apache.accumulo.core.data.Mutation;
 +import org.apache.accumulo.core.security.crypto.CryptoModule;
 +import org.apache.accumulo.core.security.crypto.CryptoModuleFactory;
 +import org.apache.accumulo.core.security.crypto.CryptoModuleParameters;
 +import org.apache.accumulo.core.security.crypto.DefaultCryptoModule;
 +import org.apache.accumulo.core.security.crypto.NoFlushOutputStream;
 +import org.apache.accumulo.core.util.Daemon;
 +import org.apache.accumulo.core.util.Pair;
 +import org.apache.accumulo.core.util.StringUtil;
 +import org.apache.accumulo.server.ServerConstants;
 +import org.apache.accumulo.server.fs.VolumeManager;
 +import org.apache.accumulo.server.master.state.TServerInstance;
 +import org.apache.accumulo.tserver.TabletMutations;
 +import org.apache.accumulo.tserver.logger.LogFileKey;
 +import org.apache.accumulo.tserver.logger.LogFileValue;
 +import org.apache.hadoop.fs.FSDataInputStream;
 +import org.apache.hadoop.fs.FSDataOutputStream;
 +import org.apache.hadoop.fs.Path;
 +import org.apache.log4j.Logger;
 +
 +/**
 + * Wrap a connection to a logger.
 + * 
 + */
 +public class DfsLogger {
 +  // Package private so that LogSorter can find this
 +  static final String LOG_FILE_HEADER_V2 = --- Log File Header (v2) ---;
 +  static final String LOG_FILE_HEADER_V3 = --- Log File Header (v3) ---;
-   
++
 +  private static Logger log = Logger.getLogger(DfsLogger.class);
-   
++
 +  public static class LogClosedException extends 

[3/4] git commit: Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

2014-02-26 Thread ctubbsii
Merge branch '1.5.1-SNAPSHOT' into 1.6.0-SNAPSHOT

Conflicts:

server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java


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

Branch: refs/heads/master
Commit: 59716f06bad0b9d8a63c699ac75a645c7e2f4a8e
Parents: 4e72516 5dba407
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 26 15:41:42 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 26 15:41:42 2014 -0500

--
 .../apache/accumulo/tserver/log/DfsLogger.java  | 137 +--
 1 file changed, 65 insertions(+), 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/59716f06/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
index 33d7722,000..55df118
mode 100644,00..100644
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
@@@ -1,545 -1,0 +1,538 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the License); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an AS IS BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.accumulo.tserver.log;
 +
 +import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_FINISH;
 +import static org.apache.accumulo.tserver.logger.LogEvents.COMPACTION_START;
 +import static org.apache.accumulo.tserver.logger.LogEvents.DEFINE_TABLET;
 +import static org.apache.accumulo.tserver.logger.LogEvents.MANY_MUTATIONS;
 +import static org.apache.accumulo.tserver.logger.LogEvents.OPEN;
 +
 +import java.io.DataInputStream;
 +import java.io.DataOutputStream;
 +import java.io.IOException;
 +import java.io.OutputStream;
 +import java.lang.reflect.Method;
 +import java.nio.channels.ClosedChannelException;
 +import java.util.ArrayList;
 +import java.util.Arrays;
 +import java.util.Collections;
 +import java.util.HashMap;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Set;
 +import java.util.UUID;
 +import java.util.concurrent.CountDownLatch;
 +import java.util.concurrent.LinkedBlockingQueue;
 +
 +import org.apache.accumulo.core.Constants;
 +import org.apache.accumulo.core.conf.AccumuloConfiguration;
 +import org.apache.accumulo.core.conf.Property;
 +import org.apache.accumulo.core.data.KeyExtent;
 +import org.apache.accumulo.core.data.Mutation;
 +import org.apache.accumulo.core.security.crypto.CryptoModule;
 +import org.apache.accumulo.core.security.crypto.CryptoModuleFactory;
 +import org.apache.accumulo.core.security.crypto.CryptoModuleParameters;
 +import org.apache.accumulo.core.security.crypto.DefaultCryptoModule;
 +import org.apache.accumulo.core.security.crypto.NoFlushOutputStream;
 +import org.apache.accumulo.core.util.Daemon;
 +import org.apache.accumulo.core.util.Pair;
 +import org.apache.accumulo.core.util.StringUtil;
 +import org.apache.accumulo.server.ServerConstants;
 +import org.apache.accumulo.server.fs.VolumeManager;
 +import org.apache.accumulo.server.master.state.TServerInstance;
 +import org.apache.accumulo.tserver.TabletMutations;
 +import org.apache.accumulo.tserver.logger.LogFileKey;
 +import org.apache.accumulo.tserver.logger.LogFileValue;
 +import org.apache.hadoop.fs.FSDataInputStream;
 +import org.apache.hadoop.fs.FSDataOutputStream;
 +import org.apache.hadoop.fs.Path;
 +import org.apache.log4j.Logger;
 +
 +/**
 + * Wrap a connection to a logger.
 + * 
 + */
 +public class DfsLogger {
 +  // Package private so that LogSorter can find this
 +  static final String LOG_FILE_HEADER_V2 = --- Log File Header (v2) ---;
 +  static final String LOG_FILE_HEADER_V3 = --- Log File Header (v3) ---;
-   
++
 +  private static Logger log = Logger.getLogger(DfsLogger.class);
-   
++
 +  public static class LogClosedException extends IOException 

[2/4] git commit: Merge branch '1.5.1-SNAPSHOT' of https://git-wip-us.apache.org/repos/asf/accumulo into 1.5.1-SNAPSHOT

2014-02-26 Thread ctubbsii
Merge branch '1.5.1-SNAPSHOT' of 
https://git-wip-us.apache.org/repos/asf/accumulo into 1.5.1-SNAPSHOT


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

Branch: refs/heads/master
Commit: 5dba407cce3da15900b0fbbecea234ee55943dbf
Parents: 0bd62e3 e2efee6
Author: Eric Newton eric.new...@gmail.com
Authored: Wed Feb 26 14:40:51 2014 -0500
Committer: Eric Newton eric.new...@gmail.com
Committed: Wed Feb 26 14:40:51 2014 -0500

--
 .../apache/accumulo/fate/util/AddressUtil.java  | 27 ++--
 .../server/tabletserver/log/DfsLogger.java  | 44 +++-
 .../server/watcher/MonitorLog4jWatcher.java | 10 +
 3 files changed, 30 insertions(+), 51 deletions(-)
--




[4/4] git commit: Merge branch '1.6.0-SNAPSHOT'

2014-02-26 Thread ctubbsii
Merge branch '1.6.0-SNAPSHOT'


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

Branch: refs/heads/master
Commit: c5f80656a40fd07e3ac4f25f68e1502b2d1951ba
Parents: 6699800 59716f0
Author: Christopher Tubbs ctubb...@apache.org
Authored: Wed Feb 26 15:58:51 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 26 15:58:51 2014 -0500

--
 .../apache/accumulo/tserver/log/DfsLogger.java  | 137 +--
 1 file changed, 65 insertions(+), 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c5f80656/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
--
diff --cc 
server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
index e52f739,55df118..1504c94
--- 
a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
+++ 
b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/DfsLogger.java
@@@ -320,10 -318,10 +319,10 @@@ public class DfsLogger 
  }
  return new DFSLoggerInputStreams(input, decryptingInput);
}
-   
+ 
public synchronized void open(String address) throws IOException {
  String filename = UUID.randomUUID().toString();
 -String logger = StringUtil.join(Arrays.asList(address.split(:)), +);
 +String logger = Joiner.on(+).join(address.split(:));
  
  log.debug(DfsLogger.open() begin);
  VolumeManager fs = conf.getFileSystem();
@@@ -540,7 -532,7 +533,7 @@@
  
public String getLogger() {
  String parts[] = logPath.split(/);
 -return StringUtil.join(Arrays.asList(parts[parts.length - 
2].split([+])), :);
 +return Joiner.on(:).join(parts[parts.length - 2].split([+]));
}
-   
+ 
  }



[1/2] git commit: ACCUMULO-2291 CheckForMetadataProblems now checks the root table as well as the metadata table for problems. Also removed the fix option for the metadata table.

2014-02-26 Thread ctubbsii
Repository: accumulo
Updated Branches:
  refs/heads/1.6.0-SNAPSHOT 59716f06b - 818426c3a


ACCUMULO-2291 CheckForMetadataProblems now checks the root table as well as the 
metadata table for problems. Also removed the fix option for the metadata table.

Signed-off-by: Christopher Tubbs ctubb...@apache.org


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 0c4a956633f96a3426df94dcfefee4e86e5aa3f6
Parents: 59716f0
Author: jpmcnamee jp...@terpmail.umd.edu
Authored: Fri Feb 21 09:49:04 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 26 16:01:00 2014 -0500

--
 .../server/util/CheckForMetadataProblems.java   | 100 ---
 1 file changed, 43 insertions(+), 57 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/0c4a9566/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
 
b/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
index df9900f..d437bca 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
@@ -25,17 +25,14 @@ import java.util.TreeSet;
 
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Scanner;
-import org.apache.accumulo.core.client.impl.Writer;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.KeyExtent;
-import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.metadata.MetadataTable;
+import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.security.Credentials;
-import 
org.apache.accumulo.core.tabletserver.thrift.ConstraintViolationException;
 import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.fs.VolumeManager;
@@ -46,29 +43,29 @@ import com.beust.jcommander.Parameter;
 
 public class CheckForMetadataProblems {
   private static boolean sawProblems = false;
-  
+
   public static void checkTable(String tablename, TreeSetKeyExtent tablets, 
Opts opts) throws AccumuloSecurityException {
 // sanity check of metadata table entries
 // make sure tablets has no holes, and that it starts and ends w/ null
-
+
 if (tablets.size() == 0) {
   System.out.println(No entries found in metadata table for table  + 
tablename);
   sawProblems = true;
   return;
 }
-
+
 if (tablets.first().getPrevEndRow() != null) {
   System.out.println(First entry for table  + tablename + -  + 
tablets.first() +  - has non null prev end row);
   sawProblems = true;
   return;
 }
-
+
 if (tablets.last().getEndRow() != null) {
   System.out.println(Last entry for table  + tablename + -  + 
tablets.last() +  - has non null end row);
   sawProblems = true;
   return;
 }
-
+
 IteratorKeyExtent tabIter = tablets.iterator();
 Text lastEndRow = tabIter.next().getEndRow();
 boolean everythingLooksGood = true;
@@ -85,13 +82,7 @@ public class CheckForMetadataProblems {
   if (broke) {
 everythingLooksGood = false;
   }
-  if (broke  opts.fix) {
-KeyExtent ke = new KeyExtent(tabke);
-ke.setPrevEndRow(lastEndRow);
-MetadataTableUtil.updateTabletPrevEndRow(ke, new 
Credentials(opts.principal, opts.getToken()));
-System.out.println(KE  + tabke +  has been repaired to  + ke);
-  }
-  
+
   lastEndRow = tabke.getEndRow();
 }
 if (everythingLooksGood)
@@ -99,50 +90,51 @@ public class CheckForMetadataProblems {
 else
   sawProblems = true;
   }
-  
-  public static void checkMetadataTableEntries(Opts opts, VolumeManager fs) 
throws Exception {
+
+  public static void checkMetadataAndRootTableEntries(String tableNameToCheck, 
Opts opts, VolumeManager fs) throws Exception {
+System.out.println(Checking table:  + tableNameToCheck);
 MapString,TreeSetKeyExtent tables = new 
HashMapString,TreeSetKeyExtent();
-
+
 Scanner scanner;
-
+
 if 

[2/2] git commit: ACCUMULO-2389 Removed the OfflineMetadataScanner and the offline option in the CheckForMetadataProblems.

2014-02-26 Thread ctubbsii
ACCUMULO-2389 Removed the OfflineMetadataScanner and the offline option in the 
CheckForMetadataProblems.

Signed-off-by: Christopher Tubbs ctubb...@apache.org


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 818426c3aa87eee79df0f5d1768c0eeb24e98d4b
Parents: 0c4a956
Author: jpmcnamee jp...@terpmail.umd.edu
Authored: Fri Feb 21 09:50:59 2014 -0500
Committer: Christopher Tubbs ctubb...@apache.org
Committed: Wed Feb 26 16:10:54 2014 -0500

--
 .../server/util/CheckForMetadataProblems.java   |  26 +-
 .../server/util/OfflineMetadataScanner.java | 281 ---
 2 files changed, 5 insertions(+), 302 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/accumulo/blob/818426c3/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
 
b/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
index d437bca..253b666 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/util/CheckForMetadataProblems.java
@@ -34,17 +34,14 @@ import 
org.apache.accumulo.core.metadata.schema.MetadataSchema;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.server.cli.ClientOpts;
-import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
 import org.apache.hadoop.io.Text;
 
-import com.beust.jcommander.Parameter;
-
 public class CheckForMetadataProblems {
   private static boolean sawProblems = false;
 
-  public static void checkTable(String tablename, TreeSetKeyExtent tablets, 
Opts opts) throws AccumuloSecurityException {
+  public static void checkTable(String tablename, TreeSetKeyExtent tablets, 
ClientOpts opts) throws AccumuloSecurityException {
 // sanity check of metadata table entries
 // make sure tablets has no holes, and that it starts and ends w/ null
 
@@ -91,17 +88,13 @@ public class CheckForMetadataProblems {
   sawProblems = true;
   }
 
-  public static void checkMetadataAndRootTableEntries(String tableNameToCheck, 
Opts opts, VolumeManager fs) throws Exception {
+  public static void checkMetadataAndRootTableEntries(String tableNameToCheck, 
ClientOpts opts, VolumeManager fs) throws Exception {
 System.out.println(Checking table:  + tableNameToCheck);
 MapString,TreeSetKeyExtent tables = new 
HashMapString,TreeSetKeyExtent();
 
 Scanner scanner;
 
-if (opts.offline) {
-  scanner = new 
OfflineMetadataScanner(ServerConfiguration.getSystemConfiguration(opts.getInstance()),
 fs);
-} else {
-  scanner = opts.getConnector().createScanner(tableNameToCheck, 
Authorizations.EMPTY);
-}
+scanner = opts.getConnector().createScanner(tableNameToCheck, 
Authorizations.EMPTY);
 
 scanner.setRange(MetadataSchema.TabletsSection.getRange());
 TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.fetch(scanner);
@@ -165,23 +158,14 @@ public class CheckForMetadataProblems {
 // end METADATA table sanity check
   }
 
-  static class Opts extends ClientOpts {
-@Parameter(names = --offline, description = perform the check on the 
files directly)
-boolean offline = false;
-  }
-
   public static void main(String[] args) throws Exception {
-Opts opts = new Opts();
+ClientOpts opts = new ClientOpts();
 opts.parseArgs(CheckForMetadataProblems.class.getName(), args);
-Opts dummyOpts = new Opts();
-dummyOpts.auths = opts.auths;
-dummyOpts.password = opts.password;
 
 VolumeManager fs = VolumeManagerImpl.get();
 
-checkMetadataAndRootTableEntries(RootTable.NAME, dummyOpts, fs);
+checkMetadataAndRootTableEntries(RootTable.NAME, opts, fs);
 checkMetadataAndRootTableEntries(MetadataTable.NAME, opts, fs);
-dummyOpts.stopTracing();
 opts.stopTracing();
 if (sawProblems)
   throw new RuntimeException();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/818426c3/server/base/src/main/java/org/apache/accumulo/server/util/OfflineMetadataScanner.java
--
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/util/OfflineMetadataScanner.java
 

<    1   2   3   4   5   6   7   8   9   10   >