accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [1/2] ACCUMULO-1872 Remove compiler warnings
Date Fri, 08 Nov 2013 22:26:39 GMT
Updated Branches:
  refs/heads/1.5.1-SNAPSHOT 422aaaa7c -> 7f403df24


http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f403df2/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
----------------------------------------------------------------------
diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
index 81fbe29..94094ed 100644
--- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
@@ -27,13 +27,13 @@ import java.util.Map;
  */
 
 public class MiniAccumuloConfig {
-  
+
   private File dir = null;
   private String rootPassword = null;
   private Map<String,String> siteConfig = Collections.emptyMap();
   private int numTservers = 2;
   private boolean runGC = false;
-  
+
   /**
    * @param dir
    *          An empty or nonexistant temp directoy that Accumulo and Zookeeper can store data in. Creating the directory is left to the user. Java 7, Guava,
@@ -41,64 +41,64 @@ public class MiniAccumuloConfig {
    * @param rootPassword
    *          The initial password for the Accumulo root user
    */
-  
+
   public MiniAccumuloConfig(File dir, String rootPassword) {
     this.dir = dir;
     this.rootPassword = rootPassword;
   }
-  
+
   public File getDir() {
     return dir;
   }
-  
+
   public String getRootPassword() {
     return rootPassword;
   }
-  
+
   public int getNumTservers() {
     return numTservers;
   }
-  
+
   /**
    * Calling this method is optional. If not set, it defaults to two.
    * 
    * @param numTservers
    *          the number of tablet servers that mini accumulo cluster should start
    */
-  
+
   public MiniAccumuloConfig setNumTservers(int numTservers) {
     if (numTservers < 1)
       throw new IllegalArgumentException("Must have at least one tablet server");
     this.numTservers = numTservers;
     return this;
   }
-  
+
   public Map<String,String> getSiteConfig() {
     return siteConfig;
   }
-  
+
   /**
    * Calling this method is optional. If not set, it defautls to an empty map.
    * 
    * @param siteConfig
    *          key/values that you normally put in accumulo-site.xml can be put here
    */
-  
+
   public MiniAccumuloConfig setSiteConfig(Map<String,String> siteConfig) {
     this.siteConfig = siteConfig;
     return this;
   }
-  
+
   /**
    * Whether or not the Accumulo garbage collector proces will run
-   * @return
    */
   public boolean shouldRunGC() {
     return runGC;
   }
-  
+
   /**
    * Sets if the Accumulo garbage collector process should run
+   * 
    * @param shouldRunGC
    */
   public void runGC(boolean shouldRunGC) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f403df2/server/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java b/server/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java
index 074f3be..ca7e42c 100644
--- a/server/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java
+++ b/server/src/main/java/org/apache/accumulo/server/client/HdfsZooInstance.java
@@ -52,74 +52,74 @@ import org.apache.log4j.Logger;
  * 
  */
 public class HdfsZooInstance implements Instance {
-  
+
   public static class AccumuloNotInitializedException extends RuntimeException {
     private static final long serialVersionUID = 1L;
-    
+
     public AccumuloNotInitializedException(String string) {
       super(string);
     }
   }
-  
+
   private HdfsZooInstance() {
     AccumuloConfiguration acuConf = ServerConfiguration.getSiteConfiguration();
     zooCache = new ZooCache(acuConf.get(Property.INSTANCE_ZK_HOST), (int) acuConf.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT));
   }
-  
+
   private static HdfsZooInstance cachedHdfsZooInstance = null;
-  
+
   public static synchronized Instance getInstance() {
     if (cachedHdfsZooInstance == null)
       cachedHdfsZooInstance = new HdfsZooInstance();
     return cachedHdfsZooInstance;
   }
-  
+
   private static ZooCache zooCache;
   private static String instanceId = null;
   private static final Logger log = Logger.getLogger(HdfsZooInstance.class);
-  
+
   @Override
   public String getRootTabletLocation() {
     String zRootLocPath = ZooUtil.getRoot(this) + Constants.ZROOT_TABLET_LOCATION;
-    
+
     OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Looking up root tablet location in zoocache.");
-    
+
     byte[] loc = zooCache.get(zRootLocPath);
-    
+
     opTimer.stop("Found root tablet at " + (loc == null ? null : new String(loc)) + " in %DURATION%");
-    
+
     if (loc == null) {
       return null;
     }
-    
+
     return new String(loc).split("\\|")[0];
   }
-  
+
   @Override
   public List<String> getMasterLocations() {
-    
+
     String masterLocPath = ZooUtil.getRoot(this) + Constants.ZMASTER_LOCK;
-    
+
     OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Looking up master location in zoocache.");
-    
+
     byte[] loc = ZooLock.getLockData(zooCache, masterLocPath, null);
-    
+
     opTimer.stop("Found master at " + (loc == null ? null : new String(loc)) + " in %DURATION%");
-    
+
     if (loc == null) {
       return Collections.emptyList();
     }
-    
+
     return Collections.singletonList(new String(loc));
   }
-  
+
   @Override
   public String getInstanceID() {
     if (instanceId == null)
       _getInstanceID();
     return instanceId;
   }
-  
+
   private static synchronized void _getInstanceID() {
     if (instanceId == null) {
       @SuppressWarnings("deprecation")
@@ -127,64 +127,67 @@ public class HdfsZooInstance implements Instance {
       instanceId = instanceIdFromFile;
     }
   }
-  
+
   @Override
   public String getInstanceName() {
     return ZooKeeperInstance.lookupInstanceName(zooCache, UUID.fromString(getInstanceID()));
   }
-  
+
   @Override
   public String getZooKeepers() {
     return ServerConfiguration.getSiteConfiguration().get(Property.INSTANCE_ZK_HOST);
   }
-  
+
   @Override
   public int getZooKeepersSessionTimeOut() {
     return (int) ServerConfiguration.getSiteConfiguration().getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT);
   }
-  
+
   @Override
   // Not really deprecated, just not for client use
   public Connector getConnector(String principal, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException {
     return getConnector(CredentialHelper.create(principal, token, getInstanceID()));
   }
-  
+
   @SuppressWarnings("deprecation")
   private Connector getConnector(TCredentials cred) throws AccumuloException, AccumuloSecurityException {
     return new ConnectorImpl(this, cred);
   }
-  
+
+  @Deprecated
   @Override
   // Not really deprecated, just not for client use
   public Connector getConnector(String user, byte[] pass) throws AccumuloException, AccumuloSecurityException {
     return getConnector(user, new PasswordToken(pass));
   }
-  
+
+  @Deprecated
   @Override
   // Not really deprecated, just not for client use
   public Connector getConnector(String user, ByteBuffer pass) throws AccumuloException, AccumuloSecurityException {
     return getConnector(user, ByteBufferUtil.toBytes(pass));
   }
-  
+
+  @Deprecated
   @Override
   public Connector getConnector(String user, CharSequence pass) throws AccumuloException, AccumuloSecurityException {
     return getConnector(user, TextUtil.getBytes(new Text(pass.toString())));
   }
-  
+
   private AccumuloConfiguration conf = null;
-  
+
   @Override
   public AccumuloConfiguration getConfiguration() {
     if (conf == null)
       conf = new ServerConfiguration(this).getConfiguration();
     return conf;
   }
-  
+
   @Override
   public void setConfiguration(AccumuloConfiguration conf) {
     this.conf = conf;
   }
-  
+
   public static void main(String[] args) {
     Instance instance = HdfsZooInstance.getInstance();
     System.out.println("Instance Name: " + instance.getInstanceName());
@@ -192,7 +195,7 @@ public class HdfsZooInstance implements Instance {
     System.out.println("ZooKeepers: " + instance.getZooKeepers());
     System.out.println("Masters: " + StringUtil.join(instance.getMasterLocations(), ", "));
   }
-  
+
   @Deprecated
   @Override
   public Connector getConnector(org.apache.accumulo.core.security.thrift.AuthInfo auth) throws AccumuloException, AccumuloSecurityException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f403df2/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java b/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
index e167516..2c5aa7d 100644
--- a/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
+++ b/server/src/main/java/org/apache/accumulo/server/security/SecurityOperation.java
@@ -48,21 +48,21 @@ import org.apache.log4j.Logger;
  */
 public class SecurityOperation {
   private static final Logger log = Logger.getLogger(SecurityOperationsImpl.class);
-  
+
   protected Authorizor authorizor;
   protected Authenticator authenticator;
   protected PermissionHandler permHandle;
   private static String rootUserName = null;
   private final ZooCache zooCache;
   private final String ZKUserPath;
-  
+
   protected static SecurityOperation instance;
-  
+
   public static synchronized SecurityOperation getInstance() {
     String instanceId = HdfsZooInstance.getInstance().getInstanceID();
     return getInstance(instanceId, false);
   }
-  
+
   public static synchronized SecurityOperation getInstance(String instanceId, boolean initialize) {
     if (instance == null) {
       instance = new SecurityOperation(getAuthorizor(instanceId, initialize), getAuthenticator(instanceId, initialize), getPermHandler(instanceId, initialize),
@@ -70,55 +70,56 @@ public class SecurityOperation {
     }
     return instance;
   }
-  
+
   protected static Authorizor getAuthorizor(String instanceId, boolean initialize) {
     Authorizor toRet = Master.createInstanceFromPropertyName(ServerConfiguration.getSiteConfiguration(), Property.INSTANCE_SECURITY_AUTHORIZOR,
         Authorizor.class, ZKAuthorizor.getInstance());
     toRet.initialize(instanceId, initialize);
     return toRet;
   }
-  
+
   protected static Authenticator getAuthenticator(String instanceId, boolean initialize) {
     Authenticator toRet = Master.createInstanceFromPropertyName(ServerConfiguration.getSiteConfiguration(), Property.INSTANCE_SECURITY_AUTHENTICATOR,
         Authenticator.class, ZKAuthenticator.getInstance());
     toRet.initialize(instanceId, initialize);
     return toRet;
   }
-  
+
   protected static PermissionHandler getPermHandler(String instanceId, boolean initialize) {
     PermissionHandler toRet = Master.createInstanceFromPropertyName(ServerConfiguration.getSiteConfiguration(), Property.INSTANCE_SECURITY_PERMISSION_HANDLER,
         PermissionHandler.class, ZKPermHandler.getInstance());
     toRet.initialize(instanceId, initialize);
     return toRet;
   }
-  
+
   /**
    * 
    * @deprecated not for client use
    */
+  @Deprecated
   public SecurityOperation(String instanceId) {
     ZKUserPath = Constants.ZROOT + "/" + instanceId + "/users";
     zooCache = new ZooCache();
   }
-  
+
   public SecurityOperation(Authorizor author, Authenticator authent, PermissionHandler pm, String instanceId) {
     this(instanceId);
     authorizor = author;
     authenticator = authent;
     permHandle = pm;
-    
+
     if (!authorizor.validSecurityHandlers(authenticator, pm) || !authenticator.validSecurityHandlers(authorizor, pm)
         || !permHandle.validSecurityHandlers(authent, author))
       throw new RuntimeException(authorizor + ", " + authenticator + ", and " + pm
           + " do not play nice with eachother. Please choose authentication and authorization mechanisms that are compatible with one another.");
   }
-  
+
   public void initializeSecurity(TCredentials credentials, String rootPrincipal, byte[] token) throws AccumuloSecurityException, ThriftSecurityException {
     authenticate(credentials);
-    
+
     if (!credentials.getPrincipal().equals(SecurityConstants.SYSTEM_PRINCIPAL))
       throw new AccumuloSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     authenticator.initializeSecurity(credentials, rootPrincipal, token);
     authorizor.initializeSecurity(credentials, rootPrincipal);
     permHandle.initializeSecurity(credentials, rootPrincipal);
@@ -129,23 +130,23 @@ public class SecurityOperation {
       throw new RuntimeException(e);
     }
   }
-  
+
   public synchronized String getRootUsername() {
     if (rootUserName == null)
       rootUserName = new String(zooCache.get(ZKUserPath));
     return rootUserName;
   }
-  
+
   private void authenticate(TCredentials credentials) throws ThriftSecurityException {
     if (!credentials.getInstanceId().equals(HdfsZooInstance.getInstance().getInstanceID()))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.INVALID_INSTANCEID);
-    
+
     if (SecurityConstants.getSystemCredentials().equals(credentials))
       return;
     else if (credentials.getPrincipal().equals(SecurityConstants.SYSTEM_PRINCIPAL)) {
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.BAD_CREDENTIALS);
     }
-    
+
     try {
       AuthenticationToken token = reassembleToken(credentials);
       if (!authenticator.authenticateUser(credentials.getPrincipal(), token)) {
@@ -156,14 +157,14 @@ public class SecurityOperation {
       throw e.asThriftException();
     }
   }
-  
+
   public boolean canAskAboutUser(TCredentials credentials, String user) throws ThriftSecurityException {
     // Authentication done in canPerformSystemActions
     if (!(canPerformSystemActions(credentials) || credentials.getPrincipal().equals(user)))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
     return true;
   }
-  
+
   public boolean authenticateUser(TCredentials credentials, TCredentials toAuth) throws ThriftSecurityException {
     canAskAboutUser(credentials, toAuth.getPrincipal());
     // User is already authenticated from canAskAboutUser, this gets around issues with !SYSTEM user
@@ -176,7 +177,7 @@ public class SecurityOperation {
       throw e.asThriftException();
     }
   }
-  
+
   /**
    * @param toAuth
    * @return
@@ -189,30 +190,30 @@ public class SecurityOperation {
     }
     throw new AccumuloSecurityException(toAuth.getPrincipal(), SecurityErrorCode.INVALID_TOKEN);
   }
-  
+
   public Authorizations getUserAuthorizations(TCredentials credentials, String user) throws ThriftSecurityException {
     authenticate(credentials);
-    
+
     targetUserExists(user);
-    
+
     if (!credentials.getPrincipal().equals(user) && !hasSystemPermission(credentials.getPrincipal(), SystemPermission.SYSTEM, false))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     // system user doesn't need record-level authorizations for the tables it reads (for now)
     if (user.equals(SecurityConstants.SYSTEM_PRINCIPAL))
       return Constants.NO_AUTHS;
-    
+
     try {
       return authorizor.getCachedUserAuthorizations(user);
     } catch (AccumuloSecurityException e) {
       throw e.asThriftException();
     }
   }
-  
+
   public Authorizations getUserAuthorizations(TCredentials credentials) throws ThriftSecurityException {
     return getUserAuthorizations(credentials, credentials.getPrincipal());
   }
-  
+
   /**
    * Checks if a user has a system permission
    * 
@@ -221,9 +222,9 @@ public class SecurityOperation {
   private boolean hasSystemPermission(String user, SystemPermission permission, boolean useCached) throws ThriftSecurityException {
     if (user.equals(getRootUsername()) || user.equals(SecurityConstants.SYSTEM_PRINCIPAL))
       return true;
-    
+
     targetUserExists(user);
-    
+
     try {
       if (useCached)
         return permHandle.hasCachedSystemPermission(user, permission);
@@ -232,7 +233,7 @@ public class SecurityOperation {
       throw e.asThriftException();
     }
   }
-  
+
   /**
    * Checks if a user has a table permission
    * 
@@ -241,12 +242,12 @@ public class SecurityOperation {
   private boolean hasTablePermission(String user, String table, TablePermission permission, boolean useCached) throws ThriftSecurityException {
     if (user.equals(SecurityConstants.SYSTEM_PRINCIPAL))
       return true;
-    
+
     targetUserExists(user);
-    
+
     if (table.equals(Constants.METADATA_TABLE_ID) && permission.equals(TablePermission.READ))
       return true;
-    
+
     try {
       if (useCached)
         return permHandle.hasCachedTablePermission(user, table, permission);
@@ -257,7 +258,7 @@ public class SecurityOperation {
       throw new ThriftSecurityException(user, SecurityErrorCode.TABLE_DOESNT_EXIST);
     }
   }
-  
+
   // some people just aren't allowed to ask about other users; here are those who can ask
   private boolean canAskAboutOtherUsers(TCredentials credentials, String user) throws ThriftSecurityException {
     authenticate(credentials);
@@ -266,11 +267,11 @@ public class SecurityOperation {
         || hasSystemPermission(credentials.getPrincipal(), SystemPermission.ALTER_USER, false)
         || hasSystemPermission(credentials.getPrincipal(), SystemPermission.DROP_USER, false);
   }
-  
+
   private void targetUserExists(String user) throws ThriftSecurityException {
     if (user.equals(SecurityConstants.SYSTEM_PRINCIPAL) || user.equals(getRootUsername()))
       return;
-    
+
     try {
       if (!authenticator.userExists(user))
         throw new ThriftSecurityException(user, SecurityErrorCode.USER_DOESNT_EXIST);
@@ -278,24 +279,24 @@ public class SecurityOperation {
       throw e.asThriftException();
     }
   }
-  
+
   public boolean canScan(TCredentials credentials, String table) throws ThriftSecurityException {
     authenticate(credentials);
     return hasTablePermission(credentials.getPrincipal(), table, TablePermission.READ, true);
   }
-  
+
   public boolean canWrite(TCredentials credentials, String table) throws ThriftSecurityException {
     authenticate(credentials);
     return hasTablePermission(credentials.getPrincipal(), table, TablePermission.WRITE, true);
   }
-  
+
   public boolean canSplitTablet(TCredentials credentials, String table) throws ThriftSecurityException {
     authenticate(credentials);
     return hasSystemPermission(credentials.getPrincipal(), SystemPermission.ALTER_TABLE, false)
         || hasSystemPermission(credentials.getPrincipal(), SystemPermission.SYSTEM, false)
         || hasTablePermission(credentials.getPrincipal(), table, TablePermission.ALTER_TABLE, false);
   }
-  
+
   /**
    * 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.
    */
@@ -303,161 +304,161 @@ public class SecurityOperation {
     authenticate(credentials);
     return hasSystemPermission(credentials.getPrincipal(), SystemPermission.SYSTEM, false);
   }
-  
+
   public boolean canFlush(TCredentials c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasTablePermission(c.getPrincipal(), tableId, TablePermission.WRITE, false)
         || hasTablePermission(c.getPrincipal(), tableId, TablePermission.ALTER_TABLE, false);
   }
-  
+
   public boolean canAlterTable(TCredentials c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasTablePermission(c.getPrincipal(), tableId, TablePermission.ALTER_TABLE, false)
         || hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_TABLE, false);
   }
-  
+
   public boolean canCreateTable(TCredentials c) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.CREATE_TABLE, false);
   }
-  
+
   public boolean canRenameTable(TCredentials c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_TABLE, false)
         || hasTablePermission(c.getPrincipal(), tableId, TablePermission.ALTER_TABLE, false);
   }
-  
+
   public boolean canCloneTable(TCredentials c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.CREATE_TABLE, false)
         && hasTablePermission(c.getPrincipal(), tableId, TablePermission.READ, false);
   }
-  
+
   public boolean canDeleteTable(TCredentials c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.DROP_TABLE, false)
         || hasTablePermission(c.getPrincipal(), tableId, TablePermission.DROP_TABLE, false);
   }
