accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject [2/3] accumulo git commit: Merge branch 'ACCUMULO-4577_1.7' into 1.8
Date Thu, 09 Feb 2017 13:38:13 GMT
Merge branch 'ACCUMULO-4577_1.7' into 1.8

Conflicts:
	core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
	server/master/src/main/java/org/apache/accumulo/master/tableOps/CloneTable.java
	server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java


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

Branch: refs/heads/1.8
Commit: a0b2dc864c053a5d03d13d42eb68e5b53a4379eb
Parents: 04847d9 78176e5
Author: Mike Miller <mmiller@apache.org>
Authored: Wed Feb 8 14:09:11 2017 -0500
Committer: Mike Miller <mmiller@apache.org>
Committed: Wed Feb 8 14:09:11 2017 -0500

----------------------------------------------------------------------
 .../accumulo/core/client/impl/Tables.java       |  2 +-
 .../server/client/ClientServiceHandler.java     | 22 +++++---
 .../server/conf/TableParentConfiguration.java   |  7 ++-
 .../accumulo/master/FateServiceHandler.java     | 36 ++++++++-----
 .../master/MasterClientServiceHandler.java      | 16 ++++--
 .../accumulo/master/tableOps/CloneTable.java    | 20 +-------
 .../accumulo/master/tableOps/ExportTable.java   |  7 ++-
 .../apache/accumulo/tserver/TabletServer.java   | 54 ++++++++++++++++----
 8 files changed, 109 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a0b2dc86/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a0b2dc86/server/base/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a0b2dc86/server/master/src/main/java/org/apache/accumulo/master/FateServiceHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a0b2dc86/server/master/src/main/java/org/apache/accumulo/master/MasterClientServiceHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a0b2dc86/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index 7751681,6c585d0..a937235
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@@ -61,7 -59,7 +61,8 @@@ import org.apache.accumulo.core.client.
  import org.apache.accumulo.core.client.AccumuloSecurityException;
  import org.apache.accumulo.core.client.Durability;
  import org.apache.accumulo.core.client.Instance;
 +import org.apache.accumulo.core.client.SampleNotPresentException;
+ import org.apache.accumulo.core.client.TableNotFoundException;
  import org.apache.accumulo.core.client.impl.CompressedIterators;
  import org.apache.accumulo.core.client.impl.DurabilityImpl;
  import org.apache.accumulo.core.client.impl.ScannerImpl;
@@@ -465,11 -446,16 +466,17 @@@ public class TabletServer extends Accum
      @Override
      public InitialScan startScan(TInfo tinfo, TCredentials credentials, TKeyExtent textent,
TRange range, List<TColumn> columns, int batchSize,
          List<IterInfo> ssiList, Map<String,Map<String,String>> ssio, List<ByteBuffer>
authorizations, boolean waitForWrites, boolean isolated,
 -        long readaheadThreshold) throws NotServingTabletException, ThriftSecurityException,
org.apache.accumulo.core.tabletserver.thrift.TooManyFilesException {
 +        long readaheadThreshold, TSamplerConfiguration tSamplerConfig, long batchTimeOut,
String context) throws NotServingTabletException,
 +        ThriftSecurityException, org.apache.accumulo.core.tabletserver.thrift.TooManyFilesException,
TSampleNotPresentException {
  
        String tableId = new String(textent.getTable(), UTF_8);
-       if (!security.canScan(credentials, tableId, Tables.getNamespaceId(getInstance(), tableId),
range, columns, ssiList, ssio, authorizations))
+       String namespaceId;
+       try {
+         namespaceId = Tables.getNamespaceId(getInstance(), tableId);
+       } catch (TableNotFoundException e1) {
+         throw new NotServingTabletException(textent);
+       }
+       if (!security.canScan(credentials, tableId, namespaceId, range, columns, ssiList,
ssio, authorizations))
          throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
  
        if (!security.userHasAuthorizations(credentials, authorizations))
@@@ -1270,10 -1259,16 +1300,16 @@@
  
      @Override
      public TConditionalSession startConditionalUpdate(TInfo tinfo, TCredentials credentials,
List<ByteBuffer> authorizations, String tableId,
 -        TDurability tdurabilty) throws ThriftSecurityException, TException {
 +        TDurability tdurabilty, String classLoaderContext) throws ThriftSecurityException,
TException {
  
        Authorizations userauths = null;
-       if (!security.canConditionallyUpdate(credentials, tableId, Tables.getNamespaceId(getInstance(),
tableId), authorizations))
+       String namespaceId;
+       try {
+         namespaceId = Tables.getNamespaceId(getInstance(), tableId);
+       } catch (TableNotFoundException e) {
+         throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.TABLE_DOESNT_EXIST);
+       }
+       if (!security.canConditionallyUpdate(credentials, tableId, namespaceId, authorizations))
          throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
  
        userauths = security.getUserAuthorizations(credentials);


Mime
View raw message