incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1189806 [24/46] - in /incubator/accumulo: branches/1.3/contrib/ branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/ branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/admin/ branches/1.3/src/core/src/main/...
Date Thu, 27 Oct 2011 15:25:17 GMT
Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java Thu Oct 27 15:24:51 2011
@@ -241,7 +241,8 @@ public class Shell {
     CommandLine cl;
     try {
       cl = new BasicParser().parse(opts, args);
-      if (cl.getArgs().length > 0) throw new ParseException("Unrecognized arguments: " + cl.getArgList());
+      if (cl.getArgs().length > 0)
+        throw new ParseException("Unrecognized arguments: " + cl.getArgList());
       
       if (cl.hasOption(helpOpt.getOpt())) {
         configError = true;
@@ -253,8 +254,8 @@ public class Shell {
       authTimeout = Integer.parseInt(cl.getOptionValue(authTimeoutOpt.getLongOpt(), DEFAULT_AUTH_TIMEOUT)) * 60 * 1000;
       disableAuthTimeout = cl.hasOption(disableAuthTimeoutOpt.getLongOpt());
       
-      if (cl.hasOption(zooKeeperInstance.getOpt()) && cl.getOptionValues(zooKeeperInstance.getOpt()).length != 2) throw new MissingArgumentException(
-          zooKeeperInstance);
+      if (cl.hasOption(zooKeeperInstance.getOpt()) && cl.getOptionValues(zooKeeperInstance.getOpt()).length != 2)
+        throw new MissingArgumentException(zooKeeperInstance);
       
     } catch (Exception e) {
       configError = true;
@@ -265,7 +266,8 @@ public class Shell {
     
     // get the options that were parsed
     String sysUser = System.getProperty("user.name");
-    if (sysUser == null) sysUser = "root";
+    if (sysUser == null)
+      sysUser = "root";
     String user = cl.getOptionValue(usernameOption.getOpt(), sysUser);
     
     String passw = cl.getOptionValue(passwOption.getOpt(), null);
@@ -295,7 +297,8 @@ public class Shell {
       
       this.reader = new ConsoleReader();
       
-      if (passw == null) passw = reader.readLine("Enter current password for '" + user + "'@'" + instance.getInstanceName() + "': ", '*');
+      if (passw == null)
+        passw = reader.readLine("Enter current password for '" + user + "'@'" + instance.getInstanceName() + "': ", '*');
       if (passw == null) {
         reader.printNewline();
         configError = true;
@@ -316,7 +319,8 @@ public class Shell {
     if (cl.hasOption(execfileOption.getOpt())) {
       execFile = cl.getOptionValue(execfileOption.getOpt());
       verbose = false;
-    } else if (cl.hasOption(execfileVerboseOption.getOpt())) execFile = cl.getOptionValue(execfileVerboseOption.getOpt());
+    } else if (cl.hasOption(execfileVerboseOption.getOpt()))
+      execFile = cl.getOptionValue(execfileVerboseOption.getOpt());
     
     rootToken = new Token();
     commandFactory = new CommandFactory();
@@ -334,15 +338,18 @@ public class Shell {
   }
   
   public int start() throws IOException {
-    if (configError) return 1;
+    if (configError)
+      return 1;
     
     String input;
-    if (verbose) printInfo();
+    if (verbose)
+      printInfo();
     
     String configDir = System.getenv("HOME") + "/.accumulo";
     String historyPath = configDir + "/shell_history.txt";
     File accumuloDir = new File(configDir);
-    if (!accumuloDir.exists() && !accumuloDir.mkdirs()) log.warn("Unable to make directory for history at " + accumuloDir);
+    if (!accumuloDir.exists() && !accumuloDir.mkdirs())
+      log.warn("Unable to make directory for history at " + accumuloDir);
     try {
       History history = new History();
       history.setHistoryFile(new File(historyPath));
@@ -362,11 +369,13 @@ public class Shell {
     }
     
     while (true) {
-      if (exit) return exitCode;
+      if (exit)
+        return exitCode;
       
       // If tab completion is true we need to reset
       if (tabCompletion) {
-        if (userCompletor != null) reader.removeCompletor(userCompletor);
+        if (userCompletor != null)
+          reader.removeCompletor(userCompletor);
         
         userCompletor = setupCompletion();
         reader.addCompletor(userCompletor);
@@ -392,9 +401,12 @@ public class Shell {
   private void printVerboseInfo() throws IOException {
     StringBuilder sb = new StringBuilder("-\n");
     sb.append("- Current user: ").append(connector.whoami()).append("\n");
-    if (execFile != null) sb.append("- Executing commands from: ").append(execFile).append("\n");
-    if (disableAuthTimeout) sb.append("- Authorization timeout: disabled\n");
-    else sb.append("- Authorization timeout: ").append(String.format("%.2fs\n", authTimeout / 1000.0));
+    if (execFile != null)
+      sb.append("- Executing commands from: ").append(execFile).append("\n");
+    if (disableAuthTimeout)
+      sb.append("- Authorization timeout: disabled\n");
+    else
+      sb.append("- Authorization timeout: ").append(String.format("%.2fs\n", authTimeout / 1000.0));
     sb.append("- Debug: ").append(isDebuggingEnabled() ? "on" : "off").append("\n");
     if (formatterClass != null && formatterClass != DefaultFormatter.class) {
       sb.append("- Active formatter class: ").append(formatterClass.getSimpleName()).append("\n");
@@ -433,7 +445,8 @@ public class Shell {
       ++exitCode;
       return;
     }
-    if (fields.length == 0) return;
+    if (fields.length == 0)
+      return;
     
     String command = fields[0];
     fields = fields.length > 1 ? Arrays.copyOfRange(fields, 1, fields.length) : new String[] {};
@@ -461,7 +474,8 @@ public class Shell {
               printException(e);
             }
             
-            if (authFailed) reader.printString("Invalid password. ");
+            if (authFailed)
+              reader.printString("Invalid password. ");
           } while (authFailed);
           lastUserActivity = System.currentTimeMillis();
         }
@@ -496,7 +510,8 @@ public class Shell {
         printConstraintViolationException(e);
       } catch (TableNotFoundException e) {
         ++exitCode;
-        if (tableName.equals(e.getTableName())) tableName = "";
+        if (tableName.equals(e.getTableName()))
+          tableName = "";
         printException(e);
       } catch (ParseException e) {
         // not really an error if the exception is a missing required
@@ -505,7 +520,8 @@ public class Shell {
           ++exitCode;
           printException(e);
         }
-        if (sc != null) sc.printHelp();
+        if (sc != null)
+          sc.printHelp();
       } catch (Exception e) {
         ++exitCode;
         printException(e);
@@ -672,11 +688,13 @@ public class Shell {
           Command sci = (Command) t;
           attr = new Attributes();
           attr.location = sci.getClass().getName();
-          if (attr.location == null || attr.location.isEmpty()) continue;
+          if (attr.location == null || attr.location.isEmpty())
+            continue;
           attr.codetype = CodeType.JAVA;
           
           // Don't want to add duplicate entries
-          if (!commandTable.containsKey(sci.getName())) commandTable.put(sci.getName(), attr);
+          if (!commandTable.containsKey(sci.getName()))
+            commandTable.put(sci.getName(), attr);
         }
       }
     }
@@ -938,7 +956,8 @@ public class Shell {
         return 0;
       } // user canceled
       
-      if (!password.equals(passwordConfirm)) throw new IllegalArgumentException("Passwords do not match");
+      if (!password.equals(passwordConfirm))
+        throw new IllegalArgumentException("Passwords do not match");
       
       Authorizations authorizations = parseAuthorizations(cl.hasOption(scanOptAuths.getOpt()) ? cl.getOptionValue(scanOptAuths.getOpt()) : "");
       shellState.connector.securityOperations().createUser(user, password.getBytes(), authorizations);
@@ -978,7 +997,8 @@ public class Shell {
     @Override
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException {
       String user = cl.getArgs()[0];
-      if (shellState.connector.whoami().equals(user)) throw new BadArgumentException("You cannot delete yourself", fullCommand, fullCommand.indexOf(user));
+      if (shellState.connector.whoami().equals(user))
+        throw new BadArgumentException("You cannot delete yourself", fullCommand, fullCommand.indexOf(user));
       shellState.connector.securityOperations().dropUser(user);
       log.debug("Deleted user " + user);
       return 0;
@@ -1023,8 +1043,8 @@ public class Shell {
         return 0;
       } // user canceled
       
-      if (!shellState.connector.securityOperations().authenticateUser(currentUser, oldPassword.getBytes())) throw new AccumuloSecurityException(user,
-          SecurityErrorCode.BAD_CREDENTIALS);
+      if (!shellState.connector.securityOperations().authenticateUser(currentUser, oldPassword.getBytes()))
+        throw new AccumuloSecurityException(user, SecurityErrorCode.BAD_CREDENTIALS);
       
       password = shellState.reader.readLine("Enter new password for '" + user + "': ", '*');
       if (password == null) {
@@ -1037,13 +1057,15 @@ public class Shell {
         return 0;
       } // user canceled
       
-      if (!password.equals(passwordConfirm)) throw new IllegalArgumentException("Passwords do not match");
+      if (!password.equals(passwordConfirm))
+        throw new IllegalArgumentException("Passwords do not match");
       
       byte[] pass = password.getBytes();
       shellState.connector.securityOperations().changeUserPassword(user, pass);
       // update the current credentials if the password changed was for
       // the current user
-      if (shellState.connector.whoami().equals(user)) shellState.credentials = new AuthInfo(user, pass, shellState.connector.getInstance().getInstanceID());
+      if (shellState.connector.whoami().equals(user))
+        shellState.credentials = new AuthInfo(user, pass, shellState.connector.getInstance().getInstanceID());
       log.debug("Changed password for user " + user);
       return 0;
     }
@@ -1416,7 +1438,8 @@ public class Shell {
         ArrayList<String> output = new ArrayList<String>();
         for (String cmd : shellState.commandFactory.getCommandTable().keySet()) {
           Command c = shellState.commandFactory.getCommandByName(cmd);
-          if (!(c instanceof HiddenCommand)) output.add(String.format("%-" + i + "s  -  %s", c.getName(), c.description()));
+          if (!(c instanceof HiddenCommand))
+            output.add(String.format("%-" + i + "s  -  %s", c.getName(), c.description()));
         }
         shellState.printLines(output.iterator(), !cl.hasOption(disablePaginationOpt.getOpt()));
       }
@@ -1463,9 +1486,12 @@ public class Shell {
   public static class DebugCommand extends Command {
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws IOException {
       if (cl.getArgs().length == 1) {
-        if (cl.getArgs()[0].equalsIgnoreCase("on")) Shell.setDebugging(true);
-        else if (cl.getArgs()[0].equalsIgnoreCase("off")) Shell.setDebugging(false);
-        else throw new BadArgumentException("Argument must be 'on' or 'off'", fullCommand, fullCommand.indexOf(cl.getArgs()[0]));
+        if (cl.getArgs()[0].equalsIgnoreCase("on"))
+          Shell.setDebugging(true);
+        else if (cl.getArgs()[0].equalsIgnoreCase("off"))
+          Shell.setDebugging(false);
+        else
+          throw new BadArgumentException("Argument must be 'on' or 'off'", fullCommand, fullCommand.indexOf(cl.getArgs()[0]));
       } else if (cl.getArgs().length == 0) {
         shellState.reader.printString(Shell.isDebuggingEnabled() ? "on\n" : "off\n");
       } else {
@@ -1540,7 +1566,8 @@ public class Shell {
           } else {
             shellState.reader.printString("Not tracing\n");
           }
-        } else throw new BadArgumentException("Argument must be 'on' or 'off'", fullCommand, fullCommand.indexOf(cl.getArgs()[0]));
+        } else
+          throw new BadArgumentException("Argument must be 'on' or 'off'", fullCommand, fullCommand.indexOf(cl.getArgs()[0]));
       } else if (cl.getArgs().length == 0) {
         shellState.reader.printString(Trace.isTracing() ? "on\n" : "off\n");
       } else {
@@ -1565,18 +1592,24 @@ public class Shell {
     private Option nameOpt;
     
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
-      if (!cl.hasOption(tableOpt.getOpt())) shellState.checkTableState();
+      if (!cl.hasOption(tableOpt.getOpt()))
+        shellState.checkTableState();
       
       String tableName = cl.getOptionValue(tableOpt.getOpt(), shellState.tableName);
-      if (tableName != null && !shellState.connector.tableOperations().exists(tableName)) throw new TableNotFoundException(null, tableName, null);
+      if (tableName != null && !shellState.connector.tableOperations().exists(tableName))
+        throw new TableNotFoundException(null, tableName, null);
       
       String name = cl.getOptionValue(nameOpt.getOpt());
       
       ArrayList<IteratorScope> scopes = new ArrayList<IteratorScope>(3);
-      if (cl.hasOption(mincScopeOpt.getOpt())) scopes.add(IteratorScope.minc);
-      if (cl.hasOption(majcScopeOpt.getOpt())) scopes.add(IteratorScope.majc);
-      if (cl.hasOption(scanScopeOpt.getOpt())) scopes.add(IteratorScope.scan);
-      if (scopes.isEmpty()) throw new IllegalArgumentException("You must select at least one scope to delete");
+      if (cl.hasOption(mincScopeOpt.getOpt()))
+        scopes.add(IteratorScope.minc);
+      if (cl.hasOption(majcScopeOpt.getOpt()))
+        scopes.add(IteratorScope.majc);
+      if (cl.hasOption(scanScopeOpt.getOpt()))
+        scopes.add(IteratorScope.scan);
+      if (scopes.isEmpty())
+        throw new IllegalArgumentException("You must select at least one scope to delete");
       
       boolean noneDeleted = true;
       String tableId = shellState.connector.tableOperations().tableIdMap().get(tableName);
@@ -1593,7 +1626,8 @@ public class Shell {
           }
         }
       }
-      if (noneDeleted) log.warn("no iterators found that match your criteria");
+      if (noneDeleted)
+        log.warn("no iterators found that match your criteria");
       return 0;
     }
     
@@ -1649,20 +1683,26 @@ public class Shell {
     
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
         IOException {
-      if (!cl.hasOption(tableOpt.getOpt())) shellState.checkTableState();
+      if (!cl.hasOption(tableOpt.getOpt()))
+        shellState.checkTableState();
       
       String tableName = cl.getOptionValue(tableOpt.getOpt(), shellState.tableName);
-      if (tableName != null && !shellState.connector.tableOperations().exists(tableName)) throw new TableNotFoundException(null, tableName, null);
+      if (tableName != null && !shellState.connector.tableOperations().exists(tableName))
+        throw new TableNotFoundException(null, tableName, null);
       
       int priority = Integer.parseInt(cl.getOptionValue(priorityOpt.getOpt()));
       
       Map<String,String> options = new HashMap<String,String>();
       boolean filter = false;
       String classname = cl.getOptionValue(classnameTypeOpt.getOpt());
-      if (cl.hasOption(aggTypeOpt.getOpt())) classname = AggregatingIterator.class.getName();
-      else if (cl.hasOption(regexTypeOpt.getOpt())) classname = RegExIterator.class.getName();
-      else if (cl.hasOption(versionTypeOpt.getOpt())) classname = VersioningIterator.class.getName();
-      else if (cl.hasOption(nolabelTypeOpt.getOpt())) classname = NoLabelIterator.class.getName();
+      if (cl.hasOption(aggTypeOpt.getOpt()))
+        classname = AggregatingIterator.class.getName();
+      else if (cl.hasOption(regexTypeOpt.getOpt()))
+        classname = RegExIterator.class.getName();
+      else if (cl.hasOption(versionTypeOpt.getOpt()))
+        classname = VersioningIterator.class.getName();
+      else if (cl.hasOption(nolabelTypeOpt.getOpt()))
+        classname = NoLabelIterator.class.getName();
       else if (cl.hasOption(filterTypeOpt.getOpt()) || classname.equals(FilteringIterator.class.getName())) {
         filter = true;
         classname = FilteringIterator.class.getName();
@@ -1698,10 +1738,14 @@ public class Shell {
     protected void setTableProperties(CommandLine cl, Shell shellState, String tableName, int priority, Map<String,String> options, String classname,
         String name) throws AccumuloException, AccumuloSecurityException {
       ArrayList<IteratorScope> scopes = new ArrayList<IteratorScope>(3);
-      if (cl.hasOption(mincScopeOpt.getOpt())) scopes.add(IteratorScope.minc);
-      if (cl.hasOption(majcScopeOpt.getOpt())) scopes.add(IteratorScope.majc);
-      if (cl.hasOption(scanScopeOpt.getOpt())) scopes.add(IteratorScope.scan);
-      if (scopes.isEmpty()) throw new IllegalArgumentException("You must select at least one scope to configure");
+      if (cl.hasOption(mincScopeOpt.getOpt()))
+        scopes.add(IteratorScope.minc);
+      if (cl.hasOption(majcScopeOpt.getOpt()))
+        scopes.add(IteratorScope.majc);
+      if (cl.hasOption(scanScopeOpt.getOpt()))
+        scopes.add(IteratorScope.scan);
+      if (scopes.isEmpty())
+        throw new IllegalArgumentException("You must select at least one scope to configure");
       
       for (IteratorScope scope : scopes) {
         String stem = String.format("%s%s.%s", Property.TABLE_ITERATOR_PREFIX, scope.name(), name);
@@ -1731,7 +1775,8 @@ public class Shell {
       }
       
       IteratorOptions itopts = skvi.describeOptions();
-      if (itopts.name == null) throw new IllegalArgumentException(className + " described its default distinguishing name as null");
+      if (itopts.name == null)
+        throw new IllegalArgumentException(className + " described its default distinguishing name as null");
       
       Map<String,String> localOptions = new HashMap<String,String>();
       do {
@@ -1754,7 +1799,8 @@ public class Shell {
               throw new IOException("Input stream closed");
             }
             
-            if (input.length() > 0) localOptions.put(e.getKey(), input);
+            if (input.length() > 0)
+              localOptions.put(e.getKey(), input);
           }
         }
         
@@ -1771,7 +1817,8 @@ public class Shell {
                 throw new IOException("Input stream closed");
               }
               
-              if (input.length() == 0) break;
+              if (input.length() == 0)
+                break;
               
               String[] sa = input.split(" ", 2);
               localOptions.put(sa[0], sa[1]);
@@ -1780,7 +1827,8 @@ public class Shell {
         }
         
         options.putAll(localOptions);
-        if (!skvi.validateOptions(options)) reader.printString("invalid options for " + clazz.getName() + "\n");
+        if (!skvi.validateOptions(options))
+          reader.printString("invalid options for " + clazz.getName() + "\n");
         
       } while (!skvi.validateOptions(options));
       return itopts.name;
@@ -1880,7 +1928,8 @@ public class Shell {
         if (!IteratorScope.majc.name().equals(o.getOpt()) && !IteratorScope.minc.name().equals(o.getOpt()) && !IteratorScope.scan.name().equals(o.getOpt())) {
           modifiedOptions.addOption(o);
           OptionGroup group = parentOptions.getOptionGroup(o);
-          if (group != null) groups.add(group);
+          if (group != null)
+            groups.add(group);
         }
       }
       for (OptionGroup group : groups) {
@@ -1898,22 +1947,28 @@ public class Shell {
     
     @Override
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
-      if (!cl.hasOption(tableOpt.getOpt())) shellState.checkTableState();
+      if (!cl.hasOption(tableOpt.getOpt()))
+        shellState.checkTableState();
       
       String tableName = cl.getOptionValue(tableOpt.getOpt(), shellState.tableName);
-      if (tableName != null && !shellState.connector.tableOperations().exists(tableName)) throw new TableNotFoundException(null, tableName, null);
+      if (tableName != null && !shellState.connector.tableOperations().exists(tableName))
+        throw new TableNotFoundException(null, tableName, null);
       
       if (cl.hasOption(allOpt.getOpt())) {
         Map<String,Map<String,String>> tableIterators = shellState.scanIteratorOptions.remove(tableName);
-        if (tableIterators == null) log.info("No scan iterators set on table " + tableName);
-        else log.info("Removed the following scan iterators from table " + tableName + ":" + tableIterators.keySet());
+        if (tableIterators == null)
+          log.info("No scan iterators set on table " + tableName);
+        else
+          log.info("Removed the following scan iterators from table " + tableName + ":" + tableIterators.keySet());
       } else if (cl.hasOption(nameOpt.getOpt())) {
         String name = cl.getOptionValue(nameOpt.getOpt());
         Map<String,Map<String,String>> tableIterators = shellState.scanIteratorOptions.get(tableName);
         if (tableIterators != null) {
           Map<String,String> options = tableIterators.remove(name);
-          if (options == null) log.info("No iterator named " + name + " found for table " + tableName);
-          else log.info("Removed scan iterator " + name + " from table " + tableName);
+          if (options == null)
+            log.info("No iterator named " + name + " found for table " + tableName);
+          else
+            log.info("Removed scan iterator " + name + " from table " + tableName);
         } else {
           log.info("No iterator named " + name + " found for table " + tableName);
         }
@@ -1970,43 +2025,48 @@ public class Shell {
       reader = shellState.reader;
       
       String tableName = cl.getOptionValue(tableOpt.getOpt());
-      if (tableName != null && !shellState.connector.tableOperations().exists(tableName)) throw new TableNotFoundException(null, tableName, null);
+      if (tableName != null && !shellState.connector.tableOperations().exists(tableName))
+        throw new TableNotFoundException(null, tableName, null);
       
       if (cl.hasOption(deleteOpt.getOpt())) {
         // delete property from table
         String property = cl.getOptionValue(deleteOpt.getOpt());
-        if (property.contains("=")) throw new BadArgumentException("Invalid '=' operator in delete operation.", fullCommand, fullCommand.indexOf('='));
+        if (property.contains("="))
+          throw new BadArgumentException("Invalid '=' operator in delete operation.", fullCommand, fullCommand.indexOf('='));
         if (tableName != null) {
-          if (!Property.isValidTablePropertyKey(property)) log.warn("Invalid per-table property : " + property
-              + ", still removing from zookeeper if its there.");
+          if (!Property.isValidTablePropertyKey(property))
+            log.warn("Invalid per-table property : " + property + ", still removing from zookeeper if its there.");
           shellState.connector.tableOperations().removeProperty(tableName, property);
           log.debug("Successfully deleted table configuration option.");
         } else {
-          if (!Property.isValidZooPropertyKey(property)) log.warn("Invalid per-table property : " + property + ", still removing from zookeeper if its there.");
+          if (!Property.isValidZooPropertyKey(property))
+            log.warn("Invalid per-table property : " + property + ", still removing from zookeeper if its there.");
           shellState.connector.instanceOperations().removeProperty(property);
           log.debug("Successfully deleted system configuration option");
         }
       } else if (cl.hasOption(setOpt.getOpt())) {
         // set property on table
         String property = cl.getOptionValue(setOpt.getOpt()), value = null;
-        if (!property.contains("=")) throw new BadArgumentException("Missing '=' operator in set operation.", fullCommand, fullCommand.indexOf(property));
+        if (!property.contains("="))
+          throw new BadArgumentException("Missing '=' operator in set operation.", fullCommand, fullCommand.indexOf(property));
         
         String pair[] = property.split("=", 2);
         property = pair[0];
         value = pair[1];
         
         if (tableName != null) {
-          if (!Property.isValidTablePropertyKey(property)) throw new BadArgumentException("Invalid per-table property.", fullCommand,
-              fullCommand.indexOf(property));
+          if (!Property.isValidTablePropertyKey(property))
+            throw new BadArgumentException("Invalid per-table property.", fullCommand, fullCommand.indexOf(property));
           
-          if (property.equals(Property.TABLE_DEFAULT_SCANTIME_VISIBILITY.getKey())) new ColumnVisibility(value); // validate that it is a valid
+          if (property.equals(Property.TABLE_DEFAULT_SCANTIME_VISIBILITY.getKey()))
+            new ColumnVisibility(value); // validate that it is a valid
           // expression
           
           shellState.connector.tableOperations().setProperty(tableName, property, value);
           log.debug("Successfully set table configuration option.");
         } else {
-          if (!Property.isValidZooPropertyKey(property)) throw new BadArgumentException("Property cannot be modified in zookeepr", fullCommand,
-              fullCommand.indexOf(property));
+          if (!Property.isValidZooPropertyKey(property))
+            throw new BadArgumentException("Property cannot be modified in zookeepr", fullCommand, fullCommand.indexOf(property));
           
           shellState.connector.instanceOperations().setProperty(property, value);
           log.debug("Successfully set system configuration option");
@@ -2026,14 +2086,17 @@ public class Shell {
           defaults.put(defaultEntry.getKey(), defaultEntry.getValue());
         
         Iterable<Entry<String,String>> acuconf = AccumuloConfiguration.getSystemConfiguration();
-        if (tableName != null) acuconf = shellState.connector.tableOperations().getProperties(tableName);
+        if (tableName != null)
+          acuconf = shellState.connector.tableOperations().getProperties(tableName);
         
         for (Entry<String,String> propEntry : acuconf) {
           String key = propEntry.getKey();
           // only show properties with similar names to that
           // specified, or all of them if none specified
-          if (cl.hasOption(filterOpt.getOpt()) && !key.contains(cl.getOptionValue(filterOpt.getOpt()))) continue;
-          if (tableName != null && !Property.isValidTablePropertyKey(key)) continue;
+          if (cl.hasOption(filterOpt.getOpt()) && !key.contains(cl.getOptionValue(filterOpt.getOpt())))
+            continue;
+          if (tableName != null && !Property.isValidTablePropertyKey(key))
+            continue;
           COL2 = Math.max(COL2, propEntry.getKey().length() + 3);
         }
         
@@ -2045,9 +2108,11 @@ public class Shell {
           
           // only show properties with similar names to that
           // specified, or all of them if none specified
-          if (cl.hasOption(filterOpt.getOpt()) && !key.contains(cl.getOptionValue(filterOpt.getOpt()))) continue;
+          if (cl.hasOption(filterOpt.getOpt()) && !key.contains(cl.getOptionValue(filterOpt.getOpt())))
+            continue;
           
-          if (tableName != null && !Property.isValidTablePropertyKey(key)) continue;
+          if (tableName != null && !Property.isValidTablePropertyKey(key))
+            continue;
           
           String siteVal = siteConfig.get(key);
           String sysVal = systemConfig.get(key);
@@ -2074,7 +2139,8 @@ public class Shell {
           }
           
           // show per-table value only if it is different (overridden)
-          if (tableName != null && !curVal.equals(sysVal)) printConfLine(output, "table", printed ? "   @override" : key, curVal);
+          if (tableName != null && !curVal.equals(sysVal))
+            printConfLine(output, "table", printed ? "   @override" : key, curVal);
         }
         printConfFooter(output);
         shellState.printLines(output.iterator(), !cl.hasOption(disablePaginationOpt.getOpt()));
@@ -2089,7 +2155,8 @@ public class Shell {
     }
     
     private void printConfLine(ArrayList<String> output, String s1, String s2, String s3) {
-      if (s2.length() < COL2) s2 += " " + repeat(".", COL2 - s2.length() - 1);
+      if (s2.length() < COL2)
+        s2 += " " + repeat(".", COL2 - s2.length() - 1);
       output.add(String.format("%-" + COL1 + "s | %-" + COL2 + "s | %s", s1, s2,
           s3.replace("\n", "\n" + repeat(" ", COL1 + 1) + "|" + repeat(" ", COL2 + 2) + "|" + " ")));
     }
@@ -2229,7 +2296,8 @@ public class Shell {
     
     protected void setScanIterators(Shell shellState, Scanner scanner) throws IOException {
       Map<String,Map<String,String>> tableIterators = shellState.scanIteratorOptions.get(shellState.tableName);
-      if (tableIterators == null) return;
+      if (tableIterators == null)
+        return;
       
       for (Entry<String,Map<String,String>> entry : tableIterators.entrySet()) {
         Map<String,String> options = new HashMap<String,String>(entry.getValue());
@@ -2254,8 +2322,10 @@ public class Shell {
       if (cl.hasOption(scanOptColumns.getOpt())) {
         for (String a : cl.getOptionValue(scanOptColumns.getOpt()).split(",")) {
           String sa[] = a.split(":", 2);
-          if (sa.length == 1) scanner.fetchColumnFamily(new Text(a));
-          else scanner.fetchColumn(new Text(sa[0]), new Text(sa[1]));
+          if (sa.length == 1)
+            scanner.fetchColumnFamily(new Text(a));
+          else
+            scanner.fetchColumn(new Text(sa[0]), new Text(sa[1]));
         }
       }
     }
@@ -2359,7 +2429,8 @@ public class Shell {
     private Option numThreadsOpt;
     
     protected void setUpIterator(int prio, String name, String term, BatchScanner scanner) throws IOException {
-      if (prio < 0) throw new IllegalArgumentException("Priority < 0 " + prio);
+      if (prio < 0)
+        throw new IllegalArgumentException("Priority < 0 " + prio);
       
       scanner.setScanIterators(prio, GrepIterator.class.getName(), name);
       scanner.setScanIteratorOption(name, "term", term);
@@ -2369,7 +2440,8 @@ public class Shell {
         IOException, MissingArgumentException {
       shellState.checkTableState();
       
-      if (cl.getArgList().isEmpty()) throw new MissingArgumentException("No terms specified");
+      if (cl.getArgList().isEmpty())
+        throw new MissingArgumentException("No terms specified");
       
       // handle first argument, if present, the authorizations list to
       // scan with
@@ -2423,7 +2495,8 @@ public class Shell {
   public static class EGrepCommand extends GrepCommand {
     @Override
     protected void setUpIterator(int prio, String name, String term, BatchScanner scanner) throws IOException {
-      if (prio < 0) throw new IllegalArgumentException("Priority < 0 " + prio);
+      if (prio < 0)
+        throw new IllegalArgumentException("Priority < 0 " + prio);
       
       scanner.setScanIterators(prio, RegExIterator.class.getName(), name);
       scanner.setScanIteratorOption(name, RegExFilter.ROW_REGEX, term);
@@ -2456,12 +2529,14 @@ public class Shell {
       
       if (cl.hasOption(deleteOptAuths.getOpt())) {
         ColumnVisibility le = new ColumnVisibility(cl.getOptionValue(deleteOptAuths.getOpt()));
-        if (cl.hasOption(timestampOpt.getOpt())) m.putDelete(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]), le,
-            Long.parseLong(cl.getOptionValue(timestampOpt.getOpt())));
-        else m.putDelete(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]), le);
-      } else if (cl.hasOption(timestampOpt.getOpt())) m.putDelete(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]),
-          Long.parseLong(cl.getOptionValue(timestampOpt.getOpt())));
-      else m.putDelete(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]));
+        if (cl.hasOption(timestampOpt.getOpt()))
+          m.putDelete(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]), le, Long.parseLong(cl.getOptionValue(timestampOpt.getOpt())));
+        else
+          m.putDelete(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]), le);
+      } else if (cl.hasOption(timestampOpt.getOpt()))
+        m.putDelete(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]), Long.parseLong(cl.getOptionValue(timestampOpt.getOpt())));
+      else
+        m.putDelete(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]));
       
       BatchWriter bw = shellState.connector.createBatchWriter(shellState.tableName, m.estimatedMemoryUsed() + 0L, 0L, 1);
       bw.addMutation(m);
@@ -2509,16 +2584,19 @@ public class Shell {
       SortedSet<String> tablesToFlush = new TreeSet<String>();
       if (cl.hasOption(optTablePattern.getOpt())) {
         for (String table : shellState.connector.tableOperations().list())
-          if (table.matches(cl.getOptionValue(optTablePattern.getOpt()))) tablesToFlush.add(table);
+          if (table.matches(cl.getOptionValue(optTablePattern.getOpt())))
+            tablesToFlush.add(table);
       } else if (cl.hasOption(optTableName.getOpt())) {
         tablesToFlush.add(cl.getOptionValue(optTableName.getOpt()));
       }
       
-      if (tablesToFlush.isEmpty()) log.warn("No tables found that match your criteria");
+      if (tablesToFlush.isEmpty())
+        log.warn("No tables found that match your criteria");
       
       // flush the tables
       for (String tableName : tablesToFlush) {
-        if (!shellState.connector.tableOperations().exists(tableName)) throw new TableNotFoundException(null, tableName, null);
+        if (!shellState.connector.tableOperations().exists(tableName))
+          throw new TableNotFoundException(null, tableName, null);
         flush(shellState, tableName);
       }
       return 0;
@@ -2618,17 +2696,20 @@ public class Shell {
         java.util.Scanner file = new java.util.Scanner(new File(f));
         while (file.hasNextLine()) {
           line = file.nextLine();
-          if (!line.isEmpty()) splits.add(decode ? new Text(Base64.decodeBase64(line.getBytes())) : new Text(line));
+          if (!line.isEmpty())
+            splits.add(decode ? new Text(Base64.decodeBase64(line.getBytes())) : new Text(line));
         }
       } else {
-        if (cl.getArgList().isEmpty()) throw new MissingArgumentException("No split points specified");
+        if (cl.getArgList().isEmpty())
+          throw new MissingArgumentException("No split points specified");
         
         for (String s : cl.getArgs()) {
           splits.add(new Text(s));
         }
       }
       
-      if (!shellState.connector.tableOperations().exists(tableName)) throw new TableNotFoundException(null, tableName, null);
+      if (!shellState.connector.tableOperations().exists(tableName))
+        throw new TableNotFoundException(null, tableName, null);
       
       shellState.connector.tableOperations().addSplits(tableName, splits);
       
@@ -2778,12 +2859,16 @@ public class Shell {
         ColumnVisibility le = new ColumnVisibility(cl.getOptionValue(insertOptAuths.getOpt()));
         log.debug("Authorization label will be set to: " + le.toString());
         
-        if (cl.hasOption(timestampOpt.getOpt())) m.put(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]), le,
-            Long.parseLong(cl.getOptionValue(timestampOpt.getOpt())), new Value(cl.getArgs()[3].getBytes()));
-        else m.put(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]), le, new Value(cl.getArgs()[3].getBytes()));
-      } else if (cl.hasOption(timestampOpt.getOpt())) m.put(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]),
-          Long.parseLong(cl.getOptionValue(timestampOpt.getOpt())), new Value(cl.getArgs()[3].getBytes()));
-      else m.put(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]), new Value(cl.getArgs()[3].getBytes()));
+        if (cl.hasOption(timestampOpt.getOpt()))
+          m.put(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]), le, Long.parseLong(cl.getOptionValue(timestampOpt.getOpt())),
+              new Value(cl.getArgs()[3].getBytes()));
+        else
+          m.put(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]), le, new Value(cl.getArgs()[3].getBytes()));
+      } else if (cl.hasOption(timestampOpt.getOpt()))
+        m.put(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]), Long.parseLong(cl.getOptionValue(timestampOpt.getOpt())),
+            new Value(cl.getArgs()[3].getBytes()));
+      else
+        m.put(new Text(cl.getArgs()[1]), new Text(cl.getArgs()[2]), new Value(cl.getArgs()[3].getBytes()));
       
       BatchWriter bw = shellState.connector.createBatchWriter(shellState.tableName, m.estimatedMemoryUsed() + 0L, 0L, 1);
       bw.addMutation(m);
@@ -2791,11 +2876,13 @@ public class Shell {
         bw.close();
       } catch (MutationsRejectedException e) {
         ArrayList<String> lines = new ArrayList<String>();
-        if (e.getAuthorizationFailures().isEmpty() == false) lines.add("	Authorization Failures:");
+        if (e.getAuthorizationFailures().isEmpty() == false)
+          lines.add("	Authorization Failures:");
         for (KeyExtent extent : e.getAuthorizationFailures()) {
           lines.add("		" + extent);
         }
-        if (e.getConstraintViolationSummaries().isEmpty() == false) lines.add("	Constraint Failures:");
+        if (e.getConstraintViolationSummaries().isEmpty() == false)
+          lines.add("	Constraint Failures:");
         for (ConstraintViolationSummary cvs : e.getConstraintViolationSummaries()) {
           lines.add("		" + cvs.toString());
         }
@@ -2840,7 +2927,8 @@ public class Shell {
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
         IOException {
       String tableName = cl.getArgs()[0];
-      if (shellState.tableName.equals(tableName)) shellState.tableName = "";
+      if (shellState.tableName.equals(tableName))
+        shellState.tableName = "";
       shellState.connector.tableOperations().delete(tableName);
       return 0;
     }
@@ -2888,7 +2976,8 @@ public class Shell {
       }
       
       String tableName = cl.getArgs()[0];
-      if (shellState.connector.tableOperations().exists(tableName)) throw new TableExistsException(null, tableName, null);
+      if (shellState.connector.tableOperations().exists(tableName))
+        throw new TableExistsException(null, tableName, null);
       
       SortedSet<Text> partitions = new TreeSet<Text>();
       List<AggregatorConfiguration> aggregators = new ArrayList<AggregatorConfiguration>();
@@ -2910,10 +2999,11 @@ public class Shell {
           EscapeTokenizer colToks = new EscapeTokenizer(col, ":");
           Iterator<String> tokIter = colToks.iterator();
           Text cf = null, cq = null;
-          if (colToks.count() < 1 || colToks.count() > 2) throw new BadArgumentException("column must be in the format cf[:cq]", fullCommand,
-              fullCommand.indexOf(col));
+          if (colToks.count() < 1 || colToks.count() > 2)
+            throw new BadArgumentException("column must be in the format cf[:cq]", fullCommand, fullCommand.indexOf(col));
           cf = new Text(tokIter.next());
-          if (colToks.count() == 2) cq = new Text(tokIter.next());
+          if (colToks.count() == 2)
+            cq = new Text(tokIter.next());
           
           aggregators.add(new AggregatorConfiguration(cf, cq, className));
         }
@@ -2925,21 +3015,25 @@ public class Shell {
         java.util.Scanner file = new java.util.Scanner(new File(f));
         while (file.hasNextLine()) {
           line = file.nextLine();
-          if (!line.isEmpty()) partitions.add(decode ? new Text(Base64.decodeBase64(line.getBytes())) : new Text(line));
+          if (!line.isEmpty())
+            partitions.add(decode ? new Text(Base64.decodeBase64(line.getBytes())) : new Text(line));
         }
       } else if (cl.hasOption(createTableOptCopySplits.getOpt())) {
         String oldTable = cl.getOptionValue(createTableOptCopySplits.getOpt());
-        if (!shellState.connector.tableOperations().exists(oldTable)) throw new TableNotFoundException(null, oldTable, null);
+        if (!shellState.connector.tableOperations().exists(oldTable))
+          throw new TableNotFoundException(null, oldTable, null);
         partitions.addAll(shellState.connector.tableOperations().getSplits(oldTable));
       }
       
       if (cl.hasOption(createTableOptCopyConfig.getOpt())) {
         String oldTable = cl.getOptionValue(createTableOptCopyConfig.getOpt());
-        if (!shellState.connector.tableOperations().exists(oldTable)) throw new TableNotFoundException(null, oldTable, null);
+        if (!shellState.connector.tableOperations().exists(oldTable))
+          throw new TableNotFoundException(null, oldTable, null);
       }
       
       TimeType timeType = TimeType.MILLIS;
-      if (cl.hasOption(createTableOptTimeLogical.getOpt())) timeType = TimeType.LOGICAL;
+      if (cl.hasOption(createTableOptTimeLogical.getOpt()))
+        timeType = TimeType.LOGICAL;
       
       shellState.connector.tableOperations().create(tableName, timeType); // create
       // table
@@ -2961,8 +3055,8 @@ public class Shell {
         if (shellState.connector.tableOperations().exists(tableName)) {
           for (Entry<String,String> entry : AccumuloConfiguration.getTableConfiguration(shellState.connector.getInstance().getInstanceID(),
               shellState.connector.tableOperations().tableIdMap().get(cl.getOptionValue(createTableOptCopyConfig.getOpt()))))
-            if (Property.isValidTablePropertyKey(entry.getKey())) shellState.connector.tableOperations().setProperty(tableName, entry.getKey(),
-                entry.getValue());
+            if (Property.isValidTablePropertyKey(entry.getKey()))
+              shellState.connector.tableOperations().setProperty(tableName, entry.getKey(), entry.getValue());
         }
       }
       return 0;
@@ -3029,7 +3123,8 @@ public class Shell {
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException,
         TableExistsException {
       shellState.connector.tableOperations().rename(cl.getArgs()[0], cl.getArgs()[1]);
-      if (shellState.tableName.equals(cl.getArgs()[0])) shellState.tableName = cl.getArgs()[1];
+      if (shellState.tableName.equals(cl.getArgs()[0]))
+        shellState.tableName = cl.getArgs()[1];
       return 0;
     }
     
@@ -3092,7 +3187,8 @@ public class Shell {
     @Override
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
       String tableName = cl.getArgs()[0];
-      if (!shellState.connector.tableOperations().exists(tableName)) throw new TableNotFoundException(null, tableName, null);
+      if (!shellState.connector.tableOperations().exists(tableName))
+        throw new TableNotFoundException(null, tableName, null);
       
       shellState.tableName = tableName;
       return 0;
@@ -3148,7 +3244,8 @@ public class Shell {
     @Override
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws IOException {
       // custom clear screen, so I don't have to redraw the prompt twice
-      if (!shellState.reader.getTerminal().isANSISupported()) throw new IOException("Terminal does not support ANSI commands");
+      if (!shellState.reader.getTerminal().isANSISupported())
+        throw new IOException("Terminal does not support ANSI commands");
       
       // send the ANSI code to clear the screen
       shellState.reader.printString(((char) 27) + "[2J");
@@ -3177,10 +3274,12 @@ public class Shell {
     
     @Override
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
-      if (cl.hasOption(resetOption.getOpt())) shellState.formatterClass = DefaultFormatter.class;
-      else if (cl.hasOption(formatterClassOption.getOpt())) shellState.formatterClass = AccumuloClassLoader.loadClass(
-          cl.getOptionValue(formatterClassOption.getOpt()), Formatter.class);
-      else if (cl.hasOption(listClassOption.getOpt())) shellState.reader.printString(shellState.formatterClass.getName() + "\n");
+      if (cl.hasOption(resetOption.getOpt()))
+        shellState.formatterClass = DefaultFormatter.class;
+      else if (cl.hasOption(formatterClassOption.getOpt()))
+        shellState.formatterClass = AccumuloClassLoader.loadClass(cl.getOptionValue(formatterClassOption.getOpt()), Formatter.class);
+      else if (cl.hasOption(listClassOption.getOpt()))
+        shellState.reader.printString(shellState.formatterClass.getName() + "\n");
       return 0;
     }
     
@@ -3304,7 +3403,8 @@ public class Shell {
     @Override
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws IOException {
       shellState.printInfo();
-      if (cl.hasOption(verboseOption.getOpt())) shellState.printVerboseInfo();
+      if (cl.hasOption(verboseOption.getOpt()))
+        shellState.printVerboseInfo();
       return 0;
     }
     
@@ -3343,7 +3443,8 @@ public class Shell {
         shellState.reader.printString("  CC        LL        OO    OO  UU    UU  DD    DD  BB    BB  AA    AA        SS  EE      \n");
         shellState.reader.printString("  CCCCCCCC  LLLLLLLL   OOOOOO    UUUUUU   DDDDDDD   BBBBBBB   AA    AA  SSSSSSSS  EEEEEEEE\n");
         shellState.reader.printNewline();
-      } else throw new ShellCommandException(ErrorCode.UNRECOGNIZED_COMMAND, getName());
+      } else
+        throw new ShellCommandException(ErrorCode.UNRECOGNIZED_COMMAND, getName());
       
       return 0;
     }
@@ -3372,7 +3473,8 @@ public class Shell {
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
       
       String tableName = cl.getOptionValue(tableOpt.getOpt());
-      if (!shellState.connector.tableOperations().exists(tableName)) throw new TableNotFoundException(null, tableName, null);
+      if (!shellState.connector.tableOperations().exists(tableName))
+        throw new TableNotFoundException(null, tableName, null);
       
       Map<String,Set<Text>> groups = shellState.connector.tableOperations().getLocalityGroups(tableName);
       
@@ -3413,13 +3515,15 @@ public class Shell {
     public int execute(String fullCommand, CommandLine cl, Shell shellState) throws Exception {
       
       String tableName = cl.getOptionValue(tableOpt.getOpt());
-      if (!shellState.connector.tableOperations().exists(tableName)) throw new TableNotFoundException(null, tableName, null);
+      if (!shellState.connector.tableOperations().exists(tableName))
+        throw new TableNotFoundException(null, tableName, null);
       
       HashMap<String,Set<Text>> groups = new HashMap<String,Set<Text>>();
       
       for (String arg : cl.getArgs()) {
         String sa[] = arg.split("=", 2);
-        if (sa.length < 2) throw new IllegalArgumentException("Missing '='");
+        if (sa.length < 2)
+          throw new IllegalArgumentException("Missing '='");
         String group = sa[0];
         HashSet<Text> colFams = new HashSet<Text>();
         
@@ -3482,7 +3586,8 @@ public class Shell {
       
       AssignmentStats stats = shellState.connector.tableOperations().importDirectory(shellState.tableName, dir, failureDir, numFileThreads, numAssignThreads,
           disableGC);
-      if (cl.hasOption(verboseOption.getOpt())) shellState.reader.printString(stats.toString());
+      if (cl.hasOption(verboseOption.getOpt()))
+        shellState.reader.printString(stats.toString());
       
       return 0;
     }
@@ -3569,7 +3674,8 @@ public class Shell {
     }
     
     private static String encode(boolean encode, Text text) {
-      if (text == null) return null;
+      if (text == null)
+        return null;
       return encode ? new String(Base64.encodeBase64(TextUtil.getBytes(text))) : text.toString();
     }
     
@@ -3681,7 +3787,8 @@ public class Shell {
           scans.add(tserver + " ERROR " + e.getMessage());
         }
         
-        if (scans.size() > 0) break;
+        if (scans.size() > 0)
+          break;
       }
       
       scansIter = scans.iterator();
@@ -3706,7 +3813,8 @@ public class Shell {
     public String next() {
       String next = scansIter.next();
       
-      if (!scansIter.hasNext()) readNext();
+      if (!scansIter.hasNext())
+        readNext();
       
       return next;
     }
@@ -3779,7 +3887,8 @@ public class Shell {
     String peek = null;
     while (lines.hasNext()) {
       String nextLine = lines.next();
-      if (nextLine == null) continue;
+      if (nextLine == null)
+        continue;
       for (String line : nextLine.split("\\n")) {
         if (peek != null) {
           reader.printString(peek);
@@ -3828,12 +3937,14 @@ public class Shell {
   }
   
   private static Authorizations parseAuthorizations(String field) {
-    if (field == null || field.isEmpty()) return Constants.NO_AUTHS;
+    if (field == null || field.isEmpty())
+      return Constants.NO_AUTHS;
     return new Authorizations(field.split(","));
   }
   
   private void checkTableState() {
-    if (tableName.isEmpty()) throw new IllegalStateException("Not in a table context. Please use 'table <tableName>' to switch to a table");
+    if (tableName.isEmpty())
+      throw new IllegalStateException("Not in a table context. Please use 'table <tableName>' to switch to a table");
   }
   
   private final void printConstraintViolationException(ConstraintViolationException cve) {

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/ShellCompletor.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/ShellCompletor.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/ShellCompletor.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/ShellCompletor.java Thu Oct 27 15:24:51 2011
@@ -100,8 +100,10 @@ public class ShellCompletor implements C
             if (next != null) {
               current_command_token = next;
               
-              if (current_command_token.getCaseSensitive()) prefix += current_string_token + " ";
-              else prefix += current_string_token.toUpperCase() + " ";
+              if (current_command_token.getCaseSensitive())
+                prefix += current_string_token + " ";
+              else
+                prefix += current_string_token.toUpperCase() + " ";
               
               candidates.addAll(current_command_token.getSubcommandNames());
             }
@@ -113,26 +115,34 @@ public class ShellCompletor implements C
         // if we're in -t <table> or -u <user> complete those
         if (inTableFlag) {
           for (String a : options.get(Shell.Command.CompletionSet.TABLENAMES))
-            if (a.startsWith(current_string_token)) candidates.add(a);
+            if (a.startsWith(current_string_token))
+              candidates.add(a);
         } else if (inUserFlag) {
           for (String a : options.get(Shell.Command.CompletionSet.USERNAMES))
-            if (a.startsWith(current_string_token)) candidates.add(a);
-        } else if (current_command_token != null) candidates.addAll(current_command_token.getSubcommandNames(current_string_token));
+            if (a.startsWith(current_string_token))
+              candidates.add(a);
+        } else if (current_command_token != null)
+          candidates.addAll(current_command_token.getSubcommandNames(current_string_token));
         
         Collections.sort(candidates);
         return (prefix.length());
       }
-      if (current_string_token.trim().equals("-" + Shell.tableOption)) inTableFlag = true;
-      else if (current_string_token.trim().equals("-" + Shell.userOption)) inUserFlag = true;
-      else inUserFlag = inTableFlag = false;
+      if (current_string_token.trim().equals("-" + Shell.tableOption))
+        inTableFlag = true;
+      else if (current_string_token.trim().equals("-" + Shell.userOption))
+        inUserFlag = true;
+      else
+        inUserFlag = inTableFlag = false;
       
-      if (current_command_token != null && current_command_token.getCaseSensitive()) prefix += current_string_token + " ";
-      else prefix += current_string_token.toUpperCase() + " ";
+      if (current_command_token != null && current_command_token.getCaseSensitive())
+        prefix += current_string_token + " ";
+      else
+        prefix += current_string_token.toUpperCase() + " ";
       
       // have more tokens but only get the tokens if we're not
       // in a flag context
-      if (!(current_string_token.startsWith("-") || inTableFlag || inUserFlag) && (current_command_token != null)) current_command_token = current_command_token
-          .getSubcommand(current_string_token);
+      if (!(current_string_token.startsWith("-") || inTableFlag || inUserFlag) && (current_command_token != null))
+        current_command_token = current_command_token.getSubcommand(current_string_token);
     }
     return 0;
   }

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Token.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Token.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Token.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/util/shell/Token.java Thu Oct 27 15:24:51 2011
@@ -59,12 +59,14 @@ public class Token {
    */
   public static Token findCommand(Token start, int find_id) {
     if (start != null) {
-      if (start.getID() == find_id) return start;
+      if (start.getID() == find_id)
+        return start;
       
       if (start.getSubcommandList() != null) {
         for (Token t : start.getSubcommandList()) {
           Token f = findCommand(t, find_id);
-          if (f != null) return f;
+          if (f != null)
+            return f;
         }
       }
     }
@@ -105,7 +107,8 @@ public class Token {
     Iterator<Token> iter = subcommands.iterator();
     while (iter.hasNext()) {
       Token t = iter.next();
-      if (t.containsCommand(name)) return t;
+      if (t.containsCommand(name))
+        return t;
     }
     return null;
   }
@@ -143,9 +146,11 @@ public class Token {
     while (iter.hasNext()) {
       String t = iter.next();
       if (caseSensitive) {
-        if (t.equals(match)) return true;
+        if (t.equals(match))
+          return true;
       } else {
-        if (t.equalsIgnoreCase(match)) return true;
+        if (t.equalsIgnoreCase(match))
+          return true;
       }
     }
     return false;

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooCache.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooCache.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooCache.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooCache.java Thu Oct 27 15:24:51 2011
@@ -54,7 +54,8 @@ public class ZooCache {
   private int sessionTimeout;
   
   private ZooKeeper getZooKeeper() {
-    if (zooKeepers == null) return ZooSession.getSession();
+    if (zooKeepers == null)
+      return ZooSession.getSession();
     return ZooSession.getSession(zooKeepers, sessionTimeout);
   }
   
@@ -62,7 +63,8 @@ public class ZooCache {
     @Override
     public void process(WatchedEvent event) {
       
-      if (log.isTraceEnabled()) log.trace(event);
+      if (log.isTraceEnabled())
+        log.trace(event);
       
       switch (event.getType()) {
         case NodeDataChanged:
@@ -74,13 +76,15 @@ public class ZooCache {
         case None:
           switch (event.getState()) {
             case Disconnected:
-              if (log.isTraceEnabled()) log.trace("Zoo keeper connection disconnected, clearing cache");
+              if (log.isTraceEnabled())
+                log.trace("Zoo keeper connection disconnected, clearing cache");
               clear();
               break;
             case SyncConnected:
               break;
             case Expired:
-              if (log.isTraceEnabled()) log.trace("Zoo keeper connection expired, clearing cache");
+              if (log.isTraceEnabled())
+                log.trace("Zoo keeper connection expired, clearing cache");
               clear();
               break;
             default:
@@ -151,7 +155,8 @@ public class ZooCache {
       } catch (InterruptedException e) {
         e.printStackTrace();
       }
-      if (sleepTime < 10000) sleepTime = (int) (sleepTime + sleepTime * Math.random());
+      if (sleepTime < 10000)
+        sleepTime = (int) (sleepTime + sleepTime * Math.random());
       
     }
   }
@@ -163,7 +168,8 @@ public class ZooCache {
       @Override
       public void run(ZooKeeper zooKeeper) throws KeeperException, InterruptedException {
         
-        if (childrenCache.containsKey(zPath)) return;
+        if (childrenCache.containsKey(zPath))
+          return;
         
         try {
           List<String> children = zooKeeper.getChildren(zPath, watcher);
@@ -196,7 +202,8 @@ public class ZooCache {
       @Override
       public void run(ZooKeeper zooKeeper) throws KeeperException, InterruptedException {
         
-        if (cache.containsKey(zPath)) return;
+        if (cache.containsKey(zPath))
+          return;
         
         /*
          * The following call to exists() is important, since we are caching that a node does not exist. Once the node comes into existance, it will be added to
@@ -211,7 +218,8 @@ public class ZooCache {
         byte[] data = null;
         
         if (stat == null) {
-          if (log.isTraceEnabled()) log.trace("zookeeper did not contain " + zPath);
+          if (log.isTraceEnabled())
+            log.trace("zookeeper did not contain " + zPath);
         } else {
           try {
             data = zooKeeper.getData(zPath, watcher, stat);
@@ -220,9 +228,11 @@ public class ZooCache {
           } catch (KeeperException.NoNodeException e2) {
             throw new ConcurrentModificationException();
           }
-          if (log.isTraceEnabled()) log.trace("zookeeper contained " + zPath + " " + (data == null ? null : new String(data)));
+          if (log.isTraceEnabled())
+            log.trace("zookeeper contained " + zPath + " " + (data == null ? null : new String(data)));
         }
-        if (log.isTraceEnabled()) log.trace("putting " + zPath + " " + (data == null ? null : new String(data)) + " in cache");
+        if (log.isTraceEnabled())
+          log.trace("putting " + zPath + " " + (data == null ? null : new String(data)) + " in cache");
         put(zPath, data, stat);
       }
       
@@ -259,7 +269,8 @@ public class ZooCache {
   }
   
   private synchronized void remove(String zPath) {
-    if (log.isTraceEnabled()) log.trace("removing " + zPath + " from cache");
+    if (log.isTraceEnabled())
+      log.trace("removing " + zPath + " from cache");
     cache.remove(zPath);
     childrenCache.remove(zPath);
     statCache.remove(zPath);

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooLock.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooLock.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooLock.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooLock.java Thu Oct 27 15:24:51 2011
@@ -50,8 +50,10 @@ public class ZooLock implements Watcher 
         throw new IllegalArgumentException("Malformed serialized lock id " + serializedLID);
       }
       
-      if (lastSlash == 0) path = root;
-      else path = root + "/" + sa[0].substring(0, lastSlash);
+      if (lastSlash == 0)
+        path = root;
+      else
+        path = root + "/" + sa[0].substring(0, lastSlash);
       node = sa[0].substring(lastSlash + 1);
       eid = Long.parseLong(sa[1]);
     }
@@ -208,7 +210,8 @@ public class ZooLock implements Watcher 
       
     });
     
-    if (stat == null) lockAsync(myLock, lw);
+    if (stat == null)
+      lockAsync(myLock, lw);
   }
   
   public synchronized void lockAsync(final AsyncLockWatcher lw, byte data[]) {
@@ -343,7 +346,8 @@ public class ZooLock implements Watcher 
     Collections.sort(children);
     
     String lockNode = children.get(0);
-    if (!lid.node.equals(lockNode)) return false;
+    if (!lid.node.equals(lockNode))
+      return false;
     
     Stat stat = zk.exists(lid.path + "/" + lid.node, false);
     return stat != null && stat.getEphemeralOwner() == lid.eid;
@@ -361,7 +365,8 @@ public class ZooLock implements Watcher 
     Collections.sort(children);
     
     String lockNode = children.get(0);
-    if (!lid.node.equals(lockNode)) return false;
+    if (!lid.node.equals(lockNode))
+      return false;
     
     Stat stat = new Stat();
     return zc.get(lid.path + "/" + lid.node, stat) != null && stat.getEphemeralOwner() == lid.eid;
@@ -420,7 +425,8 @@ public class ZooLock implements Watcher 
     String lockNode = children.get(0);
     
     Stat stat = new Stat();
-    if (zc.get(path + "/" + lockNode, stat) != null) return stat.getEphemeralOwner();
+    if (zc.get(path + "/" + lockNode, stat) != null)
+      return stat.getEphemeralOwner();
     return 0;
   }
   

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooSession.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooSession.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooSession.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooSession.java Thu Oct 27 15:24:51 2011
@@ -85,8 +85,10 @@ public class ZooSession {
         zooKeeper = new ZooKeeper(host, timeout, watcher);
         // it may take some time to get connected to zookeeper if some of the servers are down
         for (int i = 0; i < TOTAL_CONNECT_TIME_WAIT_MS / TIME_BETWEEN_CONNECT_CHECKS_MS && tryAgain; i++) {
-          if (zooKeeper.getState().equals(States.CONNECTED)) tryAgain = false;
-          else UtilWaitThread.sleep(TIME_BETWEEN_CONNECT_CHECKS_MS);
+          if (zooKeeper.getState().equals(States.CONNECTED))
+            tryAgain = false;
+          else
+            UtilWaitThread.sleep(TIME_BETWEEN_CONNECT_CHECKS_MS);
         }
       } catch (UnknownHostException uhe) {
         // do not expect to recover from this
@@ -98,7 +100,8 @@ public class ZooSession {
       
       if (tryAgain) {
         UtilWaitThread.sleep(sleepTime);
-        if (sleepTime < 10000) sleepTime = (int) (sleepTime + sleepTime * Math.random());
+        if (sleepTime < 10000)
+          sleepTime = (int) (sleepTime + sleepTime * Math.random());
       }
     }
     

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooUtil.java Thu Oct 27 15:24:51 2011
@@ -45,15 +45,18 @@ public class ZooUtil {
   }
   
   public static void recursiveDelete(ZooKeeper zk, String zPath, NodeMissingPolicy policy) throws KeeperException, InterruptedException {
-    if (policy.equals(NodeMissingPolicy.CREATE)) throw new IllegalArgumentException(policy.name() + " is invalid for this operation");
+    if (policy.equals(NodeMissingPolicy.CREATE))
+      throw new IllegalArgumentException(policy.name() + " is invalid for this operation");
     try {
       for (String child : zk.getChildren(zPath, false))
         recursiveDelete(zk, zPath + "/" + child, NodeMissingPolicy.SKIP);
       
       Stat stat;
-      if ((stat = zk.exists(zPath, null)) != null) zk.delete(zPath, stat.getVersion());
+      if ((stat = zk.exists(zPath, null)) != null)
+        zk.delete(zPath, stat.getVersion());
     } catch (KeeperException e) {
-      if (policy.equals(NodeMissingPolicy.SKIP) && e.code().equals(KeeperException.Code.NONODE)) return;
+      if (policy.equals(NodeMissingPolicy.SKIP) && e.code().equals(KeeperException.Code.NONODE))
+        return;
       throw e;
     }
   }
@@ -87,7 +90,8 @@ public class ZooUtil {
   
   private static boolean putData(ZooKeeper zk, String zPath, byte[] data, CreateMode mode, int version, NodeExistsPolicy policy) throws KeeperException,
       InterruptedException {
-    if (policy == null) policy = NodeExistsPolicy.FAIL;
+    if (policy == null)
+      policy = NodeExistsPolicy.FAIL;
     
     if (!policy.equals(NodeExistsPolicy.FAIL) && zk.exists(zPath, null) != null) {
       // check for overwrite or skip and node exists
@@ -135,7 +139,8 @@ public class ZooUtil {
   public static void recursiveCopyPersistent(ZooKeeper zk, String source, String destination, NodeExistsPolicy policy) throws KeeperException,
       InterruptedException {
     Stat stat = null;
-    if (!exists(source)) throw KeeperException.create(Code.NONODE, source);
+    if (!exists(source))
+      throw KeeperException.create(Code.NONODE, source);
     if (exists(destination)) {
       switch (policy) {
         case OVERWRITE:
@@ -151,10 +156,12 @@ public class ZooUtil {
     stat = new Stat();
     byte[] data = zk.getData(source, false, stat);
     if (stat.getEphemeralOwner() == 0) {
-      if (data == null) throw KeeperException.create(Code.NONODE, source);
+      if (data == null)
+        throw KeeperException.create(Code.NONODE, source);
       putPersistentData(destination, data, policy);
-      if (stat.getNumChildren() > 0) for (String child : zk.getChildren(source, false))
-        recursiveCopyPersistent(zk, source + "/" + child, destination + "/" + child, policy);
+      if (stat.getNumChildren() > 0)
+        for (String child : zk.getChildren(source, false))
+          recursiveCopyPersistent(zk, source + "/" + child, destination + "/" + child, policy);
     }
   }
   

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/RangeTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/RangeTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/RangeTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/RangeTest.java Thu Oct 27 15:24:51 2011
@@ -32,10 +32,12 @@ import org.apache.hadoop.io.Text;
 public class RangeTest extends TestCase {
   private Range nr(String k1, String k2) {
     Key ik1 = null;
-    if (k1 != null) ik1 = new Key(new Text(k1), 0l);
+    if (k1 != null)
+      ik1 = new Key(new Text(k1), 0l);
     
     Key ik2 = null;
-    if (k2 != null) ik2 = new Key(new Text(k2), 0l);
+    if (k2 != null)
+      ik2 = new Key(new Text(k2), 0l);
     
     return new Range(ik1, ik2);
   }
@@ -416,9 +418,11 @@ public class RangeTest extends TestCase 
     Text tr1 = null;
     Text tr2 = null;
     
-    if (r1 != null) tr1 = new Text(r1);
+    if (r1 != null)
+      tr1 = new Text(r1);
     
-    if (r2 != null) tr2 = new Text(r2);
+    if (r2 != null)
+      tr2 = new Text(r2);
     
     return new Range(tr1, r1i, tr2, r2i);
     

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/impl/TabletLocatorImplTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/impl/TabletLocatorImplTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/impl/TabletLocatorImplTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/impl/TabletLocatorImplTest.java Thu Oct 27 15:24:51 2011
@@ -114,8 +114,10 @@ public class TabletLocatorImplTest exten
     TreeMap<Text,TabletLocation> mc = new TreeMap<Text,TabletLocation>(TabletLocatorImpl.endRowComparator);
     
     for (Entry<KeyExtent,TabletLocation> entry : mcke.entrySet()) {
-      if (entry.getKey().getEndRow() == null) mc.put(TabletLocatorImpl.MAX_TEXT, entry.getValue());
-      else mc.put(entry.getKey().getEndRow(), entry.getValue());
+      if (entry.getKey().getEndRow() == null)
+        mc.put(TabletLocatorImpl.MAX_TEXT, entry.getValue());
+      else
+        mc.put(entry.getKey().getEndRow(), entry.getValue());
     }
     
     return mc;
@@ -511,8 +513,10 @@ public class TabletLocatorImplTest exten
         List<Range> ranges = entry.getValue();
         for (Range range : ranges) {
           SortedMap<Key,Value> tm;
-          if (range.getStartKey() == null) tm = tabletData;
-          else tm = tabletData.tailMap(range.getStartKey());
+          if (range.getStartKey() == null)
+            tm = tabletData;
+          else
+            tm = tabletData.tailMap(range.getStartKey());
           
           for (Entry<Key,Value> de : tm.entrySet()) {
             if (range.afterEndKey(de.getKey())) {
@@ -526,7 +530,8 @@ public class TabletLocatorImplTest exten
         }
       }
       
-      if (failures.size() > 0) parent.invalidateCache(failures);
+      if (failures.size() > 0)
+        parent.invalidateCache(failures);
       
       SortedMap<KeyExtent,Text> metadata = MetadataTable.getMetadataLocationEntries(results);
       
@@ -575,7 +580,8 @@ public class TabletLocatorImplTest exten
     TabletLocation tl = cache.locateTablet(new Text(row), skipRow, false);
     
     if (expected == null) {
-      if (tl != null) System.out.println("tl = " + tl);
+      if (tl != null)
+        System.out.println("tl = " + tl);
       assertNull(tl);
     } else {
       assertNotNull(tl);
@@ -1036,7 +1042,8 @@ public class TabletLocatorImplTest exten
       
       List<Mutation> ml = nml(nm("a", "cf1:cq1=v1", "cf1:cq2=v2"), nm("m", "cf1:cq1=v3", "cf1:cq2=v4"), nm("z", "cf1:cq1=v5"));
       Map<String,Map<KeyExtent,List<String>>> emb = cemb(nol("a", "l1", ke1), nol("m", "l1", ke1), nol("z", "l1", ke1));
-      if (i == 0 || i == 2) runTest(metaCache, ml, emb);
+      if (i == 0 || i == 2)
+        runTest(metaCache, ml, emb);
       
       List<Range> ranges = nrl(new Range(new Text("a")), new Range(new Text("m")), new Range(new Text("z")));
       
@@ -1044,7 +1051,8 @@ public class TabletLocatorImplTest exten
       
       );
       
-      if (i == 1 || i == 2) runTest(new Text("foo"), ranges, metaCache, expected1);
+      if (i == 1 || i == 2)
+        runTest(new Text("foo"), ranges, metaCache, expected1);
       
       KeyExtent ke11 = nke("foo", "n", null);
       KeyExtent ke12 = nke("foo", null, "n");
@@ -1054,24 +1062,28 @@ public class TabletLocatorImplTest exten
       metaCache.invalidateCache(ke1);
       
       emb = cemb(nol("z", "l2", ke12));
-      if (i == 0 || i == 2) runTest(metaCache, ml, emb, "a", "m");
+      if (i == 0 || i == 2)
+        runTest(metaCache, ml, emb, "a", "m");
       
       Map<String,Map<KeyExtent,List<Range>>> expected2 = createExpectedBinnings("l2", nol(nke("foo", null, "n"), nrl(new Range(new Text("z"))))
       
       );
       
-      if (i == 1 || i == 2) runTest(new Text("foo"), ranges, metaCache, expected2, nrl(new Range(new Text("a")), new Range(new Text("m"))));
+      if (i == 1 || i == 2)
+        runTest(new Text("foo"), ranges, metaCache, expected2, nrl(new Range(new Text("a")), new Range(new Text("m"))));
       
       setLocation(tservers, "tserver2", MTE, ke11, "l3");
       emb = cemb(nol("a", "l3", ke11), nol("m", "l3", ke11), nol("z", "l2", ke12));
-      if (i == 0 || i == 2) runTest(metaCache, ml, emb);
+      if (i == 0 || i == 2)
+        runTest(metaCache, ml, emb);
       
       Map<String,Map<KeyExtent,List<Range>>> expected3 = createExpectedBinnings("l2", nol(nke("foo", null, "n"), nrl(new Range(new Text("z")))), "l3",
           nol(nke("foo", "n", null), nrl(new Range(new Text("a")), new Range(new Text("m"))))
       
       );
       
-      if (i == 1 || i == 2) runTest(new Text("foo"), ranges, metaCache, expected3);
+      if (i == 1 || i == 2)
+        runTest(new Text("foo"), ranges, metaCache, expected3);
     }
   }
   

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java Thu Oct 27 15:24:51 2011
@@ -196,7 +196,8 @@ public class AccumuloInputFormatTest {
     
     @Override
     protected void map(Key k, Value v, Context context) throws IOException, InterruptedException {
-      if (key != null) assertEquals(key.getRow().toString(), new String(v.get()));
+      if (key != null)
+        assertEquals(key.getRow().toString(), new String(v.get()));
       assertEquals(k.getRow(), new Text(String.format("%09x", count + 1)));
       assertEquals(new String(v.get()), String.format("%09x", count));
       key = new Key(k);

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/client/mock/MockConnectorTest.java Thu Oct 27 15:24:51 2011
@@ -66,7 +66,8 @@ public class MockConnectorTest {
     Key key = null;
     int count = 0;
     for (Entry<Key,Value> entry : s) {
-      if (key != null) assertTrue(key.compareTo(entry.getKey()) < 0);
+      if (key != null)
+        assertTrue(key.compareTo(entry.getKey()) < 0);
       assertEquals(entry.getKey().getRow(), new Text(entry.getValue().get()));
       key = entry.getKey();
       count++;

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/conf/PropertyTest.java Thu Oct 27 15:24:51 2011
@@ -33,7 +33,8 @@ public class PropertyTest {
   public void testProperties() {
     HashSet<String> validPrefixes = new HashSet<String>();
     for (Property prop : Property.values())
-      if (prop.getType().equals(PropertyType.PREFIX)) validPrefixes.add(prop.getKey());
+      if (prop.getType().equals(PropertyType.PREFIX))
+        validPrefixes.add(prop.getKey());
     
     HashSet<String> propertyNames = new HashSet<String>();
     for (Property prop : Property.values()) {

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/data/ColumnTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/data/ColumnTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/data/ColumnTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/data/ColumnTest.java Thu Oct 27 15:24:51 2011
@@ -25,8 +25,10 @@ public class ColumnTest extends TestCase
     Column[] col = createColumns();
     for (int i = 0; i < col.length; i++) {
       for (int j = 0; j < col.length; j++) {
-        if (i == j || (i == 0 && j == 1) || (i == 1 && j == 0)) assertTrue(col[i].equals(col[j]));
-        else assertFalse(col[i].equals(col[j]));
+        if (i == j || (i == 0 && j == 1) || (i == 1 && j == 0))
+          assertTrue(col[i].equals(col[j]));
+        else
+          assertFalse(col[i].equals(col[j]));
       }
     }
   }
@@ -35,8 +37,10 @@ public class ColumnTest extends TestCase
     Column[] col = createColumns();
     for (int i = 0; i < col.length; i++) {
       for (int j = 0; j < col.length; j++) {
-        if (i == j || (i == 0 && j == 1) || (i == 1 && j == 0)) assertTrue(col[i].compareTo(col[j]) == 0);
-        else assertFalse(col[i].compareTo(col[j]) == 0);
+        if (i == j || (i == 0 && j == 1) || (i == 1 && j == 0))
+          assertTrue(col[i].compareTo(col[j]) == 0);
+        else
+          assertFalse(col[i].compareTo(col[j]) == 0);
       }
     }
   }

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/data/MapFileTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/data/MapFileTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/data/MapFileTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/data/MapFileTest.java Thu Oct 27 15:24:51 2011
@@ -279,7 +279,8 @@ public class MapFileTest extends TestCas
           boolean moreKeys = false;
           // check for the same number of records
           assertTrue((moreKeys = oldIndexReader.next(oldKey, oldValue)) == newIndexReader.next(newKey, newValue));
-          if (!moreKeys) break;
+          if (!moreKeys)
+            break;
           assertTrue(oldKey.compareTo(newKey) == 0);
           assertTrue(oldValue.compareTo(newValue) == 0);
         }

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/data/MutationTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/data/MutationTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/data/MutationTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/data/MutationTest.java Thu Oct 27 15:24:51 2011
@@ -314,7 +314,8 @@ public class MutationTest extends TestCa
     assertEquals(cq, new String(cu.getColumnQualifier()));
     assertEquals(cv, new String(cu.getColumnVisibility()));
     assertEquals(timeSet, cu.hasTimestamp());
-    if (timeSet) assertEquals(ts, cu.getTimestamp());
+    if (timeSet)
+      assertEquals(ts, cu.getTimestamp());
     assertEquals(deleted, cu.isDeleted());
     assertEquals(val, new String(cu.getValue()));
   }

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java Thu Oct 27 15:24:51 2011
@@ -73,12 +73,14 @@ public class RFileTest extends TestCase 
     
     @Override
     public void seek(long pos) throws IOException {
-      if (mark != 0) throw new IllegalStateException();
+      if (mark != 0)
+        throw new IllegalStateException();
       
       reset();
       long skipped = skip(pos);
       
-      if (skipped != pos) throw new IOException();
+      if (skipped != pos)
+        throw new IOException();
     }
     
     @Override
@@ -89,9 +91,12 @@ public class RFileTest extends TestCase 
     @Override
     public int read(long position, byte[] buffer, int offset, int length) throws IOException {
       
-      if (position >= buf.length) throw new IllegalArgumentException();
-      if (position + length > buf.length) throw new IllegalArgumentException();
-      if (length > buffer.length) throw new IllegalArgumentException();
+      if (position >= buf.length)
+        throw new IllegalArgumentException();
+      if (position + length > buf.length)
+        throw new IllegalArgumentException();
+      if (length > buffer.length)
+        throw new IllegalArgumentException();
       
       System.arraycopy(buf, (int) position, buffer, offset, length);
       return length;
@@ -126,7 +131,8 @@ public class RFileTest extends TestCase 
       CachableBlockFile.Writer _cbw = new CachableBlockFile.Writer(dos, "gz", conf);
       writer = new RFile.Writer(_cbw, 1000);
       
-      if (startDLG) writer.startDefaultLocalityGroup();
+      if (startDLG)
+        writer.startDefaultLocalityGroup();
     }
     
     public void openWriter() throws IOException {
@@ -928,7 +934,8 @@ public class RFileTest extends TestCase 
     for (int i = 0; i < 1024; i++) {
       
       int m10 = i % 10;
-      if (m10 == 3 || m10 == 5 || m10 == 7) continue;
+      if (m10 == 3 || m10 == 5 || m10 == 7)
+        continue;
       
       trf.writer.append(nk(nf("i", i), m10 + "mod10", "", "", i + 2), nv("" + i));
       
@@ -961,11 +968,14 @@ public class RFileTest extends TestCase 
       
       // test excluding an individual column family
       trf.reader.seek(new Range(new Key(), true, null, true), ncfs(m + "mod10"), false);
-      if (m == 3) assertEquals(2, trf.reader.getNumLocalityGroupsSeeked());
-      else assertEquals(3, trf.reader.getNumLocalityGroupsSeeked());
+      if (m == 3)
+        assertEquals(2, trf.reader.getNumLocalityGroupsSeeked());
+      else
+        assertEquals(3, trf.reader.getNumLocalityGroupsSeeked());
       for (int i = 0; i < 1024; i++) {
         
-        if (i % 10 == m) continue;
+        if (i % 10 == m)
+          continue;
         
         assertTrue(trf.reader.hasTop());
         assertEquals(nk(nf("i", i), (i % 10) + "mod10", "", "", i + 2), trf.reader.getTopKey());

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/FamilyIntersectingIteratorTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/FamilyIntersectingIteratorTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/FamilyIntersectingIteratorTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/FamilyIntersectingIteratorTest.java Thu Oct 27 15:24:51 2011
@@ -131,11 +131,13 @@ public class FamilyIntersectingIteratorT
     TreeMap<Key,Value> inMemoryMap = createSortedMap(numRows, numDocsPerRow, columnFamilies, otherColumnFamilies, docs);
     trf.writer.startNewLocalityGroup("docs", RFileTest.ncfs(docColf.toString()));
     for (Entry<Key,Value> entry : inMemoryMap.entrySet()) {
-      if (entry.getKey().getColumnFamily().equals(docColf)) trf.writer.append(entry.getKey(), entry.getValue());
+      if (entry.getKey().getColumnFamily().equals(docColf))
+        trf.writer.append(entry.getKey(), entry.getValue());
     }
     trf.writer.startNewLocalityGroup("terms", RFileTest.ncfs(FamilyIntersectingIterator.DEFAULT_INDEX_COLF.toString()));
     for (Entry<Key,Value> entry : inMemoryMap.entrySet()) {
-      if (entry.getKey().getColumnFamily().equals(FamilyIntersectingIterator.DEFAULT_INDEX_COLF)) trf.writer.append(entry.getKey(), entry.getValue());
+      if (entry.getKey().getColumnFamily().equals(FamilyIntersectingIterator.DEFAULT_INDEX_COLF))
+        trf.writer.append(entry.getKey(), entry.getValue());
     }
     
     trf.closeWriter();

Modified: incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/FilteringIteratorTest.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/FilteringIteratorTest.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/FilteringIteratorTest.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/test/java/org/apache/accumulo/core/iterators/FilteringIteratorTest.java Thu Oct 27 15:24:51 2011
@@ -48,7 +48,8 @@ public class FilteringIteratorTest exten
   
   public class SimpleFilter implements Filter {
     public boolean accept(Key k, Value v) {
-      if (k.getRow().toString().endsWith("0")) return true;
+      if (k.getRow().toString().endsWith("0"))
+        return true;
       return false;
     }
     
@@ -58,7 +59,8 @@ public class FilteringIteratorTest exten
   
   public class SimpleFilter2 implements Filter {
     public boolean accept(Key k, Value v) {
-      if (k.getColumnFamily().toString().equals("a")) return false;
+      if (k.getColumnFamily().toString().equals("a"))
+        return false;
       return true;
     }
     



Mime
View raw message