-  
+
   public boolean canOnlineOfflineTable(TCredentials 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);
   }
-  
+
   public boolean canMerge(TCredentials 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);
   }
-  
+
   public boolean canDeleteRange(TCredentials c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.SYSTEM, false) || hasTablePermission(c.getPrincipal(), tableId, TablePermission.WRITE, false);
   }
-  
+
   public boolean canBulkImport(TCredentials c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasTablePermission(c.getPrincipal(), tableId, TablePermission.BULK_IMPORT, false);
   }
-  
+
   public boolean canCompact(TCredentials c, String tableId) throws ThriftSecurityException {
     authenticate(c);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_TABLE, false)
         || hasTablePermission(c.getPrincipal(), tableId, TablePermission.ALTER_TABLE, false)
         || hasTablePermission(c.getPrincipal(), tableId, TablePermission.WRITE, false);
   }
-  
+
   public boolean canChangeAuthorizations(TCredentials c, String user) throws ThriftSecurityException {
     authenticate(c);
     if (user.equals(SecurityConstants.SYSTEM_PRINCIPAL))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
     return hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_USER, false);
   }
-  
+
   public boolean canChangePassword(TCredentials c, String user) throws ThriftSecurityException {
     authenticate(c);
     if (user.equals(SecurityConstants.SYSTEM_PRINCIPAL))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
     return c.getPrincipal().equals(user) || hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_USER, false);
   }
