accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1453530 [1/12] - in /accumulo/trunk: ./ core/ core/src/main/java/org/apache/accumulo/core/client/ core/src/main/java/org/apache/accumulo/core/client/admin/ core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ core/src/main/java/...
Date Wed, 06 Mar 2013 20:17:31 GMT
Author: vines
Date: Wed Mar  6 20:17:29 2013
New Revision: 1453530

URL: http://svn.apache.org/r1453530
Log:
ACCUMULO-259 Changing the thrift getAuthentictorClass from a master operation to a tserver
one



Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/core/   (props changed)
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/Instance.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ClientService.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ConfigurationType.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/SecurityErrorCode.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperation.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperationExceptionType.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftSecurityException.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTableOperationException.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTest.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/MultiScanResult.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/ScanResult.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/TColumn.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/TConstraintViolationSummary.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/TKey.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyExtent.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyValue.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/TMutation.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/TRange.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/data/thrift/UpdateErrors.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCMonitorService.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GCStatus.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/gc/thrift/GcCycleStats.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/Compacting.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/DeadServer.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterClientService.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterGoalState.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterMonitorInfo.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/MasterState.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryException.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/RecoveryStatus.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/TableInfo.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/TableOperation.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletLoadState.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletServerStatus.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/master/thrift/TabletSplit.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/thrift/AuthInfo.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/thrift/SecurityErrorCode.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/thrift/TCredentials.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/thrift/ThriftSecurityException.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActionStats.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveCompaction.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ActiveScan.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionReason.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/CompactionType.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ConstraintViolationException.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/IteratorConfig.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NoSuchScanIDException.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/NotServingTabletException.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanState.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/ScanType.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TIteratorSetting.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletClientService.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TabletStats.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/tabletserver/thrift/TooManyFilesException.java
    accumulo/trunk/core/src/main/thrift/client.thrift
    accumulo/trunk/core/src/main/thrift/master.thrift
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloException.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloProxy.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/AccumuloSecurityException.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveCompaction.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ActiveScan.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/BatchScanOptions.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Column.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ColumnUpdate.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionReason.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/CompactionType.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/IteratorScope.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/IteratorSetting.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Key.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyExtent.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyValue.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/KeyValueAndPeek.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/NoMoreEntriesException.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/PartialKey.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/Range.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanColumn.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanOptions.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanResult.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanState.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/ScanType.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/SystemPermission.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TableExistsException.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TableNotFoundException.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TablePermission.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/TimeType.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/UnknownScanner.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/UnknownWriter.java
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/thrift/WriterOptions.java
    accumulo/trunk/server/   (props changed)
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/client/ClientServiceHandler.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/Master.java
    accumulo/trunk/start/src/main/java/org/apache/accumulo/start/Main.java
    accumulo/trunk/trace/src/main/java/org/apache/accumulo/trace/thrift/RemoteSpan.java
    accumulo/trunk/trace/src/main/java/org/apache/accumulo/trace/thrift/SpanReceiver.java
    accumulo/trunk/trace/src/main/java/org/apache/accumulo/trace/thrift/TInfo.java
    accumulo/trunk/trace/src/main/java/org/apache/accumulo/trace/thrift/TestService.java

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1453086-1453518

Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/core:r1453075-1453518

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/Instance.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/Instance.java?rev=1453530&r1=1453529&r2=1453530&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/Instance.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/Instance.java Wed Mar
 6 20:17:29 2013
@@ -155,8 +155,9 @@ public interface Instance {
   /**
    * @return the canonical name of the helper class for the security token from the authenticator,
if one exists.
    * @throws AccumuloException
+   * @throws AccumuloSecurityException 
    */
-  public abstract String getAuthenticatorClassName() throws AccumuloException;
+  public abstract String getAuthenticatorClassName() throws AccumuloException, AccumuloSecurityException;
 
   /**
    * @param principal

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java?rev=1453530&r1=1453529&r2=1453530&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
Wed Mar  6 20:17:29 2013
@@ -24,15 +24,15 @@ import java.util.Properties;
 import java.util.UUID;
 
 import org.apache.accumulo.core.Constants;
+import org.apache.accumulo.core.client.impl.ClientExecReturn;
 import org.apache.accumulo.core.client.impl.ConnectorImpl;
-import org.apache.accumulo.core.client.impl.MasterClient;
-import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
+import org.apache.accumulo.core.client.impl.ServerClient;
+import org.apache.accumulo.core.client.impl.thrift.ClientService;
 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.master.thrift.MasterClientService.Client;
 import org.apache.accumulo.core.security.CredentialHelper;
 import org.apache.accumulo.core.security.handler.Authenticator;
 import org.apache.accumulo.core.security.thrift.TCredentials;
@@ -41,7 +41,6 @@ import org.apache.accumulo.core.util.Byt
 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;
@@ -50,8 +49,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
-import org.apache.thrift.TException;
-import org.apache.thrift.transport.TTransportException;
 
 /**
  * <p>
@@ -318,26 +315,17 @@ public class ZooKeeperInstance implement
   }
 
   @Override
-  public String getAuthenticatorClassName() throws AccumuloException {
-    Client client = null;
-    try {
-      client = MasterClient.getConnectionWithRetry(this);
-      return client.getAuthenticatorClassName();
-    } catch (TTransportException e) {
-      throw new AccumuloException(e);
-    } catch (ThriftSecurityException e) {
-      throw new AccumuloException(e);
-    } catch (TException e) {
-      throw new AccumuloException(e);
-    } finally {
-      if (client != null) {
-        ThriftUtil.returnClient(client);
+  public String getAuthenticatorClassName() throws AccumuloException, AccumuloSecurityException
{
+    return ServerClient.execute(this, new ClientExecReturn<String,ClientService.Client>()
{
+      @Override
+      public String execute(ClientService.Client iface) throws Exception {
+        return iface.getAuthenticatorClassName();
       }
-    }
+    });
   }
 
   @Override
-  public Authenticator getAuthenticator() throws AccumuloException {
+  public Authenticator getAuthenticator() throws AccumuloException, AccumuloSecurityException
{
     String authenticatorName = getAuthenticatorClassName();
     try {
       Class<?> clazz = Class.forName(authenticatorName);

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java?rev=1453530&r1=1453529&r2=1453530&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
Wed Mar  6 20:17:29 2013
@@ -55,7 +55,7 @@ public class InstanceOperationsImpl impl
    * @param instance
    *          the connection information for this instance
    * @param credentials
-   *          the username/password for this connection
+   *          the Credential, containing principal and Authentication Token
    */
   public InstanceOperationsImpl(Instance instance, TCredentials credentials) {
     ArgumentChecker.notNull(instance, credentials);



Mime
View raw message