accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [5/6] accumulo git commit: Merge branch '1.6' into 1.7
Date Mon, 04 May 2015 17:36:22 GMT
Merge branch '1.6' into 1.7

Conflicts:
	core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java
	core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java


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

Branch: refs/heads/1.7
Commit: 12366d4e672a004e9324adc87d4e94907530a770
Parents: 2436eec a506c0b
Author: Josh Elser <elserj@apache.org>
Authored: Mon May 4 12:08:09 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Mon May 4 12:27:51 2015 -0400

----------------------------------------------------------------------
 .../client/impl/NamespaceOperationsImpl.java    | 10 +++----
 .../core/client/impl/TableOperationsImpl.java   | 30 +++++++++-----------
 2 files changed, 19 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/12366d4e/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java
index ce6bc09,9a66fef..b087c73
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/NamespaceOperationsImpl.java
@@@ -85,11 -87,11 +85,11 @@@ public class NamespaceOperationsImpl ex
  
    @Override
    public void create(String namespace) throws AccumuloException, AccumuloSecurityException,
NamespaceExistsException {
 -    ArgumentChecker.notNull(namespace);
 +    checkArgument(namespace != null, "namespace is null");
  
      try {
 -      doNamespaceFateOperation(FateOperation.NAMESPACE_CREATE, Arrays.asList(ByteBuffer.wrap(namespace.getBytes())),
Collections.<String,String> emptyMap(),
 -          namespace);
 +      doNamespaceFateOperation(FateOperation.NAMESPACE_CREATE, Arrays.asList(ByteBuffer.wrap(namespace.getBytes(UTF_8))),
-           Collections.<String,String> emptyMap());
++          Collections.<String,String> emptyMap(), namespace);
      } catch (NamespaceNotFoundException e) {
        // should not happen
        throw new AssertionError(e);
@@@ -127,9 -128,9 +127,9 @@@
    public void rename(String oldNamespaceName, String newNamespaceName) throws AccumuloSecurityException,
NamespaceNotFoundException, AccumuloException,
        NamespaceExistsException {
  
 -    List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(oldNamespaceName.getBytes()),
ByteBuffer.wrap(newNamespaceName.getBytes()));
 +    List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(oldNamespaceName.getBytes(UTF_8)),
ByteBuffer.wrap(newNamespaceName.getBytes(UTF_8)));
      Map<String,String> opts = new HashMap<String,String>();
-     doNamespaceFateOperation(FateOperation.NAMESPACE_RENAME, args, opts);
+     doNamespaceFateOperation(FateOperation.NAMESPACE_RENAME, args, opts, oldNamespaceName);
    }
  
    @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/12366d4e/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
----------------------------------------------------------------------
diff --cc core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
index 0e30d52,6e6ca19..6f9ea29
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
@@@ -92,12 -90,11 +92,11 @@@ import org.apache.accumulo.core.metadat
  import org.apache.accumulo.core.metadata.MetadataTable;
  import org.apache.accumulo.core.metadata.RootTable;
  import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
 +import org.apache.accumulo.core.rpc.ThriftUtil;
  import org.apache.accumulo.core.security.Authorizations;
 -import org.apache.accumulo.core.security.Credentials;
  import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException;
  import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
 -import org.apache.accumulo.core.util.ArgumentChecker;
 +import org.apache.accumulo.core.trace.Tracer;
- import org.apache.accumulo.core.util.ByteBufferUtil;
  import org.apache.accumulo.core.util.CachedConfiguration;
  import org.apache.accumulo.core.util.LocalityGroupUtil;
  import org.apache.accumulo.core.util.MapCounter;
@@@ -276,14 -308,13 +275,13 @@@ public class TableOperationsImpl extend
        String ret = waitForFateOperation(opid);
        return ret;
      } catch (ThriftSecurityException e) {
-       String tableName = ByteBufferUtil.toString(args.get(0));
        switch (e.getCode()) {
          case TABLE_DOESNT_EXIST:
-           throw new TableNotFoundException(null, tableName, "Target table does not exist");
+           throw new TableNotFoundException(null, tableOrNamespaceName, "Target table does
not exist");
          case NAMESPACE_DOESNT_EXIST:
-           throw new NamespaceNotFoundException(null, tableName, "Target namespace does not
exist");
+           throw new NamespaceNotFoundException(null, tableOrNamespaceName, "Target namespace
does not exist");
          default:
-           String tableInfo = Tables.getPrintableTableInfoFromName(context.getInstance(),
tableName);
 -          String tableInfo = Tables.getPrintableTableInfoFromName(instance, tableOrNamespaceName);
++          String tableInfo = Tables.getPrintableTableInfoFromName(context.getInstance(),
tableOrNamespaceName);
            throw new AccumuloSecurityException(e.user, e.code, tableInfo, e);
        }
      } catch (ThriftTableOperationException e) {
@@@ -297,7 -328,7 +295,7 @@@
          case NAMESPACE_NOTFOUND:
            throw new NamespaceNotFoundException(e);
          case OFFLINE:
-           throw new TableOfflineException(context.getInstance(), null);
 -          throw new TableOfflineException(instance, Tables.getTableId(instance, tableOrNamespaceName));
++          throw new TableOfflineException(context.getInstance(), Tables.getTableId(context.getInstance(),
tableOrNamespaceName));
          default:
            throw new AccumuloException(e.description, e);
        }
@@@ -727,7 -794,7 +725,7 @@@
  
      Map<String,String> opts = new HashMap<String,String>();
      try {
-       doFateOperation(FateOperation.TABLE_COMPACT, args, opts, config.getWait());
 -      doFateOperation(FateOperation.TABLE_COMPACT, args, opts, tableName, wait);
++      doFateOperation(FateOperation.TABLE_COMPACT, args, opts, tableName, config.getWait());
      } catch (TableExistsException e) {
        // should not happen
        throw new AssertionError(e);


Mime
View raw message