-  
+
   public boolean canCreateUser(TCredentials c, String user) throws ThriftSecurityException {
     authenticate(c);
-    
+
     // don't allow creating a user with the same name as system user
     if (user.equals(SecurityConstants.SYSTEM_PRINCIPAL))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     return hasSystemPermission(c.getPrincipal(), SystemPermission.CREATE_USER, false);
   }
-  
+
   public boolean canDropUser(TCredentials c, String user) throws ThriftSecurityException {
     authenticate(c);
-    
+
     // can't delete root or system users
     if (user.equals(getRootUsername()) || user.equals(SecurityConstants.SYSTEM_PRINCIPAL))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     return hasSystemPermission(c.getPrincipal(), SystemPermission.DROP_USER, false);
   }
-  
+
   public boolean canGrantSystem(TCredentials c, String user, SystemPermission sysPerm) throws ThriftSecurityException {
     authenticate(c);
-    
+
     // can't modify system user
     if (user.equals(SecurityConstants.SYSTEM_PRINCIPAL))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     // can't grant GRANT
     if (sysPerm.equals(SystemPermission.GRANT))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.GRANT_INVALID);
-    
+
     return hasSystemPermission(c.getPrincipal(), SystemPermission.GRANT, false);
   }
-  
+
   public boolean canGrantTable(TCredentials c, String user, String table) throws ThriftSecurityException {
     authenticate(c);
-    
+
     // can't modify system user
     if (user.equals(SecurityConstants.SYSTEM_PRINCIPAL))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     return hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_TABLE, false)
         || hasTablePermission(c.getPrincipal(), table, TablePermission.GRANT, false);
   }
