accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject svn commit: r1441124 - in /accumulo/trunk: core/src/main/java/org/apache/accumulo/core/client/admin/ core/src/main/java/org/apache/accumulo/core/client/impl/ core/src/main/java/org/apache/accumulo/core/client/mock/ core/src/main/java/org/apache/accumul...
Date Thu, 31 Jan 2013 19:00:10 GMT
Author: ctubbsii
Date: Thu Jan 31 19:00:09 2013
New Revision: 1441124

URL: http://svn.apache.org/viewvc?rev=1441124&view=rev
Log:
ACCUMULO-971 Fix more broken and/or default javadocs from recently committed code.

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperationsImpl.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModule.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/tokens/UserPassToken.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/Authorizor.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/PermissionHandler.java
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKSecurityTool.java
    accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java Thu Jan 31 19:00:09 2013
@@ -27,9 +27,7 @@ import org.apache.accumulo.core.security
 
 /**
  * Provides a class for managing users and permissions
- * 
  */
-
 public interface SecurityOperations {
   
   /**
@@ -45,18 +43,16 @@ public interface SecurityOperations {
    *           if a general error occurs
    * @throws AccumuloSecurityException
    *           if the user does not have permission to create a user
-   * @deprecated Use {@link #createUser(String,byte[])} instead
+   * @deprecated Use {@link #createUser(SecurityToken)} instead
    */
   @Deprecated
   public void createUser(String user, byte[] password, Authorizations authorizations) throws AccumuloException, AccumuloSecurityException;
-
+  
   /**
    * Create a user
    * 
-   * @param user
-   *          the name of the user to create
-   * @param password
-   *          the plaintext password for the user
+   * @param token
+   *          the security token with the information about the user to create
    * @throws AccumuloException
    *           if a general error occurs
    * @throws AccumuloSecurityException
@@ -90,8 +86,9 @@ public interface SecurityOperations {
    *           if the user does not have permission to ask
    * @deprecated @since 1.5, use {@link #authenticateUser(SecurityToken)}
    */
+  @Deprecated
   public boolean authenticateUser(String user, byte[] password) throws AccumuloException, AccumuloSecurityException;
-
+  
   /**
    * Verify an AccumuloToken is valid
    * 
@@ -102,7 +99,7 @@ public interface SecurityOperations {
    *           if a general error occurs
    * @throws AccumuloSecurityException
    *           if the user does not have permission to ask
-   *  @since 1.5
+   * @since 1.5
    */
   public boolean authenticateUser(SecurityToken token) throws AccumuloException, AccumuloSecurityException;
   
@@ -117,17 +114,16 @@ public interface SecurityOperations {
    *           if a general error occurs
    * @throws AccumuloSecurityException
    *           if the user does not have permission to modify a user
-   *           @deprecated @since 1.5, use {@link #changeUserPassword(SecurityToken)}
+   * @deprecated @since 1.5, use {@link #changeUserPassword(SecurityToken)}
    */
+  @Deprecated
   public void changeUserPassword(String user, byte[] password) throws AccumuloException, AccumuloSecurityException;
   
   /**
    * Set the user's password
    * 
-   * @param user
-   *          the name of the user to modify
-   * @param password
-   *          the plaintext password for the user
+   * @param newToken
+   *          the security token with the information about the user to modify
    * @throws AccumuloException
    *           if a general error occurs
    * @throws AccumuloSecurityException
@@ -264,14 +260,11 @@ public interface SecurityOperations {
    *           if the user does not have permission to query users
    */
   public Set<String> listUsers() throws AccumuloException, AccumuloSecurityException;
-
+  
   /**
    * @deprecated @since 1.5, use {@link #createUser(SecurityToken)}
-   * @param token
-   * @param authorization
-   * @throws AccumuloException
-   * @throws AccumuloSecurityException
    */
+  @Deprecated
   void createUser(SecurityToken token, Authorizations authorization) throws AccumuloException, AccumuloSecurityException;
   
 }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperationsImpl.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperationsImpl.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperationsImpl.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperationsImpl.java Thu Jan 31 19:00:09 2013
@@ -18,7 +18,6 @@ package org.apache.accumulo.core.client.
 
 import java.util.Set;
 
-import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.Instance;
@@ -33,13 +32,14 @@ import org.apache.accumulo.core.security
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
 import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
-import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.core.security.tokens.InstanceTokenWrapper;
 import org.apache.accumulo.core.security.tokens.PasswordUpdatable;
+import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.core.security.tokens.TokenHelper;
 import org.apache.accumulo.core.security.tokens.UserPassToken;
 import org.apache.accumulo.core.util.ArgumentChecker;
 import org.apache.accumulo.core.util.ByteBufferUtil;
+import org.apache.accumulo.trace.instrument.Tracer;
 
 public class SecurityOperationsImpl implements SecurityOperations {
   
@@ -109,6 +109,7 @@ public class SecurityOperationsImpl impl
    *           if the user does not have permission to create a user
    * @deprecated Use {@link #createUser(SecurityToken)} instead
    */
+  @Override
   @Deprecated
   public void createUser(final String user, final byte[] password, final Authorizations authorizations) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(user, password, authorizations);
@@ -118,10 +119,8 @@ public class SecurityOperationsImpl impl
   /**
    * Create a user
    * 
-   * @param user
-   *          the name of the user to create
-   * @param password
-   *          the plaintext password for the user
+   * @param newToken
+   *          the security token with the information about the user to modify
    * @param authorizations
    *          the authorizations that the user has for scanning
    * @throws AccumuloException
@@ -130,13 +129,15 @@ public class SecurityOperationsImpl impl
    *           if the user does not have permission to create a user
    * @deprecated Use {@link #createUser(SecurityToken)} instead
    */
+  @Deprecated
+  @Override
   public void createUser(final SecurityToken newToken, final Authorizations authorizations) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(newToken, authorizations);
     execute(new ClientExec<ClientService.Client>() {
       @Override
       public void execute(ClientService.Client client) throws Exception {
-        client.createUser(Tracer.traceInfo(), token.toThrift(), TokenHelper.wrapper(newToken),
-            ByteBufferUtil.toByteBuffers(authorizations.getAuthorizations()));
+        client
+            .createUser(Tracer.traceInfo(), token.toThrift(), TokenHelper.wrapper(newToken), ByteBufferUtil.toByteBuffers(authorizations.getAuthorizations()));
       }
     });
   }
@@ -144,15 +145,14 @@ public class SecurityOperationsImpl impl
   /**
    * Create a user
    * 
-   * @param user
-   *          the name of the user to create
-   * @param password
-   *          the plaintext password for the user
+   * @param newToken
+   *          the security token with the information about the user to create
    * @throws AccumuloException
    *           if a general error occurs
    * @throws AccumuloSecurityException
    *           if the user does not have permission to create a user
    */
+  @Override
   public void createUser(final SecurityToken newToken) throws AccumuloException, AccumuloSecurityException {
     createUser(newToken, new Authorizations());
   }
@@ -167,6 +167,7 @@ public class SecurityOperationsImpl impl
    * @throws AccumuloSecurityException
    *           if the user does not have permission to delete a user
    */
+  @Override
   public void dropUser(final String user) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(user);
     execute(new ClientExec<ClientService.Client>() {
@@ -191,6 +192,8 @@ public class SecurityOperationsImpl impl
    *           if the user does not have permission to ask
    * @deprecated since 1.5, use {@link #authenticateUser(SecurityToken)}
    */
+  @Deprecated
+  @Override
   public boolean authenticateUser(final String user, final byte[] password) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(user, password);
     return authenticateUser(new UserPassToken(user, password));
@@ -199,7 +202,7 @@ public class SecurityOperationsImpl impl
   /**
    * Verify a username/password combination is valid
    * 
-   * @param token
+   * @param token2
    *          the AccumuloToken of the principal to authenticate
    * @return true if the user asking is allowed to know and the specified AccumuloToken is valid, false otherwise
    * @throws AccumuloException
@@ -207,6 +210,7 @@ public class SecurityOperationsImpl impl
    * @throws AccumuloSecurityException
    *           if the user does not have permission to ask
    */
+  @Override
   public boolean authenticateUser(final SecurityToken token2) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(token2);
     return execute(new ClientExecReturn<Boolean,ClientService.Client>() {
@@ -220,15 +224,14 @@ public class SecurityOperationsImpl impl
   /**
    * Set the user's password
    * 
-   * @param user
-   *          the name of the user to modify
-   * @param password
-   *          the plaintext password for the user
+   * @param newToken
+   *          the security token with the information about the user to modify
    * @throws AccumuloException
    *           if a general error occurs
    * @throws AccumuloSecurityException
    *           if the user does not have permission to modify a user
    */
+  @Override
   public void changeUserPassword(final SecurityToken newToken) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(newToken);
     execute(new ClientExec<ClientService.Client>() {
@@ -257,7 +260,10 @@ public class SecurityOperationsImpl impl
    *           if a general error occurs
    * @throws AccumuloSecurityException
    *           if the user does not have permission to modify a user
+   * @deprecated since 1.5.0; use {@link #changeUserPassword(SecurityToken)} instead.
    */
+  @Deprecated
+  @Override
   public void changeUserPassword(final String user, final byte[] password) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(user, password);
     changeUserPassword(new UserPassToken(user, password));
@@ -275,6 +281,7 @@ public class SecurityOperationsImpl impl
    * @throws AccumuloSecurityException
    *           if the user does not have permission to modify a user
    */
+  @Override
   public void changeUserAuthorizations(final String user, final Authorizations authorizations) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(user, authorizations);
     execute(new ClientExec<ClientService.Client>() {
@@ -296,6 +303,7 @@ public class SecurityOperationsImpl impl
    * @throws AccumuloSecurityException
    *           if the user does not have permission to query a user
    */
+  @Override
   public Authorizations getUserAuthorizations(final String user) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(user);
     return execute(new ClientExecReturn<Authorizations,ClientService.Client>() {
@@ -319,6 +327,7 @@ public class SecurityOperationsImpl impl
    * @throws AccumuloSecurityException
    *           if the user does not have permission to query a user
    */
+  @Override
   public boolean hasSystemPermission(final String user, final SystemPermission perm) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(user, perm);
     return execute(new ClientExecReturn<Boolean,ClientService.Client>() {
@@ -344,6 +353,7 @@ public class SecurityOperationsImpl impl
    * @throws AccumuloSecurityException
    *           if the user does not have permission to query a user
    */
+  @Override
   public boolean hasTablePermission(final String user, final String table, final TablePermission perm) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(user, table, perm);
     return execute(new ClientExecReturn<Boolean,ClientService.Client>() {
@@ -366,6 +376,7 @@ public class SecurityOperationsImpl impl
    * @throws AccumuloSecurityException
    *           if the user does not have permission to grant a user permissions
    */
+  @Override
   public void grantSystemPermission(final String user, final SystemPermission permission) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(user, permission);
     execute(new ClientExec<ClientService.Client>() {
@@ -390,6 +401,7 @@ public class SecurityOperationsImpl impl
    * @throws AccumuloSecurityException
    *           if the user does not have permission to grant a user permissions
    */
+  @Override
   public void grantTablePermission(final String user, final String table, final TablePermission permission) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(user, table, permission);
     execute(new ClientExec<ClientService.Client>() {
@@ -412,6 +424,7 @@ public class SecurityOperationsImpl impl
    * @throws AccumuloSecurityException
    *           if the user does not have permission to revoke a user's permissions
    */
+  @Override
   public void revokeSystemPermission(final String user, final SystemPermission permission) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(user, permission);
     execute(new ClientExec<ClientService.Client>() {
@@ -436,6 +449,7 @@ public class SecurityOperationsImpl impl
    * @throws AccumuloSecurityException
    *           if the user does not have permission to revoke a user's permissions
    */
+  @Override
   public void revokeTablePermission(final String user, final String table, final TablePermission permission) throws AccumuloException,
       AccumuloSecurityException {
     ArgumentChecker.notNull(user, table, permission);
@@ -456,6 +470,7 @@ public class SecurityOperationsImpl impl
    * @throws AccumuloSecurityException
    *           if the user does not have permission to query users
    */
+  @Override
   public Set<String> listUsers() throws AccumuloException, AccumuloSecurityException {
     return execute(new ClientExecReturn<Set<String>,ClientService.Client>() {
       @Override

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java Thu Jan 31 19:00:09 2013
@@ -42,7 +42,6 @@ import java.util.concurrent.atomic.Atomi
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
-import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
@@ -89,6 +88,7 @@ import org.apache.accumulo.core.util.Str
 import org.apache.accumulo.core.util.TextUtil;
 import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.accumulo.core.util.UtilWaitThread;
+import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
@@ -114,7 +114,6 @@ public class TableOperationsImpl extends
    *          the connection information for this instance
    * @param credentials
    *          the username/password for this connection
-   * @param token.toThrift() 
    */
   public TableOperationsImpl(Instance instance, InstanceTokenWrapper credentials) {
     ArgumentChecker.notNull(instance, credentials);
@@ -127,6 +126,7 @@ public class TableOperationsImpl extends
    * 
    * @return List of tables in accumulo
    */
+  @Override
   public SortedSet<String> list() {
     OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Fetching list of tables...");
     TreeSet<String> tableNames = new TreeSet<String>(Tables.getNameToIdMap(instance).keySet());
@@ -141,6 +141,7 @@ public class TableOperationsImpl extends
    *          the name of the table
    * @return true if the table exists
    */
+  @Override
   public boolean exists(String tableName) {
     ArgumentChecker.notNull(tableName);
     if (tableName.equals(Constants.METADATA_TABLE_NAME))
@@ -164,6 +165,7 @@ public class TableOperationsImpl extends
    * @throws TableExistsException
    *           if the table already exists
    */
+  @Override
   public void create(String tableName) throws AccumuloException, AccumuloSecurityException, TableExistsException {
     create(tableName, true, TimeType.MILLIS);
   }
@@ -174,6 +176,7 @@ public class TableOperationsImpl extends
    * @param limitVersion
    *          Enables/disables the versioning iterator, which will limit the number of Key versions kept.
    */
+  @Override
   public void create(String tableName, boolean limitVersion) throws AccumuloException, AccumuloSecurityException, TableExistsException {
     create(tableName, limitVersion, TimeType.MILLIS);
   }
@@ -186,6 +189,7 @@ public class TableOperationsImpl extends
    * @param limitVersion
    *          Enables/disables the versioning iterator, which will limit the number of Key versions kept.
    */
+  @Override
   public void create(String tableName, boolean limitVersion, TimeType timeType) throws AccumuloException, AccumuloSecurityException, TableExistsException {
     ArgumentChecker.notNull(tableName, timeType);
     
@@ -373,7 +377,7 @@ public class TableOperationsImpl extends
     }
     
   }
-
+  
   /**
    * @param tableName
    *          the name of the table
@@ -386,6 +390,7 @@ public class TableOperationsImpl extends
    * @throws TableNotFoundException
    *           if the table does not exist
    */
+  @Override
   public void addSplits(String tableName, SortedSet<Text> partitionKeys) throws TableNotFoundException, AccumuloException, AccumuloSecurityException {
     String tableId = Tables.getTableId(instance, tableName);
     
@@ -393,14 +398,14 @@ public class TableOperationsImpl extends
     // should be sorted because we copied from a sorted set, but that makes assumptions about
     // how the copy was done so resort to be sure.
     Collections.sort(splits);
-
+    
     CountDownLatch latch = new CountDownLatch(splits.size());
     AtomicReference<Exception> exception = new AtomicReference<Exception>(null);
     
     ExecutorService executor = Executors.newFixedThreadPool(16, new NamingThreadFactory("addSplits"));
     try {
       executor.submit(new SplitTask(new SplitEnv(tableName, tableId, executor, latch, exception), splits));
-
+      
       while (!latch.await(100, TimeUnit.MILLISECONDS)) {
         if (exception.get() != null) {
           executor.shutdownNow();
@@ -490,6 +495,7 @@ public class TableOperationsImpl extends
     }
   }
   
+  @Override
   public void merge(String tableName, Text start, Text end) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     
     ArgumentChecker.notNull(tableName);
@@ -505,6 +511,7 @@ public class TableOperationsImpl extends
     }
   }
   
+  @Override
   public void deleteRows(String tableName, Text start, Text end) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     
     ArgumentChecker.notNull(tableName);
@@ -603,6 +610,7 @@ public class TableOperationsImpl extends
    * @throws TableNotFoundException
    *           if the table does not exist
    */
+  @Override
   public void delete(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     ArgumentChecker.notNull(tableName);
     
@@ -663,6 +671,7 @@ public class TableOperationsImpl extends
    * @throws TableExistsException
    *           if the new table name already exists
    */
+  @Override
   public void rename(String oldTableName, String newTableName) throws AccumuloSecurityException, TableNotFoundException, AccumuloException,
       TableExistsException {
     
@@ -674,6 +683,7 @@ public class TableOperationsImpl extends
   /**
    * @deprecated since 1.4 {@link #flush(String, Text, Text, boolean)}
    */
+  @Override
   @Deprecated
   public void flush(String tableName) throws AccumuloException, AccumuloSecurityException {
     try {
@@ -694,6 +704,7 @@ public class TableOperationsImpl extends
    *           if the user does not have permission
    * @throws TableNotFoundException
    */
+  @Override
   public void flush(String tableName, Text start, Text end, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     ArgumentChecker.notNull(tableName);
     
@@ -701,11 +712,13 @@ public class TableOperationsImpl extends
     _flush(tableId, start, end, wait);
   }
   
+  @Override
   public void compact(String tableName, Text start, Text end, boolean flush, boolean wait) throws AccumuloSecurityException, TableNotFoundException,
       AccumuloException {
     compact(tableName, start, end, new ArrayList<IteratorSetting>(), flush, wait);
   }
   
+  @Override
   public void compact(String tableName, Text start, Text end, List<IteratorSetting> iterators, boolean flush, boolean wait) throws AccumuloSecurityException,
       TableNotFoundException, AccumuloException {
     ArgumentChecker.notNull(tableName);
@@ -718,7 +731,7 @@ public class TableOperationsImpl extends
     
     List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableId.getBytes()), start == null ? EMPTY : TextUtil.getByteBuffer(start), end == null ? EMPTY
         : TextUtil.getByteBuffer(end), ByteBuffer.wrap(IteratorUtil.encodeIteratorSettings(iterators)));
-
+    
     Map<String,String> opts = new HashMap<String,String>();
     try {
       doTableOperation(TableOperation.COMPACT, args, opts, wait);
@@ -743,7 +756,7 @@ public class TableOperationsImpl extends
     }
     
   }
-
+  
   private void _flush(String tableId, Text start, Text end, boolean wait) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     
     try {
@@ -770,7 +783,8 @@ public class TableOperationsImpl extends
         MasterClientService.Iface client = null;
         try {
           client = MasterClient.getConnectionWithRetry(instance);
-          client.waitForFlush(Tracer.traceInfo(), token.toThrift(), tableId, TextUtil.getByteBuffer(start), TextUtil.getByteBuffer(end), flushID, wait ? Long.MAX_VALUE : 1);
+          client.waitForFlush(Tracer.traceInfo(), token.toThrift(), tableId, TextUtil.getByteBuffer(start), TextUtil.getByteBuffer(end), flushID,
+              wait ? Long.MAX_VALUE : 1);
           break;
         } catch (TTransportException tte) {
           log.debug("Failed to call initiateFlush, retrying ... ", tte);
@@ -809,6 +823,7 @@ public class TableOperationsImpl extends
    * @throws AccumuloSecurityException
    *           if the user does not have permission
    */
+  @Override
   public void setProperty(final String tableName, final String property, final String value) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(tableName, property, value);
     MasterClient.execute(instance, new ClientExec<MasterClientService.Client>() {
@@ -831,6 +846,7 @@ public class TableOperationsImpl extends
    * @throws AccumuloSecurityException
    *           if the user does not have permission
    */
+  @Override
   public void removeProperty(final String tableName, final String property) throws AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(tableName, property);
     MasterClient.execute(instance, new ClientExec<MasterClientService.Client>() {
@@ -850,6 +866,7 @@ public class TableOperationsImpl extends
    * @throws TableNotFoundException
    *           if the table does not exist
    */
+  @Override
   public Iterable<Entry<String,String>> getProperties(final String tableName) throws AccumuloException, TableNotFoundException {
     ArgumentChecker.notNull(tableName);
     try {
@@ -889,6 +906,7 @@ public class TableOperationsImpl extends
    * @throws TableNotFoundException
    *           if the table does not exist
    */
+  @Override
   public void setLocalityGroups(String tableName, Map<String,Set<Text>> groups) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     // ensure locality groups do not overlap
     HashSet<Text> all = new HashSet<Text>();
@@ -938,6 +956,7 @@ public class TableOperationsImpl extends
    * @throws TableNotFoundException
    *           if the table does not exist
    */
+  @Override
   public Map<String,Set<Text>> getLocalityGroups(String tableName) throws AccumuloException, TableNotFoundException {
     AccumuloConfiguration conf = new ConfigurationCopy(this.getProperties(tableName));
     Map<String,Set<ByteSequence>> groups = LocalityGroupUtil.getLocalityGroups(conf);
@@ -972,6 +991,7 @@ public class TableOperationsImpl extends
    * @throws TableNotFoundException
    *           if the table does not exist
    */
+  @Override
   public Set<Range> splitRangeByTablets(String tableName, Range range, int maxSplits) throws AccumuloException, AccumuloSecurityException,
       TableNotFoundException {
     ArgumentChecker.notNull(tableName, range);
@@ -990,7 +1010,7 @@ public class TableOperationsImpl extends
         throw new TableDeletedException(tableId);
       if (Tables.getTableState(instance, tableId) == TableState.OFFLINE)
         throw new TableOfflineException(instance, tableId);
-
+      
       log.warn("Unable to locate bins for specified range. Retrying.");
       // sleep randomly between 100 and 200ms
       UtilWaitThread.sleep(100 + (int) (Math.random() * 100));
@@ -1073,6 +1093,7 @@ public class TableOperationsImpl extends
    *           when the user does not have the proper permissions
    * @throws TableNotFoundException
    */
+  @Override
   public void offline(String tableName) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
     
     ArgumentChecker.notNull(tableName);
@@ -1097,6 +1118,7 @@ public class TableOperationsImpl extends
    *           when the user does not have the proper permissions
    * @throws TableNotFoundException
    */
+  @Override
   public void online(String tableName) throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
     ArgumentChecker.notNull(tableName);
     List<ByteBuffer> args = Arrays.asList(ByteBuffer.wrap(tableName.getBytes()));
@@ -1118,6 +1140,7 @@ public class TableOperationsImpl extends
    * @throws TableNotFoundException
    *           if table does not exist
    */
+  @Override
   public void clearLocatorCache(String tableName) throws TableNotFoundException {
     ArgumentChecker.notNull(tableName);
     TabletLocator tabLocator = TabletLocator.getInstance(instance, token, new Text(Tables.getTableId(instance, tableName)));
@@ -1129,6 +1152,7 @@ public class TableOperationsImpl extends
    * 
    * @return the map from table name to internal table id
    */
+  @Override
   public Map<String,String> tableIdMap() {
     return Tables.getNameToIdMap(instance);
   }
@@ -1164,23 +1188,24 @@ public class TableOperationsImpl extends
     }
     return props;
   }
-
+  
   @Override
   public void importTable(String tableName, String importDir) throws TableExistsException, AccumuloException, AccumuloSecurityException {
     ArgumentChecker.notNull(tableName, importDir);
     
-    try{
-      FileSystem fs = FileUtil.getFileSystem(CachedConfiguration.getInstance(), instance.getConfiguration());;
+    try {
+      FileSystem fs = FileUtil.getFileSystem(CachedConfiguration.getInstance(), instance.getConfiguration());
+      ;
       Map<String,String> props = getExportedProps(fs, new Path(importDir, Constants.EXPORT_FILE));
       
-      for(String propKey : props.keySet()){
+      for (String propKey : props.keySet()) {
         if (Property.isClassProperty(propKey) && !props.get(propKey).contains(Constants.CORE_PACKAGE_NAME)) {
           Logger.getLogger(this.getClass()).info(
               "Imported table sets '" + propKey + "' to '" + props.get(propKey) + "'.  Ensure this class is on Accumulo classpath.");
         }
       }
       
-    }catch(IOException ioe){
+    } catch (IOException ioe) {
       Logger.getLogger(this.getClass()).warn("Failed to check if imported table references external java classes : " + ioe.getMessage());
     }
     

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java Thu Jan 31 19:00:09 2013
@@ -18,7 +18,6 @@ package org.apache.accumulo.core.client.
 
 import java.util.concurrent.TimeUnit;
 
-import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.BatchDeleter;
@@ -40,9 +39,10 @@ import org.apache.accumulo.core.client.a
 import org.apache.accumulo.core.client.impl.thrift.ClientService;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.core.security.tokens.InstanceTokenWrapper;
+import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.core.util.ArgumentChecker;
+import org.apache.accumulo.trace.instrument.Tracer;
 
 public class ConnectorImpl extends Connector {
   private Instance instance;
@@ -58,10 +58,6 @@ public class ConnectorImpl extends Conne
    * 
    * Use {@link Instance#getConnector(String, byte[])}
    * 
-   * @param instance
-   * @param token
-   * @throws AccumuloException
-   * @throws AccumuloSecurityException
    * @see Instance#getConnector(String user, byte[] password)
    * @deprecated Not for client use
    */
@@ -137,8 +133,8 @@ public class ConnectorImpl extends Conne
   @Deprecated
   @Override
   public MultiTableBatchWriter createMultiTableBatchWriter(long maxMemory, long maxLatency, int maxWriteThreads) {
-    return new MultiTableBatchWriterImpl(instance, token, new BatchWriterConfig().setMaxMemory(maxMemory)
-        .setMaxLatency(maxLatency, TimeUnit.MILLISECONDS).setMaxWriteThreads(maxWriteThreads));
+    return new MultiTableBatchWriterImpl(instance, token, new BatchWriterConfig().setMaxMemory(maxMemory).setMaxLatency(maxLatency, TimeUnit.MILLISECONDS)
+        .setMaxWriteThreads(maxWriteThreads));
   }
   
   @Override
@@ -152,21 +148,11 @@ public class ConnectorImpl extends Conne
     return new ScannerImpl(instance, token, getTableId(tableName), authorizations);
   }
   
-  /*
-   * (non-Javadoc)
-   * 
-   * @see accumulo.core.client.Connector#whoami()
-   */
   @Override
   public String whoami() {
     return token.getPrincipal();
   }
   
-  /*
-   * (non-Javadoc)
-   * 
-   * @see accumulo.core.client.Connector#tableOperations()
-   */
   @Override
   public synchronized TableOperations tableOperations() {
     if (tableops == null)
@@ -174,11 +160,6 @@ public class ConnectorImpl extends Conne
     return tableops;
   }
   
-  /*
-   * (non-Javadoc)
-   * 
-   * @see accumulo.core.client.Connector#securityOperations()
-   */
   @Override
   public synchronized SecurityOperations securityOperations() {
     if (secops == null)
@@ -187,11 +168,6 @@ public class ConnectorImpl extends Conne
     return secops;
   }
   
-  /*
-   * (non-Javadoc)
-   * 
-   * @see accumulo.core.client.Connector#instanceOperations()
-   */
   @Override
   public synchronized InstanceOperations instanceOperations() {
     if (instanceops == null)

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java Thu Jan 31 19:00:09 2013
@@ -49,22 +49,19 @@ public class MockSecurityOperations impl
   
   /**
    * @deprecated @since 1.5, use {@link #createUser(SecurityToken)}
-   * @param user
-   * @param password
-   * @throws AccumuloException
-   * @throws AccumuloSecurityException
    */
+  @Deprecated
   public void createUser(String user, byte[] password) throws AccumuloException, AccumuloSecurityException {
     createUser(user, password, new Authorizations());
   }
   
+  @Deprecated
   @Override
   public void createUser(SecurityToken token, Authorizations authorization) throws AccumuloException, AccumuloSecurityException {
     if (token instanceof UserPassToken) {
       UserPassToken upt = (UserPassToken) token;
       this.acu.users.put(upt.getPrincipal(), new MockUser(upt.getPrincipal(), upt.getPassword(), authorization));
-    }
-    else
+    } else
       throw new AccumuloSecurityException(token.getPrincipal(), SecurityErrorCode.INVALID_TOKEN);
   }
   
@@ -78,6 +75,7 @@ public class MockSecurityOperations impl
     this.acu.users.remove(user);
   }
   
+  @Deprecated
   @Override
   public boolean authenticateUser(String name, byte[] password) throws AccumuloException, AccumuloSecurityException {
     MockUser user = acu.users.get(name);
@@ -85,7 +83,7 @@ public class MockSecurityOperations impl
       return false;
     return Arrays.equals(user.password, password);
   }
-
+  
   @Override
   public boolean authenticateUser(SecurityToken token) throws AccumuloException, AccumuloSecurityException {
     MockUser user = acu.users.get(token.getPrincipal());
@@ -93,10 +91,11 @@ public class MockSecurityOperations impl
       return false;
     return Arrays.equals(user.password, ((UserPassToken) token).getPassword());
   }
-
+  
   /**
    * @deprecated @since 1.5, use {@link #changeUserPassword(SecurityToken)}
    */
+  @Deprecated
   @Override
   public void changeUserPassword(String name, byte[] password) throws AccumuloException, AccumuloSecurityException {
     changeUserPassword(new UserPassToken(name, password));
@@ -105,15 +104,14 @@ public class MockSecurityOperations impl
   @Override
   public void changeUserPassword(SecurityToken token) throws AccumuloException, AccumuloSecurityException {
     MockUser user = acu.users.get(token.getPrincipal());
-    if (user != null){
+    if (user != null) {
       if (token instanceof UserPassToken) {
         UserPassToken upt = (UserPassToken) token;
         // want to copy the password
         user.password = upt.getPassword();
-      }
-      else throw new AccumuloSecurityException(token.getPrincipal(), SecurityErrorCode.INVALID_TOKEN);
-    }
-    else
+      } else
+        throw new AccumuloSecurityException(token.getPrincipal(), SecurityErrorCode.INVALID_TOKEN);
+    } else
       throw new AccumuloSecurityException(token.getPrincipal(), SecurityErrorCode.USER_DOESNT_EXIST);
   }
   

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModule.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModule.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModule.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/crypto/CryptoModule.java Thu Jan 31 19:00:09 2013
@@ -1,4 +1,4 @@
-/**
+/*
  * 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.
@@ -33,10 +33,8 @@ import java.util.Map;
 public interface CryptoModule {
   
   public enum CryptoInitProperty {
-    ALGORITHM_NAME("algorithm.name"), 
-    CIPHER_SUITE("cipher.suite"), 
-    INITIALIZATION_VECTOR("initialization.vector"), 
-    PLAINTEXT_SESSION_KEY("plaintext.session.key");
+    ALGORITHM_NAME("algorithm.name"), CIPHER_SUITE("cipher.suite"), INITIALIZATION_VECTOR("initialization.vector"), PLAINTEXT_SESSION_KEY(
+        "plaintext.session.key");
     
     private CryptoInitProperty(String name) {
       key = name;
@@ -57,7 +55,7 @@ public interface CryptoModule {
    * 
    * @param out
    *          the OutputStream to wrap
-   * @param conf
+   * @param cryptoOpts
    *          the cryptographic parameters to use; specific string names to look for will depend on the various implementations
    * @return an OutputStream that wraps the given parameter
    * @throws IOException
@@ -75,7 +73,7 @@ public interface CryptoModule {
    * 
    * @param in
    *          the InputStream to wrap
-   * @param conf
+   * @param cryptoOpts
    *          the cryptographic parameters to use; specific string names to look for will depend on the various implementations
    * @return an InputStream that wraps the given parameter
    * @throws IOException
@@ -106,12 +104,6 @@ public interface CryptoModule {
    * 
    * The cryptoInitParams contains all necessary information to properly initialize the given cipher, usually including things like initialization vector and
    * secret key.
-   * 
-   * @param in
-   * @param cryptoOpts
-   * @param cryptoInitParams
-   * @return
-   * @throws IOException
    */
   public InputStream getDecryptingInputStream(InputStream in, Map<String,String> cryptoOpts, Map<CryptoModule.CryptoInitProperty,Object> cryptoInitParams)
       throws IOException;

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/thrift/AuthInfo.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/thrift/AuthInfo.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/thrift/AuthInfo.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/thrift/AuthInfo.java Thu Jan 31 19:00:09 2013
@@ -30,6 +30,7 @@ import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.accumulo.core.security.tokens.UserPassToken;
 import org.apache.thrift.protocol.TTupleProtocol;
 import org.apache.thrift.scheme.IScheme;
 import org.apache.thrift.scheme.SchemeFactory;
@@ -37,7 +38,7 @@ import org.apache.thrift.scheme.Standard
 import org.apache.thrift.scheme.TupleScheme;
 
 /**
- * @deprecated since 1.5, use {@link#UserPassToken} instead
+ * @deprecated since 1.5, use {@link UserPassToken} instead
  */
 @SuppressWarnings("serial")
 public class AuthInfo implements org.apache.thrift.TBase<AuthInfo, AuthInfo._Fields>, java.io.Serializable, Cloneable {

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/tokens/UserPassToken.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/tokens/UserPassToken.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/tokens/UserPassToken.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/security/tokens/UserPassToken.java Thu Jan 31 19:00:09 2013
@@ -27,7 +27,7 @@ import org.apache.accumulo.core.util.Byt
 public class UserPassToken implements SecurityToken, PasswordUpdatable {
   private String username;
   private byte[] password;
-
+  
   public UserPassToken(String user, ByteBuffer password) {
     this(user, ByteBufferUtil.toBytes(password));
   }
@@ -41,6 +41,7 @@ public class UserPassToken implements Se
     this(user, password.toString().getBytes(Charset.forName("UTF-8")));
   }
   
+  @Override
   public void destroy() {
     Arrays.fill(password, (byte) 0);
     password = null;
@@ -53,9 +54,8 @@ public class UserPassToken implements Se
   
   /**
    * @deprecated since 1.5
-   * @param credentials
-   * @return
    */
+  @Deprecated
   public static UserPassToken convertAuthInfo(AuthInfo credentials) {
     return new UserPassToken(credentials.user, credentials.password);
   }
@@ -65,6 +65,7 @@ public class UserPassToken implements Se
     return username;
   }
   
+  @Override
   public byte[] getPassword() {
     return password;
   }
@@ -79,10 +80,11 @@ public class UserPassToken implements Se
     updatePassword(pu.getPassword());
   }
   
+  @Override
   public String toString() {
-    return "UserPassToken("+this.username+":"+new String(this.getPrincipal())+")";
+    return "UserPassToken(" + this.username + ":" + new String(this.getPrincipal()) + ")";
   }
-
+  
   @Override
   public int hashCode() {
     final int prime = 31;
@@ -91,7 +93,7 @@ public class UserPassToken implements Se
     result = prime * result + ((username == null) ? 0 : username.hashCode());
     return result;
   }
-
+  
   @Override
   public boolean equals(Object obj) {
     if (this == obj)
@@ -110,7 +112,7 @@ public class UserPassToken implements Se
       return false;
     return true;
   }
-
+  
   @Override
   public SecuritySerDe<? extends SecurityToken> getSerDe() {
     return new UserPassSerDe();

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/AuditedSecurityOperation.java Thu Jan 31 19:00:09 2013
@@ -1,4 +1,4 @@
-/**
+/*
  * 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.
@@ -24,8 +24,8 @@ import org.apache.accumulo.core.security
 import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
-import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.core.security.tokens.InstanceTokenWrapper;
+import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.server.security.handler.Authenticator;
 import org.apache.accumulo.server.security.handler.Authorizor;
 import org.apache.accumulo.server.security.handler.PermissionHandler;
@@ -35,12 +35,7 @@ import org.apache.log4j.Logger;
  * 
  */
 public class AuditedSecurityOperation extends SecurityOperation {
-  /**
-   * @param author
-   * @param authent
-   * @param pm
-   * @param instanceId
-   */
+  
   public AuditedSecurityOperation(Authorizor author, Authenticator authent, PermissionHandler pm, String instanceId) {
     super(author, authent, pm, instanceId);
   }
@@ -63,13 +58,7 @@ public class AuditedSecurityOperation ex
     log.log(AuditLevel.AUDIT, "Using credentials " + credentials.getPrincipal() + ": " + String.format(template, args));
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param password
-   * @return
-   * @throws ThriftSecurityException
-   */
+  @Override
   public boolean authenticateUser(InstanceTokenWrapper credentials, SecurityToken token) throws ThriftSecurityException {
     try {
       boolean result = super.authenticateUser(credentials, token);
@@ -78,16 +67,11 @@ public class AuditedSecurityOperation ex
     } catch (ThriftSecurityException ex) {
       audit(credentials, ex, "authenticateUser");
       log.debug(ex);
-   throw ex;
+      throw ex;
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @return The given user's authorizations
-   * @throws ThriftSecurityException
-   */
+  @Override
   public Authorizations getUserAuthorizations(InstanceTokenWrapper credentials, String user) throws ThriftSecurityException {
     try {
       Authorizations result = super.getUserAuthorizations(credentials, user);
@@ -101,11 +85,7 @@ public class AuditedSecurityOperation ex
     
   }
   
-  /**
-   * @param credentials
-   * @return
-   * @throws ThriftSecurityException
-   */
+  @Override
   public Authorizations getUserAuthorizations(InstanceTokenWrapper credentials) throws ThriftSecurityException {
     try {
       return getUserAuthorizations(credentials, credentials.getPrincipal());
@@ -115,12 +95,7 @@ public class AuditedSecurityOperation ex
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param authorizations
-   * @throws ThriftSecurityException
-   */
+  @Override
   public void changeAuthorizations(InstanceTokenWrapper credentials, String user, Authorizations authorizations) throws ThriftSecurityException {
     try {
       super.changeAuthorizations(credentials, user, authorizations);
@@ -128,16 +103,11 @@ public class AuditedSecurityOperation ex
     } catch (ThriftSecurityException ex) {
       audit(credentials, ex, "changing authorizations for %s", user);
       log.debug(ex);
-    throw ex;
+      throw ex;
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param bytes
-   * @throws ThriftSecurityException
-   */
+  @Override
   public void changePassword(InstanceTokenWrapper credentials, SecurityToken token) throws ThriftSecurityException {
     try {
       super.changePassword(credentials, token);
@@ -145,17 +115,11 @@ public class AuditedSecurityOperation ex
     } catch (ThriftSecurityException ex) {
       audit(credentials, ex, "changing password for %s", token.getPrincipal());
       log.debug(ex);
-  throw ex;
+      throw ex;
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param bytes
-   * @param authorizations
-   * @throws ThriftSecurityException
-   */
+  @Override
   public void createUser(InstanceTokenWrapper credentials, SecurityToken token, Authorizations authorizations) throws ThriftSecurityException {
     try {
       super.createUser(credentials, token, authorizations);
@@ -163,15 +127,11 @@ public class AuditedSecurityOperation ex
     } catch (ThriftSecurityException ex) {
       audit(credentials, ex, "createUser %s", token.getPrincipal());
       log.debug(ex);
-  throw ex;
+      throw ex;
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @throws ThriftSecurityException
-   */
+  @Override
   public void dropUser(InstanceTokenWrapper credentials, String user) throws ThriftSecurityException {
     try {
       super.dropUser(credentials, user);
@@ -179,16 +139,11 @@ public class AuditedSecurityOperation ex
     } catch (ThriftSecurityException ex) {
       audit(credentials, ex, "dropUser %s", user);
       log.debug(ex);
-  throw ex;
+      throw ex;
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param permission
-   * @throws ThriftSecurityException
-   */
+  @Override
   public void grantSystemPermission(InstanceTokenWrapper credentials, String user, SystemPermission permission) throws ThriftSecurityException {
     try {
       super.grantSystemPermission(credentials, user, permission);
@@ -200,13 +155,7 @@ public class AuditedSecurityOperation ex
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param table
-   * @param permission
-   * @throws ThriftSecurityException
-   */
+  @Override
   public void grantTablePermission(InstanceTokenWrapper credentials, String user, String table, TablePermission permission) throws ThriftSecurityException {
     try {
       super.grantTablePermission(credentials, user, table, permission);
@@ -218,12 +167,7 @@ public class AuditedSecurityOperation ex
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param permission
-   * @throws ThriftSecurityException
-   */
+  @Override
   public void revokeSystemPermission(InstanceTokenWrapper credentials, String user, SystemPermission permission) throws ThriftSecurityException {
     try {
       super.revokeSystemPermission(credentials, user, permission);
@@ -235,13 +179,7 @@ public class AuditedSecurityOperation ex
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param table
-   * @param permission
-   * @throws ThriftSecurityException
-   */
+  @Override
   public void revokeTablePermission(InstanceTokenWrapper credentials, String user, String table, TablePermission permission) throws ThriftSecurityException {
     try {
       super.revokeTablePermission(credentials, user, table, permission);
@@ -253,13 +191,7 @@ public class AuditedSecurityOperation ex
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param permission
-   * @return
-   * @throws ThriftSecurityException
-   */
+  @Override
   public boolean hasSystemPermission(InstanceTokenWrapper credentials, String user, SystemPermission permission) throws ThriftSecurityException {
     try {
       boolean result = super.hasSystemPermission(credentials, user, permission);
@@ -272,14 +204,7 @@ public class AuditedSecurityOperation ex
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param table
-   * @param permission
-   * @return
-   * @throws ThriftSecurityException
-   */
+  @Override
   public boolean hasTablePermission(InstanceTokenWrapper credentials, String user, String table, TablePermission permission) throws ThriftSecurityException {
     try {
       boolean result = super.hasTablePermission(credentials, user, table, permission);
@@ -292,11 +217,7 @@ public class AuditedSecurityOperation ex
     }
   }
   
-  /**
-   * @param credentials
-   * @return
-   * @throws ThriftSecurityException
-   */
+  @Override
   public Set<String> listUsers(InstanceTokenWrapper credentials) throws ThriftSecurityException {
     try {
       Set<String> result = super.listUsers(credentials);
@@ -309,11 +230,7 @@ public class AuditedSecurityOperation ex
     }
   }
   
-  /**
-   * @param systemCredentials
-   * @param table
-   * @throws ThriftSecurityException
-   */
+  @Override
   public void deleteTable(InstanceTokenWrapper credentials, String table) throws ThriftSecurityException {
     try {
       super.deleteTable(credentials, table);
@@ -321,7 +238,7 @@ public class AuditedSecurityOperation ex
     } catch (ThriftSecurityException ex) {
       audit(credentials, ex, "deleting table %s", table);
       log.debug(ex);
-  throw ex;
+      throw ex;
     }
   }
   

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java Thu Jan 31 19:00:09 2013
@@ -1,4 +1,4 @@
-/**
+/*
  * 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.
@@ -22,7 +22,6 @@ import org.apache.accumulo.core.Constant
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.TableNotFoundException;
 import org.apache.accumulo.core.client.admin.SecurityOperationsImpl;
-import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.security.Authorizations;
@@ -30,8 +29,8 @@ import org.apache.accumulo.core.security
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.security.thrift.SecurityErrorCode;
 import org.apache.accumulo.core.security.thrift.ThriftSecurityException;
-import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.core.security.tokens.InstanceTokenWrapper;
+import org.apache.accumulo.core.security.tokens.SecurityToken;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.security.handler.Authenticator;
@@ -148,7 +147,7 @@ public class SecurityOperation {
     else if (credentials.getPrincipal().equals(SecurityConstants.SYSTEM_USERNAME)) {
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.BAD_CREDENTIALS);
     }
-        
+    
     try {
       if (!authenticator.authenticateUser(credentials.getToken())) {
         throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.BAD_CREDENTIALS);
@@ -166,13 +165,6 @@ public class SecurityOperation {
     return true;
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param password
-   * @return
-   * @throws ThriftSecurityException
-   */
   public boolean authenticateUser(InstanceTokenWrapper credentials, SecurityToken token) throws ThriftSecurityException {
     canAskAboutUser(credentials, token.getPrincipal());
     // User is already authenticated from canAskAboutUser, this gets around issues with !SYSTEM user
@@ -185,12 +177,6 @@ public class SecurityOperation {
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @return The given user's authorizations
-   * @throws ThriftSecurityException
-   */
   public Authorizations getUserAuthorizations(InstanceTokenWrapper credentials, String user) throws ThriftSecurityException {
     authenticate(credentials);
     
@@ -210,11 +196,6 @@ public class SecurityOperation {
     }
   }
   
-  /**
-   * @param credentials
-   * @return
-   * @throws ThriftSecurityException
-   */
   public Authorizations getUserAuthorizations(InstanceTokenWrapper credentials) throws ThriftSecurityException {
     return getUserAuthorizations(credentials, credentials.getPrincipal());
   }
@@ -243,7 +224,6 @@ public class SecurityOperation {
    * Checks if a user has a table permission
    * 
    * @return true if a user exists and has permission; false otherwise
-   * @throws ThriftTableOperationException
    */
   private boolean hasTablePermission(String user, String table, TablePermission permission, boolean useCached) throws ThriftSecurityException {
     if (user.equals(SecurityConstants.SYSTEM_USERNAME))
@@ -274,10 +254,6 @@ public class SecurityOperation {
         || hasSystemPermission(credentials.getPrincipal(), SystemPermission.DROP_USER, false);
   }
   
-  /**
-   * @param user
-   * @throws ThriftSecurityException
-   */
   private void targetUserExists(String user) throws ThriftSecurityException {
     if (user.equals(SecurityConstants.SYSTEM_USERNAME) || user.equals(getRootUsername()))
       return;
@@ -290,37 +266,16 @@ public class SecurityOperation {
     }
   }
   
-  /**
-   * @param credentials
-   * @param string
-   * @return
-   * @throws ThriftSecurityException
-   * @throws TableNotFoundException
-   */
   public boolean canScan(InstanceTokenWrapper credentials, String table) throws ThriftSecurityException {
     authenticate(credentials);
     return hasTablePermission(credentials.getPrincipal(), table, TablePermission.READ, true);
   }
   
-  /**
-   * @param credentials
-   * @param string
-   * @return
-   * @throws ThriftSecurityException
-   * @throws TableNotFoundException
-   */
   public boolean canWrite(InstanceTokenWrapper credentials, String table) throws ThriftSecurityException {
     authenticate(credentials);
     return hasTablePermission(credentials.getPrincipal(), table, TablePermission.WRITE, true);
   }
   
-  /**
-   * @param credentials
-   * @param string
-   * @return
-   * @throws ThriftSecurityException
-   * @throws TableNotFoundException
-   */
   public boolean canSplitTablet(InstanceTokenWrapper credentials, String table) throws ThriftSecurityException {
     authenticate(credentials);
     return hasSystemPermission(credentials.getPrincipal(), SystemPermission.ALTER_TABLE, false)
@@ -329,146 +284,70 @@ public class SecurityOperation {
   }
   
   /**
-   * @param credentials
-   * @return
-   * @throws ThriftSecurityException
-   * 
-   *           This is the check to perform any system action. This includes tserver's loading of a tablet, shutting the system down, or altering system
-   *           properties.
+   * This is the check to perform any system action. This includes tserver's loading of a tablet, shutting the system down, or altering system properties.
    */
   public boolean canPerformSystemActions(InstanceTokenWrapper credentials) throws ThriftSecurityException {
     authenticate(credentials);
     return hasSystemPermission(credentials.getPrincipal(), SystemPermission.SYSTEM, false);
   }
   
-  /**
-   * @param c
-   * @param tableId
-   * @throws ThriftSecurityException
-   * @throws ThriftTableOperationException
-   */
   public boolean canFlush(InstanceTokenWrapper c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasTablePermission(c.getPrincipal(), tableId, TablePermission.WRITE, false)
         || hasTablePermission(c.getPrincipal(), tableId, TablePermission.ALTER_TABLE, false);
   }
   
-  /**
-   * @param c
-   * @param tableId
-   * @throws ThriftSecurityException
-   * @throws ThriftTableOperationException
-   */
   public boolean canAlterTable(InstanceTokenWrapper c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasTablePermission(c.getPrincipal(), tableId, TablePermission.ALTER_TABLE, false)
         || hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_TABLE, false);
   }
   
-  /**
-   * @param c
-   * @throws ThriftSecurityException
-   */
   public boolean canCreateTable(InstanceTokenWrapper c) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.CREATE_TABLE, false);
   }
   
-  /**
-   * @param c
-   * @param tableId
-   * @return
-   * @throws TableNotFoundException
-   * @throws ThriftSecurityException
-   */
   public boolean canRenameTable(InstanceTokenWrapper c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_TABLE, false)
         || hasTablePermission(c.getPrincipal(), tableId, TablePermission.ALTER_TABLE, false);
   }
   
-  /**
-   * @param c
-   * @return
-   * @throws TableNotFoundException
-   * @throws ThriftSecurityException
-   */
   public boolean canCloneTable(InstanceTokenWrapper c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.CREATE_TABLE, false)
         && hasTablePermission(c.getPrincipal(), tableId, TablePermission.READ, false);
   }
   
-  /**
-   * @param c
-   * @param tableId
-   * @return
-   * @throws TableNotFoundException
-   * @throws ThriftSecurityException
-   */
   public boolean canDeleteTable(InstanceTokenWrapper c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.DROP_TABLE, false)
         || hasTablePermission(c.getPrincipal(), tableId, TablePermission.DROP_TABLE, false);
   }
   
-  /**
-   * @param c
-   * @param tableId
-   * @return
-   * @throws TableNotFoundException
-   * @throws ThriftSecurityException
-   */
   public boolean canOnlineOfflineTable(InstanceTokenWrapper c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.SYSTEM, false) || hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_TABLE, false)
         || hasTablePermission(c.getPrincipal(), tableId, TablePermission.ALTER_TABLE, false);
   }
   
-  /**
-   * @param c
-   * @param tableId
-   * @return
-   * @throws TableNotFoundException
-   * @throws ThriftSecurityException
-   */
   public boolean canMerge(InstanceTokenWrapper c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.SYSTEM, false) || hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_TABLE, false)
         || hasTablePermission(c.getPrincipal(), tableId, TablePermission.ALTER_TABLE, false);
   }
   
-  /**
-   * @param c
-   * @param tableId
-   * @return
-   * @throws TableNotFoundException
-   * @throws ThriftSecurityException
-   */
   public boolean canDeleteRange(InstanceTokenWrapper c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.SYSTEM, false) || hasTablePermission(c.getPrincipal(), tableId, TablePermission.WRITE, false);
   }
   
-  /**
-   * @param c
-   * @param tableId
-   * @return
-   * @throws TableNotFoundException
-   * @throws ThriftSecurityException
-   */
   public boolean canBulkImport(InstanceTokenWrapper c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasTablePermission(c.getPrincipal(), tableId, TablePermission.BULK_IMPORT, false);
   }
   
-  /**
-   * @param c
-   * @param tableId
-   * @return
-   * @throws TableNotFoundException
-   * @throws ThriftSecurityException
-   */
   public boolean canCompact(InstanceTokenWrapper c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_TABLE, false)
@@ -476,11 +355,6 @@ public class SecurityOperation {
         || hasTablePermission(c.getPrincipal(), tableId, TablePermission.WRITE, false);
   }
   
-  /**
-   * @param credentials
-   * @return
-   * @throws ThriftSecurityException
-   */
   public boolean canChangeAuthorizations(InstanceTokenWrapper c, String user) throws ThriftSecurityException {
     authenticate(c);
     if (user.equals(SecurityConstants.SYSTEM_USERNAME))
@@ -488,12 +362,6 @@ public class SecurityOperation {
     return hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_USER, false);
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @return
-   * @throws ThriftSecurityException
-   */
   public boolean canChangePassword(InstanceTokenWrapper c, String user) throws ThriftSecurityException {
     authenticate(c);
     if (user.equals(SecurityConstants.SYSTEM_USERNAME))
@@ -501,12 +369,6 @@ public class SecurityOperation {
     return c.getPrincipal().equals(user) || hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_USER, false);
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @return
-   * @throws ThriftSecurityException
-   */
   public boolean canCreateUser(InstanceTokenWrapper c, String user) throws ThriftSecurityException {
     authenticate(c);
     
@@ -517,12 +379,6 @@ public class SecurityOperation {
     return hasSystemPermission(c.getPrincipal(), SystemPermission.CREATE_USER, false);
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @return
-   * @throws ThriftSecurityException
-   */
   public boolean canDropUser(InstanceTokenWrapper c, String user) throws ThriftSecurityException {
     authenticate(c);
     
@@ -533,13 +389,6 @@ public class SecurityOperation {
     return hasSystemPermission(c.getPrincipal(), SystemPermission.DROP_USER, false);
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param sysPerm
-   * @return
-   * @throws ThriftSecurityException
-   */
   public boolean canGrantSystem(InstanceTokenWrapper c, String user, SystemPermission sysPerm) throws ThriftSecurityException {
     authenticate(c);
     
@@ -554,13 +403,6 @@ public class SecurityOperation {
     return hasSystemPermission(c.getPrincipal(), SystemPermission.GRANT, false);
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param table
-   * @return
-   * @throws ThriftSecurityException
-   */
   public boolean canGrantTable(InstanceTokenWrapper c, String user, String table) throws ThriftSecurityException {
     authenticate(c);
     
@@ -572,13 +414,6 @@ public class SecurityOperation {
         || hasTablePermission(c.getPrincipal(), table, TablePermission.GRANT, false);
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param sysPerm
-   * @return
-   * @throws ThriftSecurityException
-   */
   public boolean canRevokeSystem(InstanceTokenWrapper c, String user, SystemPermission sysPerm) throws ThriftSecurityException {
     authenticate(c);
     
@@ -593,13 +428,6 @@ public class SecurityOperation {
     return hasSystemPermission(c.getPrincipal(), SystemPermission.GRANT, false);
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param table
-   * @return
-   * @throws ThriftSecurityException
-   */
   public boolean canRevokeTable(InstanceTokenWrapper c, String user, String table) throws ThriftSecurityException {
     authenticate(c);
     
@@ -611,12 +439,6 @@ public class SecurityOperation {
         || hasTablePermission(c.getPrincipal(), table, TablePermission.GRANT, false);
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param authorizations
-   * @throws ThriftSecurityException
-   */
   public void changeAuthorizations(InstanceTokenWrapper credentials, String user, Authorizations authorizations) throws ThriftSecurityException {
     if (!canChangeAuthorizations(credentials, user))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -631,12 +453,6 @@ public class SecurityOperation {
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param bytes
-   * @throws ThriftSecurityException
-   */
   public void changePassword(InstanceTokenWrapper credentials, SecurityToken token) throws ThriftSecurityException {
     if (!canChangePassword(credentials, token.getPrincipal()))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -648,13 +464,6 @@ public class SecurityOperation {
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param bytes
-   * @param authorizations
-   * @throws ThriftSecurityException
-   */
   public void createUser(InstanceTokenWrapper credentials, SecurityToken token, Authorizations authorizations) throws ThriftSecurityException {
     if (!canCreateUser(credentials, token.getPrincipal()))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -670,11 +479,6 @@ public class SecurityOperation {
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @throws ThriftSecurityException
-   */
   public void dropUser(InstanceTokenWrapper credentials, String user) throws ThriftSecurityException {
     if (!canDropUser(credentials, user))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -688,12 +492,6 @@ public class SecurityOperation {
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param permissionById
-   * @throws ThriftSecurityException
-   */
   public void grantSystemPermission(InstanceTokenWrapper credentials, String user, SystemPermission permissionById) throws ThriftSecurityException {
     if (!canGrantSystem(credentials, user, permissionById))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -708,13 +506,6 @@ public class SecurityOperation {
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param tableId
-   * @param permission
-   * @throws ThriftSecurityException
-   */
   public void grantTablePermission(InstanceTokenWrapper c, String user, String tableId, TablePermission permission) throws ThriftSecurityException {
     if (!canGrantTable(c, user, tableId))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -731,12 +522,6 @@ public class SecurityOperation {
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param permission
-   * @throws ThriftSecurityException
-   */
   public void revokeSystemPermission(InstanceTokenWrapper credentials, String user, SystemPermission permission) throws ThriftSecurityException {
     if (!canRevokeSystem(credentials, user, permission))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -752,13 +537,6 @@ public class SecurityOperation {
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param tableId
-   * @param permission
-   * @throws ThriftSecurityException
-   */
   public void revokeTablePermission(InstanceTokenWrapper c, String user, String tableId, TablePermission permission) throws ThriftSecurityException {
     if (!canRevokeTable(c, user, tableId))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -776,27 +554,12 @@ public class SecurityOperation {
     }
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param permissionById
-   * @return
-   * @throws ThriftSecurityException
-   */
   public boolean hasSystemPermission(InstanceTokenWrapper credentials, String user, SystemPermission permissionById) throws ThriftSecurityException {
     if (!canAskAboutOtherUsers(credentials, user))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
     return hasSystemPermission(user, permissionById, false);
   }
   
-  /**
-   * @param credentials
-   * @param user
-   * @param tableId
-   * @param permissionById
-   * @return
-   * @throws ThriftSecurityException
-   */
   public boolean hasTablePermission(InstanceTokenWrapper credentials, String user, String tableId, TablePermission permissionById)
       throws ThriftSecurityException {
     if (!canAskAboutOtherUsers(credentials, user))
@@ -804,11 +567,6 @@ public class SecurityOperation {
     return hasTablePermission(user, tableId, permissionById, false);
   }
   
-  /**
-   * @param credentials
-   * @return
-   * @throws ThriftSecurityException
-   */
   public Set<String> listUsers(InstanceTokenWrapper credentials) throws ThriftSecurityException {
     authenticate(credentials);
     try {
@@ -818,11 +576,6 @@ public class SecurityOperation {
     }
   }
   
-  /**
-   * @param systemCredentials
-   * @param tableId
-   * @throws ThriftSecurityException
-   */
   public void deleteTable(InstanceTokenWrapper credentials, String tableId) throws ThriftSecurityException {
     if (!canDeleteTable(credentials, tableId))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/Authorizor.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/Authorizor.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/Authorizor.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/Authorizor.java Thu Jan 31 19:00:09 2013
@@ -1,4 +1,4 @@
-/**
+/*
  * 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.
@@ -26,60 +26,39 @@ import org.apache.accumulo.core.security
  * Accumulo, it should throw an AccumuloSecurityException with the error code UNSUPPORTED_OPERATION
  */
 public interface Authorizor {
+  
   /**
    * Sets up the authorizor for a new instance of Accumulo
-   * 
-   * @param instanceId
    */
   public void initialize(String instanceId, boolean initialize);
-
+  
   /**
    * Used to validate that the Authorizor, Authenticator, and permission handler can coexist
-   * 
-   * @param auth
-   * @return
    */
   public boolean validSecurityHandlers(Authenticator auth, PermissionHandler pm);
   
   /**
    * Used to initialize security for the root user
-   * 
-   * @param rootuser
-   * @throws AccumuloSecurityException
    */
   public void initializeSecurity(InstanceTokenWrapper credentials, String rootuser) throws AccumuloSecurityException, ThriftSecurityException;
   
   /**
    * Used to change the authorizations for the user
-   * 
-   * @param user
-   * @param authorizations
-   * @throws AccumuloSecurityException
    */
   public void changeAuthorizations(String user, Authorizations authorizations) throws AccumuloSecurityException;
   
   /**
    * Used to get the authorizations for the user
-   * 
-   * @param user
-   * @return
-   * @throws AccumuloSecurityException
    */
   public Authorizations getCachedUserAuthorizations(String user) throws AccumuloSecurityException;
   
   /**
    * Initializes a new user
-   * 
-   * @param user
-   * @throws AccumuloSecurityException
    */
   public void initUser(String user) throws AccumuloSecurityException;
   
   /**
    * Deletes a user
-   * 
-   * @param user
-   * @throws AccumuloSecurityException
    */
   public void dropUser(String user) throws AccumuloSecurityException;
 }

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/PermissionHandler.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/PermissionHandler.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/PermissionHandler.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/PermissionHandler.java Thu Jan 31 19:00:09 2013
@@ -1,4 +1,4 @@
-/**
+/*
  * 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.
@@ -28,144 +28,80 @@ import org.apache.accumulo.core.security
  * Accumulo, it should throw an AccumuloSecurityException with the error code UNSUPPORTED_OPERATION
  */
 public interface PermissionHandler {
+  
   /**
    * Sets up the permission handler for a new instance of Accumulo
-   * 
-   * @param instanceId
    */
   public void initialize(String instanceId, boolean initialize);
   
   /**
    * Used to validate that the Authorizor, Authenticator, and permission handler can coexist
-   * 
-   * @param auth
-   * @return
    */
   public boolean validSecurityHandlers(Authenticator authent, Authorizor author);
   
   /**
    * Used to initialize security for the root user
-   * 
-   * @param rootuser
-   * @throws AccumuloSecurityException
    */
   public void initializeSecurity(InstanceTokenWrapper credentials, String rootuser) throws AccumuloSecurityException, ThriftSecurityException;
   
   /**
    * Used to get the system permission for the user
-   * 
-   * @param user
-   * @param permission
-   * @return
-   * @throws AccumuloSecurityException
    */
   public boolean hasSystemPermission(String user, SystemPermission permission) throws AccumuloSecurityException;
   
   /**
    * Used to get the system permission for the user, with caching due to high frequency operation. NOTE: At this time, this method is unused but is included
    * just in case we need it in the future.
-   * 
-   * @param user
-   * @param permission
-   * @return
-   * @throws AccumuloSecurityException
    */
   public boolean hasCachedSystemPermission(String user, SystemPermission permission) throws AccumuloSecurityException;
   
   /**
    * Used to get the table permission of a user for a table
-   * 
-   * @param user
-   * @param table
-   * @param permission
-   * @return
-   * @throws AccumuloSecurityException
-   * @throws TableNotFoundException
    */
   public boolean hasTablePermission(String user, String table, TablePermission permission) throws AccumuloSecurityException, TableNotFoundException;
   
   /**
    * Used to get the table permission of a user for a table, with caching. This method is for high frequency operations
-   * 
-   * @param user
-   * @param table
-   * @param permission
-   * @return
-   * @throws AccumuloSecurityException
-   * @throws TableNotFoundException
    */
   public boolean hasCachedTablePermission(String user, String table, TablePermission permission) throws AccumuloSecurityException, TableNotFoundException;
   
   /**
    * Gives the user the given system permission
-   * 
-   * @param user
-   * @param permission
-   * @throws AccumuloSecurityException
    */
   public void grantSystemPermission(String user, SystemPermission permission) throws AccumuloSecurityException;
   
   /**
    * Denies the user the given system permission
-   * 
-   * @param user
-   * @param permission
-   * @throws AccumuloSecurityException
    */
   public void revokeSystemPermission(String user, SystemPermission permission) throws AccumuloSecurityException;
   
   /**
    * Gives the user the given table permission
-   * 
-   * @param user
-   * @param table
-   * @param permission
-   * @throws AccumuloSecurityException
-   * @throws TableNotFoundException
    */
   public void grantTablePermission(String user, String table, TablePermission permission) throws AccumuloSecurityException, TableNotFoundException;
   
   /**
    * Denies the user the given table permission.
-   * 
-   * @param user
-   * @param table
-   * @param permission
-   * @throws AccumuloSecurityException
-   * @throws TableNotFoundException
    */
   public void revokeTablePermission(String user, String table, TablePermission permission) throws AccumuloSecurityException, TableNotFoundException;
   
   /**
    * Cleans up the permissions for a table. Used when a table gets deleted.
-   * 
-   * @param table
-   * @throws AccumuloSecurityException
-   * @throws TableNotFoundException
    */
   public void cleanTablePermissions(String table) throws AccumuloSecurityException, TableNotFoundException;
   
   /**
    * Initializes a new user
-   * 
-   * @param user
-   * @throws AccumuloSecurityException
    */
   public void initUser(String user) throws AccumuloSecurityException;
   
   /**
    * Initializes a new user
-   * 
-   * @param user
-   * @throws AccumuloSecurityException
    */
   public void initTable(String table) throws AccumuloSecurityException;
   
   /**
    * Deletes a user
-   * 
-   * @param user
-   * @throws AccumuloSecurityException
    */
   public void cleanUser(String user) throws AccumuloSecurityException;
 }

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKSecurityTool.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKSecurityTool.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKSecurityTool.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/security/handler/ZKSecurityTool.java Thu Jan 31 19:00:09 2013
@@ -1,4 +1,4 @@
-/**
+/*
  * 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.
@@ -36,8 +36,8 @@ import org.apache.log4j.Logger;
 
 /**
  * All the static too methods used for this class, so that we can separate out stuff that isn't using ZooKeeper. That way, we can check the synchronization
- * model more easily, as we only need to check to make sure zooCache is cleared when things are written to ZooKeeper in methods that might use it. These
- * won't, and so don't need to be checked.
+ * model more easily, as we only need to check to make sure zooCache is cleared when things are written to ZooKeeper in methods that might use it. These won't,
+ * and so don't need to be checked.
  */
 class ZKSecurityTool {
   private static final Logger log = Logger.getLogger(ZKSecurityTool.class);
@@ -101,7 +101,7 @@ class ZKSecurityTool {
   public static byte[] convertAuthorizations(Authorizations authorizations) {
     return authorizations.getAuthorizationsArray();
   }
-
+  
   public static byte[] convertSystemPermissions(Set<SystemPermission> systempermissions) {
     ByteArrayOutputStream bytes = new ByteArrayOutputStream(systempermissions.size());
     DataOutputStream out = new DataOutputStream(bytes);
@@ -149,11 +149,7 @@ class ZKSecurityTool {
     return toReturn;
   }
   
-  /**
-   * @param instanceId
-   * @return
-   */
   public static String getInstancePath(String instanceId) {
     return Constants.ZROOT + "/" + instanceId;
   }
-}
\ No newline at end of file
+}

Modified: accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java?rev=1441124&r1=1441123&r2=1441124&view=diff
==============================================================================
--- accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java (original)
+++ accumulo/trunk/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java Thu Jan 31 19:00:09 2013
@@ -82,13 +82,13 @@ public class SecurityHelper {
     log.debug("Setting system user pass to " + new String(sysUserPass));
     state.set(masterPass, sysUserPass);
     state.set(masterPass + "time", System.currentTimeMillis());
-
+    
   }
   
   public static boolean sysUserPassTransient(State state) {
     return System.currentTimeMillis() - state.getLong(masterPass + "time") < 1000;
   }
-
+  
   public static byte[] getTabUserPass(State state) {
     return (byte[]) state.get(tUserPass);
   }
@@ -102,7 +102,7 @@ public class SecurityHelper {
   public static boolean tabUserPassTransient(State state) {
     return System.currentTimeMillis() - state.getLong(tUserPass + "time") < 1000;
   }
-
+  
   public static boolean getTabUserExists(State state) {
     return Boolean.parseBoolean(state.getString(tUserExists));
   }
@@ -136,7 +136,7 @@ public class SecurityHelper {
     state.set("Tab" + userName + tp.name(), Boolean.toString(value));
     if (tp.equals(TablePermission.READ) || tp.equals(TablePermission.WRITE))
       state.set("Tab" + userName + tp.name() + "time", System.currentTimeMillis());
-
+    
   }
   
   public static boolean getSysPerm(State state, String userName, SystemPermission tp) {
@@ -204,12 +204,6 @@ public class SecurityHelper {
     return fs;
   }
   
-  /**
-   * @param state
-   * @param tabUserName
-   * @param tp
-   * @return
-   */
   public static boolean inAmbiguousZone(State state, String userName, TablePermission tp) {
     if (tp.equals(TablePermission.READ) || tp.equals(TablePermission.WRITE)) {
       Long setTime = (Long) state.get("Tab" + userName + tp.name() + "time");



Mime
View raw message