-  
+
   public boolean canRevokeSystem(TCredentials c, String user, SystemPermission sysPerm) throws ThriftSecurityException {
     authenticate(c);
-    
+
     // can't modify system or root user
     if (user.equals(getRootUsername()) || user.equals(SecurityConstants.SYSTEM_PRINCIPAL))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     // can't revoke GRANT
     if (sysPerm.equals(SystemPermission.GRANT))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.GRANT_INVALID);
-    
+
     return hasSystemPermission(c.getPrincipal(), SystemPermission.GRANT, false);
   }
-  
+
   public boolean canRevokeTable(TCredentials c, String user, String table) throws ThriftSecurityException {
     authenticate(c);
-    
+
     // can't modify system user
     if (user.equals(SecurityConstants.SYSTEM_PRINCIPAL))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     return hasSystemPermission(c.getPrincipal(), SystemPermission.ALTER_TABLE, false)
         || hasTablePermission(c.getPrincipal(), table, TablePermission.GRANT, false);
   }
-  
+
   public void changeAuthorizations(TCredentials credentials, String user, Authorizations authorizations) throws ThriftSecurityException {
     if (!canChangeAuthorizations(credentials, user))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     targetUserExists(user);
-    
+
     try {
       authorizor.changeAuthorizations(user, authorizations);
       log.info("Changed authorizations for user " + user + " at the request of user " + credentials.getPrincipal());
@@ -465,7 +466,7 @@ public class SecurityOperation {
       throw ase.asThriftException();
     }
   }
-  
+
   public void changePassword(TCredentials credentials, TCredentials toChange) throws ThriftSecurityException {
     if (!canChangePassword(credentials, toChange.getPrincipal()))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -477,7 +478,7 @@ public class SecurityOperation {
       throw e.asThriftException();
     }
   }
-  
+
   public void createUser(TCredentials credentials, TCredentials newUser, Authorizations authorizations) throws ThriftSecurityException {
     if (!canCreateUser(credentials, newUser.getPrincipal()))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -493,7 +494,7 @@ public class SecurityOperation {
       throw ase.asThriftException();
     }
   }
-  
+
   public void dropUser(TCredentials credentials, String user) throws ThriftSecurityException {
     if (!canDropUser(credentials, user))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -506,13 +507,13 @@ public class SecurityOperation {
       throw e.asThriftException();
     }
   }
-  
+
   public void grantSystemPermission(TCredentials credentials, String user, SystemPermission permissionById) throws ThriftSecurityException {
     if (!canGrantSystem(credentials, user, permissionById))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     targetUserExists(user);
-    
+
     try {
       permHandle.grantSystemPermission(user, permissionById);
       log.info("Granted system permission " + permissionById + " for user " + user + " at the request of user " + credentials.getPrincipal());
@@ -520,13 +521,13 @@ public class SecurityOperation {
       throw e.asThriftException();
     }
   }
-  
+
   public void grantTablePermission(TCredentials c, String user, String tableId, TablePermission permission) throws ThriftSecurityException {
     if (!canGrantTable(c, user, tableId))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     targetUserExists(user);
-    
+
     try {
       permHandle.grantTablePermission(user, tableId, permission);
       log.info("Granted table permission " + permission + " for user " + user + " on the table " + tableId + " at the request of user " + c.getPrincipal());
@@ -536,51 +537,51 @@ public class SecurityOperation {
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.TABLE_DOESNT_EXIST);
     }
   }
-  
+
   public void revokeSystemPermission(TCredentials credentials, String user, SystemPermission permission) throws ThriftSecurityException {
     if (!canRevokeSystem(credentials, user, permission))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     targetUserExists(user);
-    
+
     try {
       permHandle.revokeSystemPermission(user, permission);
       log.info("Revoked system permission " + permission + " for user " + user + " at the request of user " + credentials.getPrincipal());
-      
+
     } catch (AccumuloSecurityException e) {
       throw e.asThriftException();
     }
   }
-  
+
   public void revokeTablePermission(TCredentials c, String user, String tableId, TablePermission permission) throws ThriftSecurityException {
     if (!canRevokeTable(c, user, tableId))
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
-    
+
     targetUserExists(user);
-    
+
     try {
       permHandle.revokeTablePermission(user, tableId, permission);
       log.info("Revoked table permission " + permission + " for user " + user + " on the table " + tableId + " at the request of user " + c.getPrincipal());
-      
+
     } catch (AccumuloSecurityException e) {
       throw e.asThriftException();
     } catch (TableNotFoundException e) {
       throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.TABLE_DOESNT_EXIST);
     }
   }
-  
+
   public boolean hasSystemPermission(TCredentials credentials, String user, SystemPermission permissionById) throws ThriftSecurityException {
     if (!canAskAboutOtherUsers(credentials, user))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
     return hasSystemPermission(user, permissionById, false);
   }
-  
+
   public boolean hasTablePermission(TCredentials credentials, String user, String tableId, TablePermission permissionById) throws ThriftSecurityException {
     if (!canAskAboutOtherUsers(credentials, user))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
     return hasTablePermission(user, tableId, permissionById, false);
   }
-  
+
   public Set<String> listUsers(TCredentials credentials) throws ThriftSecurityException {
     authenticate(credentials);
     try {
@@ -589,7 +590,7 @@ public class SecurityOperation {
       throw e.asThriftException();
     }
   }
-  
+
   public void deleteTable(TCredentials credentials, String tableId) throws ThriftSecurityException {
     if (!canDeleteTable(credentials, tableId))
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
@@ -602,12 +603,12 @@ public class SecurityOperation {
       throw new ThriftSecurityException(credentials.getPrincipal(), SecurityErrorCode.TABLE_DOESNT_EXIST);
     }
   }
-  
+
   public boolean canExport(TCredentials credentials, String tableId) throws ThriftSecurityException {
     authenticate(credentials);
     return hasTablePermission(credentials.getPrincipal(), tableId, TablePermission.READ, false);
   }
-  
+
   public boolean canImport(TCredentials credentials) throws ThriftSecurityException {
     authenticate(credentials);
     return hasSystemPermission(credentials.getPrincipal(), SystemPermission.CREATE_TABLE, false);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f403df2/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java b/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
index 9ab9f28..2235242 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/log/DfsLogger.java
@@ -53,11 +53,11 @@ import org.apache.hadoop.fs.FSDataInputStream;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-//import org.apache.hadoop.fs.CreateFlag;
-//import org.apache.hadoop.fs.Syncable;
 import org.apache.hadoop.fs.permission.FsPermission;
 import org.apache.hadoop.util.Progressable;
 import org.apache.log4j.Logger;
+//import org.apache.hadoop.fs.CreateFlag;
+//import org.apache.hadoop.fs.Syncable;
 
 /**
  * Wrap a connection to a logger.
@@ -66,50 +66,50 @@ import org.apache.log4j.Logger;
 public class DfsLogger {
   // Package private so that LogSorter can find this
   static final String LOG_FILE_HEADER_V2 = "--- Log File Header (v2) ---";
-  
+
   private static Logger log = Logger.getLogger(DfsLogger.class);
-  
+
   public static class LogClosedException extends IOException {
     private static final long serialVersionUID = 1L;
-    
+
     public LogClosedException() {
       super("LogClosed");
     }
   }
-  
+
   public interface ServerResources {
     AccumuloConfiguration getConfiguration();
-    
+
     FileSystem getFileSystem();
-    
+
     Set<TServerInstance> getCurrentTServers();
   }
-  
+
   private final LinkedBlockingQueue<DfsLogger.LogWork> workQueue = new LinkedBlockingQueue<DfsLogger.LogWork>();
-  
+
   private final Object closeLock = new Object();
-  
+
   private static final DfsLogger.LogWork CLOSED_MARKER = new DfsLogger.LogWork(null, null);
-  
+
   private static final LogFileValue EMPTY = new LogFileValue();
-  
+
   private boolean closed = false;
-  
+
   private class LogSyncingTask implements Runnable {
-    
+
     @Override
     public void run() {
       ArrayList<DfsLogger.LogWork> work = new ArrayList<DfsLogger.LogWork>();
       while (true) {
         work.clear();
-        
+
         try {
           work.add(workQueue.take());
         } catch (InterruptedException ex) {
           continue;
         }
         workQueue.drainTo(work);
-        
+
         synchronized (closeLock) {
           if (!closed) {
             try {
@@ -126,14 +126,14 @@ public class DfsLogger {
             }
           }
         }
-        
+
         boolean sawClosedMarker = false;
         for (DfsLogger.LogWork logWork : work)
           if (logWork == CLOSED_MARKER)
             sawClosedMarker = true;
           else
             logWork.latch.countDown();
-        
+
         if (sawClosedMarker) {
           synchronized (closeLock) {
             closeLock.notifyAll();
@@ -143,32 +143,32 @@ public class DfsLogger {
       }
     }
   }
-  
+
   static class LogWork {
     List<TabletMutations> mutations;
     CountDownLatch latch;
     volatile Exception exception;
-    
+
     public LogWork(List<TabletMutations> mutations, CountDownLatch latch) {
       this.mutations = mutations;
       this.latch = latch;
     }
   }
-  
+
   public static class LoggerOperation {
     private final LogWork work;
-    
+
     public LoggerOperation(LogWork work) {
       this.work = work;
     }
-    
+
     public void await() throws IOException {
       try {
         work.latch.await();
       } catch (InterruptedException e) {
         throw new RuntimeException(e);
       }
-      
+
       if (work.exception != null) {
         if (work.exception instanceof IOException)
           throw (IOException) work.exception;
@@ -179,7 +179,7 @@ public class DfsLogger {
       }
     }
   }
-  
+
   /*
    * (non-Javadoc)
    * 
@@ -194,7 +194,7 @@ public class DfsLogger {
       return getFileName().equals(((DfsLogger) obj).getFileName());
     return false;
   }
-  
+
   /*
    * (non-Javadoc)
    * 
@@ -205,24 +205,24 @@ public class DfsLogger {
     // filename is unique
     return getFileName().hashCode();
   }
-  
+
   private final ServerResources conf;
   private FSDataOutputStream logFile;
   private DataOutputStream encryptingLogFile = null;
   private Method sync;
   private Path logPath;
   private String logger;
-  
+
   public DfsLogger(ServerResources conf) throws IOException {
     this.conf = conf;
   }
-  
+
   public DfsLogger(ServerResources conf, String logger, String filename) throws IOException {
     this.conf = conf;
     this.logger = logger;
     this.logPath = new Path(Constants.getWalDirectory(conf.getConfiguration()), filename);
   }
-  
+
   public static FSDataInputStream readHeader(FileSystem fs, Path path, Map<String,String> opts) throws IOException {
     FSDataInputStream file = fs.open(path);
     try {
@@ -246,19 +246,19 @@ public class DfsLogger {
       return file;
     }
   }
-  
+
   public synchronized void open(String address) throws IOException {
     String filename = UUID.randomUUID().toString();
     logger = StringUtil.join(Arrays.asList(address.split(":")), "+");
-    
+
     log.debug("DfsLogger.open() begin");
-    
+
     logPath = new Path(Constants.getWalDirectory(conf.getConfiguration()) + "/" + logger + "/" + filename);
     try {
       FileSystem fs = conf.getFileSystem();
       short replication = (short) conf.getConfiguration().getCount(Property.TSERV_WAL_REPLICATION);
       if (replication == 0)
-        replication = fs.getDefaultReplication();
+        replication = fs.getDefaultReplication(logPath);
       long blockSize = conf.getConfiguration().getMemoryInBytes(Property.TSERV_WAL_BLOCKSIZE);
       if (blockSize == 0)
         blockSize = (long) (conf.getConfiguration().getMemoryInBytes(Property.TSERV_WALOG_MAX_SIZE) * 1.1);
@@ -269,38 +269,36 @@ public class DfsLogger {
         logFile = create(fs, logPath, true, fs.getConf().getInt("io.file.buffer.size", 4096), replication, blockSize);
       else
         logFile = fs.create(logPath, true, fs.getConf().getInt("io.file.buffer.size", 4096), replication, blockSize);
-      
+
       try {
         // sync: send data to datanodes
         sync = logFile.getClass().getMethod("sync");
         try {
           // hsych: send data to datanodes and sync the data to disk
           sync = logFile.getClass().getMethod("hsync");
-        } catch (NoSuchMethodException ex) {
-        }
+        } catch (NoSuchMethodException ex) {}
       } catch (Exception e) {
         throw new RuntimeException(e);
       }
-      
-      
+
       // Initialize the crypto operations.
       @SuppressWarnings("deprecation")
       org.apache.accumulo.core.security.crypto.CryptoModule cryptoModule = org.apache.accumulo.core.security.crypto.CryptoModuleFactory.getCryptoModule(conf
           .getConfiguration().get(Property.CRYPTO_MODULE_CLASS));
-      
+
       // Initialize the log file with a header and the crypto params used to set up this log file.
       logFile.write(LOG_FILE_HEADER_V2.getBytes());
       Map<String,String> cryptoOpts = conf.getConfiguration().getAllPropertiesWithPrefix(Property.CRYPTO_PREFIX);
-      
+
       logFile.writeInt(cryptoOpts.size());
       for (String key : cryptoOpts.keySet()) {
         logFile.writeUTF(key);
         logFile.writeUTF(cryptoOpts.get(key));
       }
-      
+
       @SuppressWarnings("deprecation")
       OutputStream encipheringOutputStream = cryptoModule.getEncryptingOutputStream(logFile, cryptoOpts);
-      
+
       // If the module just kicks back our original stream, then just use it, don't wrap it in
       // another data OutputStream.
       if (encipheringOutputStream == logFile) {
@@ -308,7 +306,7 @@ public class DfsLogger {
       } else {
         encryptingLogFile = new DataOutputStream(encipheringOutputStream);
       }
-      
+
       LogFileKey key = new LogFileKey();
       key.event = OPEN;
       key.tserverSession = filename;
@@ -322,28 +320,28 @@ public class DfsLogger {
       logFile = null;
       throw ex;
     }
-    
+
     Thread t = new Daemon(new LogSyncingTask());
     t.setName("Accumulo WALog thread " + toString());
     t.start();
   }
-  
+
   private FSDataOutputStream create(FileSystem fs, Path logPath, boolean b, int buffersize, short replication, long blockSize) throws IOException {
     try {
-      // This... 
-      //    EnumSet<CreateFlag> set = EnumSet.of(CreateFlag.SYNC_BLOCK, CreateFlag.CREATE);
-      //    return fs.create(logPath, FsPermission.getDefault(), set, buffersize, replication, blockSize, null);
+      // This...
+      // EnumSet<CreateFlag> set = EnumSet.of(CreateFlag.SYNC_BLOCK, CreateFlag.CREATE);
+      // return fs.create(logPath, FsPermission.getDefault(), set, buffersize, replication, blockSize, null);
       // Becomes this:
       Class<?> createFlags = Class.forName("org.apache.hadoop.fs.CreateFlag");
       List<Enum<?>> flags = new ArrayList<Enum<?>>();
       if (createFlags.isEnum()) {
         for (Object constant : createFlags.getEnumConstants()) {
           if (constant.toString().equals("SYNC_BLOCK")) {
-            flags.add((Enum<?>)constant);
+            flags.add((Enum<?>) constant);
             log.debug("Found synch enum " + constant);
           }
           if (constant.toString().equals("CREATE")) {
-            flags.add((Enum<?>)constant);
+            flags.add((Enum<?>) constant);
             log.debug("Found CREATE enum " + constant);
           }
         }
@@ -351,11 +349,11 @@ public class DfsLogger {
       Object set = EnumSet.class.getMethod("of", java.lang.Enum.class, java.lang.Enum.class).invoke(null, flags.get(0), flags.get(1));
       log.debug("CreateFlag set: " + set);
       if (fs instanceof TraceFileSystem) {
-        fs = ((TraceFileSystem)fs).getImplementation();
+        fs = ((TraceFileSystem) fs).getImplementation();
       }
       Method create = fs.getClass().getMethod("create", Path.class, FsPermission.class, EnumSet.class, Integer.TYPE, Short.TYPE, Long.TYPE, Progressable.class);
       log.debug("creating " + logPath + " with SYNCH_BLOCK flag");
-      return (FSDataOutputStream)create.invoke(fs, logPath, FsPermission.getDefault(), set, buffersize, replication, blockSize, null);
+      return (FSDataOutputStream) create.invoke(fs, logPath, FsPermission.getDefault(), set, buffersize, replication, blockSize, null);
     } catch (ClassNotFoundException ex) {
       // Expected in hadoop 1.0
       return fs.create(logPath, b, buffersize, replication, blockSize);
@@ -374,17 +372,17 @@ public class DfsLogger {
   public String toString() {
     return getLogger() + "/" + getFileName();
   }
-  
+
   public String getLogger() {
     return logger;
   }
-  
+
   public String getFileName() {
     return logPath.getName();
   }
-  
+
   public void close() throws IOException {
-    
+
     synchronized (closeLock) {
       if (closed)
         return;
@@ -402,7 +400,7 @@ public class DfsLogger {
           log.info("Interrupted");
         }
     }
-    
+
     if (logFile != null)
       try {
         logFile.close();
@@ -411,7 +409,7 @@ public class DfsLogger {
         throw new LogClosedException();
       }
   }
-  
+
   public synchronized void defineTablet(int seq, int tid, KeyExtent tablet) throws IOException {
     // write this log to the METADATA table
     final LogFileKey key = new LogFileKey();
@@ -427,7 +425,7 @@ public class DfsLogger {
       throw ex;
     }
   }
-  
+
   /**
    * @param key
    * @param empty2
@@ -437,14 +435,14 @@ public class DfsLogger {
     key.write(encryptingLogFile);
     value.write(encryptingLogFile);
   }
-  
+
   public LoggerOperation log(int seq, int tid, Mutation mutation) throws IOException {
     return logManyTablets(Collections.singletonList(new TabletMutations(tid, seq, Collections.singletonList(mutation))));
   }
-  
+
   public LoggerOperation logManyTablets(List<TabletMutations> mutations) throws IOException {
     DfsLogger.LogWork work = new DfsLogger.LogWork(mutations, new CountDownLatch(1));
-    
+
     synchronized (DfsLogger.this) {
       try {
         for (TabletMutations tabletMutations : mutations) {
@@ -461,19 +459,19 @@ public class DfsLogger {
         work.exception = e;
       }
     }
-    
+
     synchronized (closeLock) {
       // use a different lock for close check so that adding to work queue does not need
       // to wait on walog I/O operations
-      
+
       if (closed)
         throw new LogClosedException();
       workQueue.add(work);
     }
-    
+
     return new LoggerOperation(work);
   }
-  
+
   public synchronized void minorCompactionFinished(int seq, int tid, String fqfn) throws IOException {
     LogFileKey key = new LogFileKey();
     key.event = COMPACTION_FINISH;
@@ -486,7 +484,7 @@ public class DfsLogger {
       throw ex;
     }
   }
-  
+
   public synchronized void minorCompactionStarted(int seq, int tid, String fqfn) throws IOException {
     LogFileKey key = new LogFileKey();
     key.event = COMPACTION_START;
@@ -500,5 +498,5 @@ public class DfsLogger {
       throw ex;
     }
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f403df2/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java b/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java
index 5a212cb..71cc562 100644
--- a/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java
+++ b/server/src/main/java/org/apache/accumulo/server/trace/TraceFileSystem.java
@@ -38,7 +38,7 @@ import org.apache.hadoop.util.Progressable;
 // If FileSystem was an interface, we could use a Proxy, but it's not, so we have to override everything manually
 
 public class TraceFileSystem extends FileSystem {
-  
+
   @Override
   public void setConf(Configuration conf) {
     Span span = Trace.start("setConf");
@@ -51,7 +51,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public Configuration getConf() {
     Span span = Trace.start("getConf");
@@ -61,7 +61,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException {
     Span span = Trace.start("getFileBlockLocations");
@@ -71,7 +71,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataInputStream open(Path f) throws IOException {
     Span span = Trace.start("open");
@@ -83,7 +83,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream create(Path f) throws IOException {
     Span span = Trace.start("create");
@@ -95,7 +95,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream create(Path f, boolean overwrite) throws IOException {
     Span span = Trace.start("create");
@@ -107,20 +107,20 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream create(Path f, Progressable progress) throws IOException {
     Span span = Trace.start("create");
     if (Trace.isTracing())
       span.data("path", f.toString());
     try {
-      
+
       return impl.create(f, progress);
     } finally {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream create(Path f, short replication) throws IOException {
     Span span = Trace.start("create");
@@ -132,7 +132,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream create(Path f, short replication, Progressable progress) throws IOException {
     Span span = Trace.start("create");
@@ -144,7 +144,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize) throws IOException {
     Span span = Trace.start("create");
@@ -156,7 +156,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, Progressable progress) throws IOException {
     Span span = Trace.start("create");
@@ -168,7 +168,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize) throws IOException {
     Span span = Trace.start("create");
@@ -180,7 +180,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream create(Path f, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException {
     Span span = Trace.start("create");
@@ -192,7 +192,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public boolean createNewFile(Path f) throws IOException {
     Span span = Trace.start("createNewFile");
@@ -204,7 +204,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream append(Path f) throws IOException {
     Span span = Trace.start("append");
@@ -216,7 +216,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream append(Path f, int bufferSize) throws IOException {
     Span span = Trace.start("append");
@@ -228,7 +228,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Deprecated
   @Override
   public short getReplication(Path src) throws IOException {
@@ -241,7 +241,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public boolean setReplication(Path src, short replication) throws IOException {
     Span span = Trace.start("setReplication");
@@ -253,7 +253,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public boolean exists(Path f) throws IOException {
     Span span = Trace.start("exists");
@@ -265,7 +265,8 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
+  @Deprecated
   @Override
   public boolean isDirectory(Path f) throws IOException {
     Span span = Trace.start("isDirectory");
@@ -277,7 +278,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public boolean isFile(Path f) throws IOException {
     Span span = Trace.start("isFile");
@@ -289,7 +290,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @SuppressWarnings("deprecation")
   @Override
   public long getLength(Path f) throws IOException {
@@ -302,7 +303,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public ContentSummary getContentSummary(Path f) throws IOException {
     Span span = Trace.start("getContentSummary");
@@ -314,7 +315,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FileStatus[] listStatus(Path f, PathFilter filter) throws IOException {
     Span span = Trace.start("listStatus");
@@ -326,7 +327,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FileStatus[] listStatus(Path[] files) throws IOException {
     Span span = Trace.start("listStatus");
@@ -336,7 +337,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FileStatus[] listStatus(Path[] files, PathFilter filter) throws IOException {
     Span span = Trace.start("listStatus");
@@ -346,7 +347,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FileStatus[] globStatus(Path pathPattern) throws IOException {
     Span span = Trace.start("globStatus");
@@ -358,7 +359,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FileStatus[] globStatus(Path pathPattern, PathFilter filter) throws IOException {
     Span span = Trace.start("globStatus");
@@ -370,7 +371,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public Path getHomeDirectory() {
     Span span = Trace.start("getHomeDirectory");
@@ -380,7 +381,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public boolean mkdirs(Path f) throws IOException {
     Span span = Trace.start("mkdirs");
@@ -392,7 +393,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void copyFromLocalFile(Path src, Path dst) throws IOException {
     Span span = Trace.start("copyFromLocalFile");
@@ -406,7 +407,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void moveFromLocalFile(Path[] srcs, Path dst) throws IOException {
     Span span = Trace.start("moveFromLocalFile");
@@ -419,7 +420,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void moveFromLocalFile(Path src, Path dst) throws IOException {
     Span span = Trace.start("moveFromLocalFile");
@@ -433,7 +434,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void copyFromLocalFile(boolean delSrc, Path src, Path dst) throws IOException {
     Span span = Trace.start("copyFromLocalFile");
@@ -447,7 +448,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void copyFromLocalFile(boolean delSrc, boolean overwrite, Path[] srcs, Path dst) throws IOException {
     Span span = Trace.start("copyFromLocalFile");
@@ -460,7 +461,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void copyFromLocalFile(boolean delSrc, boolean overwrite, Path src, Path dst) throws IOException {
     Span span = Trace.start("copyFromLocalFile");
@@ -474,7 +475,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void copyToLocalFile(Path src, Path dst) throws IOException {
     Span span = Trace.start("copyFromLocalFile");
@@ -488,7 +489,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void moveToLocalFile(Path src, Path dst) throws IOException {
     Span span = Trace.start("moveToLocalFile");
@@ -502,7 +503,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void copyToLocalFile(boolean delSrc, Path src, Path dst) throws IOException {
     Span span = Trace.start("copyToLocalFile");
@@ -516,7 +517,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public Path startLocalOutput(Path fsOutputFile, Path tmpLocalFile) throws IOException {
     Span span = Trace.start("startLocalOutput");
@@ -530,7 +531,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void completeLocalOutput(Path fsOutputFile, Path tmpLocalFile) throws IOException {
     Span span = Trace.start("completeLocalOutput");
@@ -544,7 +545,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void close() throws IOException {
     Span span = Trace.start("close");
@@ -554,7 +555,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public long getUsed() throws IOException {
     Span span = Trace.start("getUsed");
@@ -564,7 +565,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @SuppressWarnings("deprecation")
   @Override
   public long getBlockSize(Path f) throws IOException {
@@ -578,7 +579,8 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
+  @Deprecated
   @Override
   public long getDefaultBlockSize() {
     Span span = Trace.start("getDefaultBlockSize");
@@ -588,7 +590,8 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
+  @Deprecated
   @Override
   public short getDefaultReplication() {
     Span span = Trace.start("getDefaultReplication");
@@ -598,7 +601,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FileChecksum getFileChecksum(Path f) throws IOException {
     Span span = Trace.start("getFileChecksum");
@@ -611,7 +614,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void setVerifyChecksum(boolean verifyChecksum) {
     Span span = Trace.start("setVerifyChecksum");
@@ -621,7 +624,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void setPermission(Path p, FsPermission permission) throws IOException {
     Span span = Trace.start("setPermission");
@@ -634,7 +637,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void setOwner(Path p, String username, String groupname) throws IOException {
     Span span = Trace.start("setOwner");
@@ -643,14 +646,14 @@ public class TraceFileSystem extends FileSystem {
       span.data("user", username);
       span.data("group", groupname);
     }
-    
+
     try {
       impl.setOwner(p, username, groupname);
     } finally {
       span.stop();
     }
   }
-  
+
   @Override
   public void setTimes(Path p, long mtime, long atime) throws IOException {
     Span span = Trace.start("setTimes");
@@ -660,18 +663,18 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   final FileSystem impl;
-  
+
   TraceFileSystem(FileSystem impl) {
     ArgumentChecker.notNull(impl);
     this.impl = impl;
   }
-  
+
   public FileSystem getImplementation() {
     return impl;
   }
-  
+
   @Override
   public URI getUri() {
     Span span = Trace.start("getUri");
@@ -681,7 +684,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataInputStream open(Path f, int bufferSize) throws IOException {
     Span span = Trace.start("open");
@@ -691,7 +694,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress)
       throws IOException {
@@ -702,7 +705,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void initialize(URI name, Configuration conf) throws IOException {
     Span span = Trace.start("initialize");
@@ -712,7 +715,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException {
     Span span = Trace.start("append");
@@ -722,7 +725,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public boolean rename(Path src, Path dst) throws IOException {
     Span span = Trace.start("rename");
@@ -732,7 +735,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @SuppressWarnings("deprecation")
   @Override
   public boolean delete(Path f) throws IOException {
@@ -743,7 +746,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public boolean delete(Path f, boolean recursive) throws IOException {
     Span span = Trace.start("delete");
@@ -753,7 +756,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FileStatus[] listStatus(Path f) throws IOException {
     Span span = Trace.start("listStatus");
@@ -763,7 +766,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public void setWorkingDirectory(Path new_dir) {
     Span span = Trace.start("setWorkingDirectory");
@@ -773,7 +776,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public Path getWorkingDirectory() {
     Span span = Trace.start("getWorkingDirectory");
@@ -783,7 +786,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public boolean mkdirs(Path f, FsPermission permission) throws IOException {
     Span span = Trace.start("mkdirs");
@@ -793,7 +796,7 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   @Override
   public FileStatus getFileStatus(Path f) throws IOException {
     Span span = Trace.start("getFileStatus");
@@ -803,13 +806,13 @@ public class TraceFileSystem extends FileSystem {
       span.stop();
     }
   }
-  
+
   public static FileSystem wrap(FileSystem fileSystem) {
     return new TraceFileSystem(fileSystem);
   }
-  
+
   public static FileSystem getAndWrap(Configuration conf) throws IOException {
     return wrap(FileSystem.get(conf));
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7f403df2/test/src/test/java/org/apache/accumulo/test/randomwalk/FrameworkTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/randomwalk/FrameworkTest.java b/test/src/test/java/org/apache/accumulo/test/randomwalk/FrameworkTest.java
index 7829ac5..d43347e 100644
--- a/test/src/test/java/org/apache/accumulo/test/randomwalk/FrameworkTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/randomwalk/FrameworkTest.java
@@ -17,7 +17,6 @@
 package org.apache.accumulo.test.randomwalk;
 
 import java.io.File;
-import java.util.Properties;
 
 import javax.xml.XMLConstants;
 import javax.xml.parsers.DocumentBuilder;
@@ -31,12 +30,12 @@ import org.apache.accumulo.test.randomwalk.unit.CreateTable;
 import org.junit.Assert;
 
 public class FrameworkTest extends TestCase {
-  
+
   public void testXML() {
-    
+
     DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
     DocumentBuilder docbuilder;
-    
+
     SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
     Schema moduleSchema = null;
     try {
@@ -44,9 +43,9 @@ public class FrameworkTest extends TestCase {
     } catch (Exception e) {
       Assert.fail("Caught exception: " + e);
     }
-    
+
     dbf.setSchema(moduleSchema);
-    
+
     try {
       File f = new File(this.getClass().getResource("/randomwalk/Basic.xml").toURI());
       docbuilder = dbf.newDocumentBuilder();
@@ -55,14 +54,14 @@ public class FrameworkTest extends TestCase {
       Assert.fail("Caught exception: " + e);
     }
   }
-  
+
   public void testRWTest() {
-    
+
     Test t1 = new CreateTable();
     assertTrue(t1.toString().equals("org.apache.accumulo.test.randomwalk.unit.CreateTable"));
-    
+
     Test t2 = new CreateTable();
     assertTrue(t1.equals(t2));
   }
-  
+
 }


Mime
View raw message