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 [32/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/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java Thu Oct 27 15:24:51 2011
@@ -162,7 +162,8 @@ public class TabletServerBatchWriter {
         public void run() {
           try {
             synchronized (TabletServerBatchWriter.this) {
-              if ((System.currentTimeMillis() - lastProcessingStartTime) > TabletServerBatchWriter.this.maxLatency) startProcessing();
+              if ((System.currentTimeMillis() - lastProcessingStartTime) > TabletServerBatchWriter.this.maxLatency)
+                startProcessing();
             }
           } catch (Throwable t) {
             updateUnknownErrors("Max latency task failed " + t.getMessage(), t);
@@ -173,7 +174,8 @@ public class TabletServerBatchWriter {
   }
   
   private synchronized void startProcessing() {
-    if (mutations.getMemoryUsed() == 0) return;
+    if (mutations.getMemoryUsed() == 0)
+      return;
     lastProcessingStartTime = System.currentTimeMillis();
     writer.addMutations(mutations);
     mutations = new MutationSet();
@@ -186,8 +188,10 @@ public class TabletServerBatchWriter {
   
   public synchronized void addMutation(String table, Mutation m) throws MutationsRejectedException {
     
-    if (closed) throw new IllegalStateException("Closed");
-    if (m.size() == 0) throw new IllegalArgumentException("Can not add empty mutations");
+    if (closed)
+      throw new IllegalStateException("Closed");
+    if (m.size() == 0)
+      throw new IllegalArgumentException("Can not add empty mutations");
     
     checkForFailures();
     
@@ -196,7 +200,8 @@ public class TabletServerBatchWriter {
     }
     
     // do checks again since things could have changed while waiting and not holding lock
-    if (closed) throw new IllegalStateException("Closed");
+    if (closed)
+      throw new IllegalStateException("Closed");
     checkForFailures();
     
     if (startTime == 0) {
@@ -240,7 +245,8 @@ public class TabletServerBatchWriter {
   
   public synchronized void flush() throws MutationsRejectedException {
     
-    if (closed) throw new IllegalStateException("Closed");
+    if (closed)
+      throw new IllegalStateException("Closed");
     
     Span span = Trace.start("flush");
     
@@ -277,7 +283,8 @@ public class TabletServerBatchWriter {
   
   public synchronized void close() throws MutationsRejectedException {
     
-    if (closed) return;
+    if (closed)
+      return;
     
     Span span = Trace.start("close");
     try {
@@ -412,7 +419,8 @@ public class TabletServerBatchWriter {
       
       Tables.clearCache(instance);
       for (String tableId : tableIds)
-        if (!Tables.exists(instance, tableId)) throw new TableDeletedException(tableId);
+        if (!Tables.exists(instance, tableId))
+          throw new TableDeletedException(tableId);
       
       synchronized (this) {
         somethingFailed = true;
@@ -434,8 +442,10 @@ public class TabletServerBatchWriter {
     unknownErrors++;
     this.lastUnknownError = t;
     this.notifyAll();
-    if (t instanceof TableDeletedException || t instanceof TableOfflineException) log.debug(msg, t); // this is not unknown
-    else log.error(msg, t);
+    if (t instanceof TableDeletedException || t instanceof TableOfflineException)
+      log.debug(msg, t); // this is not unknown
+    else
+      log.error(msg, t);
   }
   
   private void checkForFailures() throws MutationsRejectedException {
@@ -508,7 +518,8 @@ public class TabletServerBatchWriter {
         }
         
         if (rf != null) {
-          if (log.isTraceEnabled()) log.trace("requeuing " + rf.size() + " failed mutations");
+          if (log.isTraceEnabled())
+            log.trace("requeuing " + rf.size() + " failed mutations");
           addFailedMutations(rf);
         }
       } catch (Throwable t) {
@@ -551,8 +562,11 @@ public class TabletServerBatchWriter {
             if (tableFailures.size() > 0) {
               failedMutations.add(table, tableFailures);
               
-              if (tableFailures.size() == tableMutations.size()) if (!Tables.exists(instance, entry.getKey())) throw new TableDeletedException(entry.getKey());
-              else if (Tables.getTableState(instance, table) == TableState.OFFLINE) throw new TableOfflineException(instance, entry.getKey());
+              if (tableFailures.size() == tableMutations.size())
+                if (!Tables.exists(instance, entry.getKey()))
+                  throw new TableDeletedException(entry.getKey());
+                else if (Tables.getTableState(instance, table) == TableState.OFFLINE)
+                  throw new TableOfflineException(instance, entry.getKey());
             }
           }
           
@@ -612,13 +626,14 @@ public class TabletServerBatchWriter {
           }
         }
         
-        if (log.isTraceEnabled()) for (Entry<KeyExtent,List<Mutation>> entry2 : entry.getValue().getMutations().entrySet())
-          count += entry2.getValue().size();
+        if (log.isTraceEnabled())
+          for (Entry<KeyExtent,List<Mutation>> entry2 : entry.getValue().getMutations().entrySet())
+            count += entry2.getValue().size();
         
       }
       
-      if (count > 0 && log.isTraceEnabled()) log.trace(String.format("Started sending %,d mutations to %,d tablet servers", count, binnedMutations.keySet()
-          .size()));
+      if (count > 0 && log.isTraceEnabled())
+        log.trace(String.format("Started sending %,d mutations to %,d tablet servers", count, binnedMutations.keySet().size()));
       
       // randomize order of servers
       ArrayList<String> servers = new ArrayList<String>(binnedMutations.keySet());
@@ -633,7 +648,8 @@ public class TabletServerBatchWriter {
     
     private synchronized TabletServerMutations getMutationsToSend(String server) {
       TabletServerMutations tsmuts = serversMutations.remove(server);
-      if (tsmuts == null) queued.remove(server);
+      if (tsmuts == null)
+        queued.remove(server);
       
       return tsmuts;
     }
@@ -683,8 +699,9 @@ public class TabletServerBatchWriter {
             long st1 = System.currentTimeMillis();
             failures = sendMutationsToTabletServer(location, mutationBatch);
             long st2 = System.currentTimeMillis();
-            if (log.isTraceEnabled()) log.trace("sent " + String.format("%,d", count) + " mutations to " + location + " in "
-                + String.format("%.2f secs (%,.2f mutations/sec) with %,d failures", (st2 - st1) / 1000.0, count / ((st2 - st1) / 1000.0), failures.size()));
+            if (log.isTraceEnabled())
+              log.trace("sent " + String.format("%,d", count) + " mutations to " + location + " in "
+                  + String.format("%.2f secs (%,.2f mutations/sec) with %,d failures", (st2 - st1) / 1000.0, count / ((st2 - st1) / 1000.0), failures.size()));
             
             long successBytes = 0;
             for (Entry<KeyExtent,List<Mutation>> entry : mutationBatch.entrySet()) {
@@ -705,7 +722,8 @@ public class TabletServerBatchWriter {
             span.stop();
           }
         } catch (IOException e) {
-          if (log.isTraceEnabled()) log.trace("failed to send mutations to " + location + " : " + e.getMessage());
+          if (log.isTraceEnabled())
+            log.trace("failed to send mutations to " + location + " : " + e.getMessage());
           
           HashSet<String> tables = new HashSet<String>();
           for (KeyExtent ke : mutationBatch.keySet())

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletType.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletType.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletType.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletType.java Thu Oct 27 15:24:51 2011
@@ -25,19 +25,24 @@ public enum TabletType {
   ROOT, METADATA, USER;
   
   public static TabletType type(KeyExtent ke) {
-    if (ke.equals(Constants.ROOT_TABLET_EXTENT)) return ROOT;
-    if (ke.getTableId().toString().equals(Constants.METADATA_TABLE_ID)) return METADATA;
+    if (ke.equals(Constants.ROOT_TABLET_EXTENT))
+      return ROOT;
+    if (ke.getTableId().toString().equals(Constants.METADATA_TABLE_ID))
+      return METADATA;
     return USER;
   }
   
   public static TabletType type(Collection<KeyExtent> extents) {
-    if (extents.size() == 0) throw new IllegalArgumentException();
+    if (extents.size() == 0)
+      throw new IllegalArgumentException();
     
     TabletType ttype = null;
     
     for (KeyExtent extent : extents) {
-      if (ttype == null) ttype = type(extent);
-      else if (ttype != type(extent)) throw new IllegalArgumentException("multiple extent types not allowed " + ttype + " " + type(extent));
+      if (ttype == null)
+        ttype = type(extent);
+      else if (ttype != type(extent))
+        throw new IllegalArgumentException("multiple extent types not allowed " + ttype + " " + type(extent));
     }
     
     return ttype;

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java Thu Oct 27 15:24:51 2011
@@ -92,10 +92,13 @@ public class ThriftScanner {
       
       startKey = new Key(TextUtil.getBytes(startRow), cf, cq == null ? EMPTY_BYTES : cq, cv == null ? EMPTY_BYTES : cv, Long.MAX_VALUE);
       
-    } else startKey = new Key(startRow);
+    } else
+      startKey = new Key(startRow);
     
-    if (skipStartKey) startKey = startKey.followingKey(PartialKey.ROW);
-    else startKey.setTimestamp(Long.MAX_VALUE);
+    if (skipStartKey)
+      startKey = startKey.followingKey(PartialKey.ROW);
+    else
+      startKey.setTimestamp(Long.MAX_VALUE);
     
     return getBatchFromServer(credentials, startKey, (Key) null, extent, server, results, fetchedColumns, size, authorizations, retry, conf);
   }
@@ -109,7 +112,8 @@ public class ThriftScanner {
   static boolean getBatchFromServer(AuthInfo credentials, Range range, KeyExtent extent, String server, SortedMap<Key,Value> results,
       SortedSet<Column> fetchedColumns, int size, Authorizations authorizations, boolean retry, AccumuloConfiguration conf) throws AccumuloException,
       AccumuloSecurityException, NotServingTabletException {
-    if (server == null) throw new AccumuloException(new IOException());
+    if (server == null)
+      throw new AccumuloException(new IOException());
     
     try {
       TabletClientService.Iface client = ThriftUtil.getTServerClient(server, conf);
@@ -124,7 +128,8 @@ public class ThriftScanner {
         InitialScan isr = client.startScan(null, scanState.credentials, extent.toThrift(), scanState.range.toThrift(),
             Translator.translate(scanState.columns, Translator.CT), scanState.size, scanState.serverSideIteratorList, scanState.serverSideIteratorOptions,
             scanState.authorizations.getAuthorizationsBB(), waitForWrites, scanState.isolated);
-        if (waitForWrites) serversWaitedForWrites.get(ttype).add(server);
+        if (waitForWrites)
+          serversWaitedForWrites.get(ttype).add(server);
         
         Key.decompress(isr.result.results);
         
@@ -227,23 +232,28 @@ public class ThriftScanner {
     try {
       while (results == null && !scanState.finished) {
         
-        if ((System.currentTimeMillis() - startTime) / 1000.0 > timeOut) throw new ScanTimedOutException();
+        if ((System.currentTimeMillis() - startTime) / 1000.0 > timeOut)
+          throw new ScanTimedOutException();
         
         while (loc == null) {
           long currentTime = System.currentTimeMillis();
-          if ((currentTime - startTime) / 1000.0 > timeOut) throw new ScanTimedOutException();
+          if ((currentTime - startTime) / 1000.0 > timeOut)
+            throw new ScanTimedOutException();
           
           Span locateSpan = Trace.start("scan:locateTablet");
           try {
             loc = TabletLocator.getInstance(instance, credentials, scanState.tableName).locateTablet(scanState.startRow, scanState.skipStartRow, false);
             if (loc == null) {
-              if (!Tables.exists(instance, scanState.tableName.toString())) throw new TableDeletedException(scanState.tableName.toString());
-              else if (Tables.getTableState(instance, scanState.tableName.toString()) == TableState.OFFLINE) throw new TableOfflineException(instance,
-                  scanState.tableName.toString());
+              if (!Tables.exists(instance, scanState.tableName.toString()))
+                throw new TableDeletedException(scanState.tableName.toString());
+              else if (Tables.getTableState(instance, scanState.tableName.toString()) == TableState.OFFLINE)
+                throw new TableOfflineException(instance, scanState.tableName.toString());
               
               error = "Failed to locate tablet for table : " + scanState.tableName + " row : " + scanState.startRow;
-              if (!error.equals(lastError)) log.debug(error);
-              else if (log.isTraceEnabled()) log.trace(error);
+              if (!error.equals(lastError))
+                log.debug(error);
+              else if (log.isTraceEnabled())
+                log.trace(error);
               lastError = error;
               UtilWaitThread.sleep(100);
             } else {
@@ -267,8 +277,10 @@ public class ThriftScanner {
             throw e;
           } catch (AccumuloException e) {
             error = "exception from tablet loc " + e.getMessage();
-            if (!error.equals(lastError)) log.debug(error);
-            else if (log.isTraceEnabled()) log.trace(error);
+            if (!error.equals(lastError))
+              log.debug(error);
+            else if (log.isTraceEnabled())
+              log.trace(error);
             
             lastError = error;
             UtilWaitThread.sleep(100);
@@ -283,14 +295,17 @@ public class ThriftScanner {
           results = scan(loc, scanState, conf);
         } catch (AccumuloSecurityException e) {
           Tables.clearCache(instance);
-          if (!Tables.exists(instance, scanState.tableName.toString())) throw new TableDeletedException(scanState.tableName.toString());
+          if (!Tables.exists(instance, scanState.tableName.toString()))
+            throw new TableDeletedException(scanState.tableName.toString());
           throw e;
         } catch (TApplicationException tae) {
           throw new AccumuloServerException(loc.tablet_location, tae);
         } catch (NotServingTabletException e) {
           error = "Scan failed, not serving tablet " + loc;
-          if (!error.equals(lastError)) log.debug(error);
-          else if (log.isTraceEnabled()) log.trace(error);
+          if (!error.equals(lastError))
+            log.debug(error);
+          else if (log.isTraceEnabled())
+            log.trace(error);
           lastError = error;
           
           TabletLocator.getInstance(instance, credentials, scanState.tableName).invalidateCache(loc.tablet_extent);
@@ -299,14 +314,17 @@ public class ThriftScanner {
           // no need to try the current scan id somewhere else
           scanState.scanID = null;
           
-          if (scanState.isolated) throw new IsolationException();
+          if (scanState.isolated)
+            throw new IsolationException();
           
           UtilWaitThread.sleep(100);
         } catch (TException e) {
           TabletLocator.getInstance(instance, credentials, scanState.tableName).invalidateCache(loc.tablet_location);
           error = "Scan failed, thrift error " + e.getClass().getName() + "  " + e.getMessage() + " " + loc;
-          if (!error.equals(lastError)) log.debug(error);
-          else if (log.isTraceEnabled()) log.trace(error);
+          if (!error.equals(lastError))
+            log.debug(error);
+          else if (log.isTraceEnabled())
+            log.trace(error);
           lastError = error;
           loc = null;
           
@@ -314,16 +332,20 @@ public class ThriftScanner {
           // because a thread on the server side may still be processing the timed out continue scan
           scanState.scanID = null;
           
-          if (scanState.isolated) throw new IsolationException();
+          if (scanState.isolated)
+            throw new IsolationException();
           
           UtilWaitThread.sleep(100);
         } catch (NoSuchScanIDException e) {
           error = "Scan failed, no such scan id " + scanState.scanID + " " + loc;
-          if (!error.equals(lastError)) log.debug(error);
-          else if (log.isTraceEnabled()) log.trace(error);
+          if (!error.equals(lastError))
+            log.debug(error);
+          else if (log.isTraceEnabled())
+            log.trace(error);
           lastError = error;
           
-          if (scanState.isolated) throw new IsolationException();
+          if (scanState.isolated)
+            throw new IsolationException();
           
           scanState.scanID = null;
         } catch (TooManyFilesException e) {
@@ -333,8 +355,10 @@ public class ThriftScanner {
             tooManyFilesCount = 0;
           } else {
             tooManyFilesCount++;
-            if (tooManyFilesCount == 300) log.warn(error);
-            else if (log.isTraceEnabled()) log.trace(error);
+            if (tooManyFilesCount == 300)
+              log.warn(error);
+            else if (log.isTraceEnabled())
+              log.trace(error);
           }
           lastError = error;
           
@@ -343,7 +367,8 @@ public class ThriftScanner {
           // scan session
           scanState.scanID = null;
           
-          if (scanState.isolated) throw new IsolationException();
+          if (scanState.isolated)
+            throw new IsolationException();
           
           UtilWaitThread.sleep(100);
         } finally {
@@ -363,7 +388,8 @@ public class ThriftScanner {
   
   private static List<KeyValue> scan(TabletLocation loc, ScanState scanState, AccumuloConfiguration conf) throws AccumuloSecurityException,
       NotServingTabletException, TException, NoSuchScanIDException, TooManyFilesException {
-    if (scanState.finished) return null;
+    if (scanState.finished)
+      return null;
     
     OpTimer opTimer = new OpTimer(log, Level.TRACE);
     
@@ -373,7 +399,8 @@ public class ThriftScanner {
     try {
       ScanResult sr;
       
-      if (scanState.prevLoc != null && !scanState.prevLoc.equals(loc)) scanState.scanID = null;
+      if (scanState.prevLoc != null && !scanState.prevLoc.equals(loc))
+        scanState.scanID = null;
       
       scanState.prevLoc = loc;
       
@@ -388,12 +415,15 @@ public class ThriftScanner {
         InitialScan is = client.startScan(null, scanState.credentials, loc.tablet_extent.toThrift(), scanState.range.toThrift(),
             Translator.translate(scanState.columns, Translator.CT), scanState.size, scanState.serverSideIteratorList, scanState.serverSideIteratorOptions,
             scanState.authorizations.getAuthorizationsBB(), waitForWrites, scanState.isolated);
-        if (waitForWrites) serversWaitedForWrites.get(ttype).add(loc.tablet_location);
+        if (waitForWrites)
+          serversWaitedForWrites.get(ttype).add(loc.tablet_location);
         
         sr = is.result;
         
-        if (sr.more) scanState.scanID = is.scanID;
-        else client.closeScan(null, is.scanID);
+        if (sr.more)
+          scanState.scanID = is.scanID;
+        else
+          client.closeScan(null, is.scanID);
         
       } else {
         // log.debug("Calling continue scan : "+scanState.range+"  loc = "+loc);
@@ -427,8 +457,8 @@ public class ThriftScanner {
       
       Key.decompress(sr.results);
       
-      if (sr.results.size() > 0 && !scanState.finished) scanState.range = new Range(new Key(sr.results.get(sr.results.size() - 1).key), false,
-          scanState.range.getEndKey(), scanState.range.isEndKeyInclusive());
+      if (sr.results.size() > 0 && !scanState.finished)
+        scanState.range = new Range(new Key(sr.results.get(sr.results.size() - 1).key), false, scanState.range.getEndKey(), scanState.range.isEndKeyInclusive());
       
       List<KeyValue> results = new ArrayList<KeyValue>(sr.results.size());
       for (TKeyValue tkv : sr.results)

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java Thu Oct 27 15:24:51 2011
@@ -46,14 +46,16 @@ class ThriftTransportKey {
   
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof ThriftTransportKey)) return false;
+    if (!(o instanceof ThriftTransportKey))
+      return false;
     ThriftTransportKey ttk = (ThriftTransportKey) o;
     return location.equals(ttk.location) && port == ttk.port && timeout == ttk.timeout;
   }
   
   @Override
   public int hashCode() {
-    if (hash == -1) hash = (location + Integer.toString(port) + Long.toString(timeout)).hashCode();
+    if (hash == -1)
+      hash = (location + Integer.toString(port) + Long.toString(timeout)).hashCode();
     return hash;
   }
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java Thu Oct 27 15:24:51 2011
@@ -383,7 +383,8 @@ public class ThriftTransportPool {
           for (CachedConnection cachedConnection : entry.getValue()) {
             if (!cachedConnection.isReserved()) {
               cachedConnection.setReserved(true);
-              if (log.isTraceEnabled()) log.trace("Using existing connection to " + entry.getKey().getLocation() + ":" + entry.getKey().getPort());
+              if (log.isTraceEnabled())
+                log.trace("Using existing connection to " + entry.getKey().getLocation() + ":" + entry.getKey().getPort());
               return cachedConnection.transport;
             }
           }
@@ -423,7 +424,8 @@ public class ThriftTransportPool {
       for (CachedConnection cachedConnection : ccl) {
         if (!cachedConnection.isReserved()) {
           cachedConnection.setReserved(true);
-          if (log.isTraceEnabled()) log.trace("Using existing connection to " + cacheKey.getLocation() + ":" + cacheKey.getPort());
+          if (log.isTraceEnabled())
+            log.trace("Using existing connection to " + cacheKey.getLocation() + ":" + cacheKey.getPort());
           return cachedConnection.transport;
         }
       }
@@ -446,7 +448,8 @@ public class ThriftTransportPool {
     transport = ThriftUtil.transportFactory().getTransport(transport);
     transport.open();
     
-    if (log.isTraceEnabled()) log.trace("Creating new connection to connection to " + cacheKey.getLocation() + ":" + cacheKey.getPort());
+    if (log.isTraceEnabled())
+      log.trace("Creating new connection to connection to " + cacheKey.getLocation() + ":" + cacheKey.getPort());
     
     CachedTTransport tsc = new CachedTTransport(transport, cacheKey);
     
@@ -483,10 +486,12 @@ public class ThriftTransportPool {
             tsc.close();
             iterator.remove();
             
-            if (log.isTraceEnabled()) log.trace("Returned connection had error " + ctsc.getCacheKey());
+            if (log.isTraceEnabled())
+              log.trace("Returned connection had error " + ctsc.getCacheKey());
             
             Long ecount = errorCount.get(ctsc.getCacheKey());
-            if (ecount == null) ecount = 0l;
+            if (ecount == null)
+              ecount = 0l;
             ecount++;
             errorCount.put(ctsc.getCacheKey(), ecount);
             
@@ -504,7 +509,8 @@ public class ThriftTransportPool {
             
           } else {
             
-            if (log.isTraceEnabled()) log.trace("Returned connection " + ctsc.getCacheKey() + " ioCount : " + cachedConnection.transport.ioCount);
+            if (log.isTraceEnabled())
+              log.trace("Returned connection " + ctsc.getCacheKey() + " ioCount : " + cachedConnection.transport.ioCount);
             
             cachedConnection.lastReturnTime = System.currentTimeMillis();
             cachedConnection.setReserved(false);

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/Trie.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/Trie.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/Trie.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/Trie.java Thu Oct 27 15:24:51 2011
@@ -99,8 +99,10 @@ public class Trie<VT> {
       int index = 0xff & key.byteAt(depth);
       
       if (children[index] == null) {
-        if (depth + 1 < maxDepth) children[index] = new InnerNode<V>(depth + 1);
-        else children[index] = new LeafNode<V>(depth + 1);
+        if (depth + 1 < maxDepth)
+          children[index] = new InnerNode<V>(depth + 1);
+        else
+          children[index] = new LeafNode<V>(depth + 1);
         
         if (minIndex == 256) {
           next[index] = children[index];
@@ -117,7 +119,8 @@ public class Trie<VT> {
           
           next[index] = children[index];
         } else {
-          if (next[index] == null) throw new IllegalStateException("next[" + index + "] == null");
+          if (next[index] == null)
+            throw new IllegalStateException("next[" + index + "] == null");
           
           int bindex = index - 1;
           while (children[bindex] == null)
@@ -149,7 +152,8 @@ public class Trie<VT> {
       if (children[index] != null) {
         V ret = children[index].remove(key);
         if (children[index].isEmpty()) {
-          if (next[index] != children[index]) throw new IllegalStateException("next[" + index + "] != children[" + index + "]");
+          if (next[index] != children[index])
+            throw new IllegalStateException("next[" + index + "] != children[" + index + "]");
           
           if (index == minIndex && index == maxIndex) {
             minIndex = 256;
@@ -195,17 +199,21 @@ public class Trie<VT> {
       if (depth < text.length()) {
         int index = 0xff & text.byteAt(depth);
         
-        if (index > maxIndex) return pnext.findMin();
+        if (index > maxIndex)
+          return pnext.findMin();
         
-        if (index < minIndex) return children[minIndex].findMin();
+        if (index < minIndex)
+          return children[minIndex].findMin();
         
         TrieNode<V> child = children[index];
         
-        if (index == maxIndex) return child.ceilingEntry(text, pnext);
+        if (index == maxIndex)
+          return child.ceilingEntry(text, pnext);
         
         TrieNode<V> nextChild = next[index + 1];
         
-        if (child != null) return child.ceilingEntry(text, nextChild);
+        if (child != null)
+          return child.ceilingEntry(text, nextChild);
         
         return nextChild.findMin();
         
@@ -218,9 +226,11 @@ public class Trie<VT> {
     
     @Override
     Entry<ByteSequence,V> findMin() {
-      if (entry != null) return entry;
+      if (entry != null)
+        return entry;
       
-      if (minIndex == 256) return null;
+      if (minIndex == 256)
+        return null;
       
       return children[minIndex].findMin();
     }
@@ -261,14 +271,16 @@ public class Trie<VT> {
     @Override
     Entry<ByteSequence,V> ceilingEntry(ByteSequence text, TrieNode<V> pnext) {
       Entry<ByteSequence,V> entry = map.ceilingEntry(text);
-      if (entry != null) return entry;
+      if (entry != null)
+        return entry;
       return pnext.findMin();
     }
     
     @Override
     Entry<ByteSequence,V> findMin() {
       Entry<ByteSequence,V> entry = map.firstEntry();
-      if (entry != null) return entry;
+      if (entry != null)
+        return entry;
       
       return null;
     }
@@ -332,7 +344,8 @@ public class Trie<VT> {
   }
   
   public void add(Text key, VT value) {
-    if (value == null) throw new IllegalArgumentException();
+    if (value == null)
+      throw new IllegalArgumentException();
     rootNode.add(new ArrayByteSequence(key.getBytes(), 0, key.getLength()), value);
   }
   
@@ -342,7 +355,8 @@ public class Trie<VT> {
   
   public VT ceiling(ByteSequence key) {
     Entry<ByteSequence,VT> entry = rootNode.ceilingEntry(key, searchNode);
-    if (entry == null) return null;
+    if (entry == null)
+      return null;
     return entry.getValue();
   }
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java Thu Oct 27 15:24:51 2011
@@ -79,7 +79,8 @@ public class Writer {
   public void update(Mutation m) throws AccumuloException, AccumuloSecurityException, ConstraintViolationException, TableNotFoundException {
     ArgumentChecker.notNull(m);
     
-    if (m.size() == 0) throw new IllegalArgumentException("Can not add empty mutations");
+    if (m.size() == 0)
+      throw new IllegalArgumentException("Can not add empty mutations");
     
     while (true) {
       TabletLocation tabLoc = TabletLocator.getInstance(instance, credentials, table).locateTablet(new Text(m.getRow()), false, true);

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java Thu Oct 27 15:24:51 2011
@@ -59,7 +59,8 @@ public class AccumuloFileOutputFormat ex
     final Configuration conf = job.getConfiguration();
     
     String extension = conf.get(FILE_TYPE);
-    if (extension == null || extension.isEmpty()) extension = RFile.EXTENSION;
+    if (extension == null || extension.isEmpty())
+      extension = RFile.EXTENSION;
     
     handleBlockSize(job);
     final Path file = this.getDefaultWorkFile(job, "." + extension);
@@ -120,7 +121,8 @@ public class AccumuloFileOutputFormat ex
    */
   public static void setZooKeeperInstance(JobContext job, String instanceName, String zooKeepers) {
     Configuration conf = job.getConfiguration();
-    if (conf.getBoolean(INSTANCE_HAS_BEEN_SET, false)) throw new IllegalStateException("Instance info can only be set once per job");
+    if (conf.getBoolean(INSTANCE_HAS_BEEN_SET, false))
+      throw new IllegalStateException("Instance info can only be set once per job");
     conf.setBoolean(INSTANCE_HAS_BEEN_SET, true);
     
     ArgumentChecker.notNull(instanceName, zooKeepers);

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java Thu Oct 27 15:24:51 2011
@@ -52,7 +52,8 @@ public class AccumuloInputFormat extends
           Entry<Key,Value> entry = scannerIterator.next();
           currentK = currentKey = entry.getKey();
           currentV = currentValue = entry.getValue();
-          if (log.isTraceEnabled()) log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true));
+          if (log.isTraceEnabled())
+            log.trace("Processing key/value pair: " + DefaultFormatter.formatEntry(entry, true));
           return true;
         }
         return false;

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java Thu Oct 27 15:24:51 2011
@@ -102,19 +102,22 @@ public class AccumuloOutputFormat extend
    */
   public static void setOutputInfo(JobContext job, String user, byte[] passwd, boolean createTables, String defaultTable) {
     Configuration conf = job.getConfiguration();
-    if (conf.getBoolean(OUTPUT_INFO_HAS_BEEN_SET, false)) throw new IllegalStateException("Output info can only be set once per job");
+    if (conf.getBoolean(OUTPUT_INFO_HAS_BEEN_SET, false))
+      throw new IllegalStateException("Output info can only be set once per job");
     conf.setBoolean(OUTPUT_INFO_HAS_BEEN_SET, true);
     
     ArgumentChecker.notNull(user, passwd);
     conf.set(USERNAME, user);
     conf.set(PASSWORD, new String(Base64.encodeBase64(passwd)));
     conf.setBoolean(CREATETABLES, createTables);
-    if (defaultTable != null) conf.set(DEFAULT_TABLE_NAME, defaultTable);
+    if (defaultTable != null)
+      conf.set(DEFAULT_TABLE_NAME, defaultTable);
   }
   
   public static void setZooKeeperInstance(JobContext job, String instanceName, String zooKeepers) {
     Configuration conf = job.getConfiguration();
-    if (conf.getBoolean(INSTANCE_HAS_BEEN_SET, false)) throw new IllegalStateException("Instance info can only be set once per job");
+    if (conf.getBoolean(INSTANCE_HAS_BEEN_SET, false))
+      throw new IllegalStateException("Instance info can only be set once per job");
     conf.setBoolean(INSTANCE_HAS_BEEN_SET, true);
     
     ArgumentChecker.notNull(instanceName, zooKeepers);
@@ -181,7 +184,8 @@ public class AccumuloOutputFormat extend
   }
   
   protected static Level getLogLevel(JobContext job) {
-    if (job.getConfiguration().get(LOGLEVEL) != null) return Level.toLevel(job.getConfiguration().getInt(LOGLEVEL, Level.INFO.toInt()));
+    if (job.getConfiguration().get(LOGLEVEL) != null)
+      return Level.toLevel(job.getConfiguration().getInt(LOGLEVEL, Level.INFO.toInt()));
     return null;
   }
   
@@ -204,11 +208,13 @@ public class AccumuloOutputFormat extend
     
     AccumuloRecordWriter(TaskAttemptContext attempt) throws AccumuloException, AccumuloSecurityException {
       Level l = getLogLevel(attempt);
-      if (l != null) log.setLevel(getLogLevel(attempt));
+      if (l != null)
+        log.setLevel(getLogLevel(attempt));
       this.simulate = getSimulationMode(attempt);
       this.createTables = canCreateTables(attempt);
       
-      if (simulate) log.info("Simulating output only. No writes to tables will occur");
+      if (simulate)
+        log.info("Simulating output only. No writes to tables will occur");
       
       this.bws = new HashMap<Text,BatchWriter>();
       
@@ -227,22 +233,26 @@ public class AccumuloOutputFormat extend
      */
     @Override
     public void write(Text table, Mutation mutation) throws IOException {
-      if (table == null || table.toString().isEmpty()) table = this.defaultTableName;
+      if (table == null || table.toString().isEmpty())
+        table = this.defaultTableName;
       
-      if (!simulate && table == null) throw new IOException("No table or default table specified. Try simulation mode next time");
+      if (!simulate && table == null)
+        throw new IOException("No table or default table specified. Try simulation mode next time");
       
       ++mutCount;
       valCount += mutation.size();
       printMutation(table, mutation);
       
-      if (simulate) return;
+      if (simulate)
+        return;
       
-      if (!bws.containsKey(table)) try {
-        addTable(table);
-      } catch (Exception e) {
-        e.printStackTrace();
-        throw new IOException(e);
-      }
+      if (!bws.containsKey(table))
+        try {
+          addTable(table);
+        } catch (Exception e) {
+          e.printStackTrace();
+          throw new IOException(e);
+        }
       
       try {
         bws.get(table).addMutation(mutation);
@@ -283,7 +293,8 @@ public class AccumuloOutputFormat extend
         throw e;
       }
       
-      if (bw != null) bws.put(tableName, bw);
+      if (bw != null)
+        bws.put(tableName, bw);
     }
     
     private int printMutation(Text table, Mutation m) {
@@ -301,8 +312,10 @@ public class AccumuloOutputFormat extend
     private String hexDump(byte[] ba) {
       StringBuilder sb = new StringBuilder();
       for (byte b : ba) {
-        if ((b > 0x20) && (b < 0x7e)) sb.append((char) b);
-        else sb.append(String.format("x%02x", b));
+        if ((b > 0x20) && (b < 0x7e))
+          sb.append((char) b);
+        else
+          sb.append(String.format("x%02x", b));
       }
       return sb.toString();
     }
@@ -310,7 +323,8 @@ public class AccumuloOutputFormat extend
     @Override
     public void close(TaskAttemptContext attempt) throws IOException, InterruptedException {
       log.debug("mutations written: " + mutCount + ", values written: " + valCount);
-      if (simulate) return;
+      if (simulate)
+        return;
       
       try {
         mtbw.close();
@@ -334,11 +348,14 @@ public class AccumuloOutputFormat extend
   @Override
   public void checkOutputSpecs(JobContext job) throws IOException {
     Configuration conf = job.getConfiguration();
-    if (!conf.getBoolean(OUTPUT_INFO_HAS_BEEN_SET, false)) throw new IOException("Output info has not been set.");
-    if (!conf.getBoolean(INSTANCE_HAS_BEEN_SET, false)) throw new IOException("Instance info has not been set.");
+    if (!conf.getBoolean(OUTPUT_INFO_HAS_BEEN_SET, false))
+      throw new IOException("Output info has not been set.");
+    if (!conf.getBoolean(INSTANCE_HAS_BEEN_SET, false))
+      throw new IOException("Instance info has not been set.");
     try {
       Connector c = getInstance(job).getConnector(getUsername(job), getPassword(job));
-      if (!c.securityOperations().authenticateUser(getUsername(job), getPassword(job))) throw new IOException("Unable to authenticate user");
+      if (!c.securityOperations().authenticateUser(getUsername(job), getPassword(job)))
+        throw new IOException("Unable to authenticate user");
     } catch (AccumuloException e) {
       throw new IOException(e);
     } catch (AccumuloSecurityException e) {

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormat.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormat.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormat.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormat.java Thu Oct 27 15:24:51 2011
@@ -45,7 +45,8 @@ public class AccumuloRowInputFormat exte
       
       @Override
       public boolean nextKeyValue() throws IOException, InterruptedException {
-        if (!rowIterator.hasNext()) return false;
+        if (!rowIterator.hasNext())
+          return false;
         currentV = new PeekingIterator<Entry<Key,Value>>(rowIterator.next());
         numKeysRead = rowIterator.getKVCount();
         currentKey = currentV.peek().getKey();

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java Thu Oct 27 15:24:51 2011
@@ -163,19 +163,22 @@ public abstract class InputFormatBase<K,
   
   public static void setInputInfo(JobContext job, String user, byte[] passwd, String table, Authorizations auths) {
     Configuration conf = job.getConfiguration();
-    if (conf.getBoolean(INPUT_INFO_HAS_BEEN_SET, false)) throw new IllegalStateException("Input info can only be set once per job");
+    if (conf.getBoolean(INPUT_INFO_HAS_BEEN_SET, false))
+      throw new IllegalStateException("Input info can only be set once per job");
     conf.setBoolean(INPUT_INFO_HAS_BEEN_SET, true);
     
     ArgumentChecker.notNull(user, passwd, table);
     conf.set(USERNAME, user);
     conf.set(PASSWORD, new String(Base64.encodeBase64(passwd)));
     conf.set(TABLE_NAME, table);
-    if (auths != null && !auths.isEmpty()) conf.set(AUTHORIZATIONS, auths.serialize());
+    if (auths != null && !auths.isEmpty())
+      conf.set(AUTHORIZATIONS, auths.serialize());
   }
   
   public static void setZooKeeperInstance(JobContext job, String instanceName, String zooKeepers) {
     Configuration conf = job.getConfiguration();
-    if (conf.getBoolean(INSTANCE_HAS_BEEN_SET, false)) throw new IllegalStateException("Instance info can only be set once per job");
+    if (conf.getBoolean(INSTANCE_HAS_BEEN_SET, false))
+      throw new IllegalStateException("Instance info can only be set once per job");
     conf.setBoolean(INSTANCE_HAS_BEEN_SET, true);
     
     ArgumentChecker.notNull(instanceName, zooKeepers);
@@ -258,7 +261,8 @@ public abstract class InputFormatBase<K,
    * @throws IOException
    */
   public static void setMaxVersions(JobContext job, int maxVersions) throws IOException {
-    if (maxVersions < 1) throw new IOException("Invalid maxVersions: " + maxVersions + ".  Must be >= 1");
+    if (maxVersions < 1)
+      throw new IOException("Invalid maxVersions: " + maxVersions + ".  Must be >= 1");
     job.getConfiguration().setInt(MAX_VERSIONS, maxVersions);
   }
   
@@ -272,10 +276,12 @@ public abstract class InputFormatBase<K,
     ArgumentChecker.notNull(columnFamilyColumnQualifierPairs);
     ArrayList<String> columnStrings = new ArrayList<String>(columnFamilyColumnQualifierPairs.size());
     for (Pair<Text,Text> column : columnFamilyColumnQualifierPairs) {
-      if (column.getFirst() == null) throw new IllegalArgumentException("Column family can not be null");
+      if (column.getFirst() == null)
+        throw new IllegalArgumentException("Column family can not be null");
       
       String col = new String(Base64.encodeBase64(TextUtil.getBytes(column.getFirst())));
-      if (column.getSecond() != null) col += ":" + new String(Base64.encodeBase64(TextUtil.getBytes(column.getSecond())));
+      if (column.getSecond() != null)
+        col += ":" + new String(Base64.encodeBase64(TextUtil.getBytes(column.getSecond())));
       columnStrings.add(col);
     }
     job.getConfiguration().setStrings(COLUMNS, columnStrings.toArray(new String[0]));
@@ -311,7 +317,8 @@ public abstract class InputFormatBase<K,
     // Store the iterators w/ the job
     job.getConfiguration().set(ITERATORS, iterators);
     for (Entry<String,String> entry : cfg.getProperties().entrySet()) {
-      if (entry.getValue() == null) continue;
+      if (entry.getValue() == null)
+        continue;
       
       String iteratorOptions = job.getConfiguration().get(ITERATORS_OPTIONS);
       
@@ -374,7 +381,8 @@ public abstract class InputFormatBase<K,
    * @deprecated since 1.4, see {@link #addIterator(JobContext, IteratorSetting)}
    */
   public static void setIteratorOption(JobContext job, String iteratorName, String key, String value) {
-    if (value == null) return;
+    if (value == null)
+      return;
     
     String iteratorOptions = job.getConfiguration().get(ITERATORS_OPTIONS);
     
@@ -421,12 +429,14 @@ public abstract class InputFormatBase<K,
   
   protected static Instance getInstance(JobContext job) {
     Configuration conf = job.getConfiguration();
-    if (conf.getBoolean(MOCK, false)) return new MockInstance(conf.get(INSTANCE_NAME));
+    if (conf.getBoolean(MOCK, false))
+      return new MockInstance(conf.get(INSTANCE_NAME));
     return new ZooKeeperInstance(conf.get(INSTANCE_NAME), conf.get(ZOOKEEPERS));
   }
   
   protected static TabletLocator getTabletLocator(JobContext job) throws TableNotFoundException {
-    if (job.getConfiguration().getBoolean(MOCK, false)) return new MockTabletLocator();
+    if (job.getConfiguration().getBoolean(MOCK, false))
+      return new MockTabletLocator();
     Instance instance = getInstance(job);
     String username = getUsername(job);
     byte[] password = getPassword(job);
@@ -466,7 +476,8 @@ public abstract class InputFormatBase<K,
     }
     try {
       String s = job.getConfiguration().get(key);
-      if (s == null) return null;
+      if (s == null)
+        return null;
       return URLDecoder.decode(s, "UTF-8");
     } catch (UnsupportedEncodingException e) {
       log.error("Failed to decode regular expression", e);
@@ -497,19 +508,23 @@ public abstract class InputFormatBase<K,
   // checkOutputSpecs(JobContext job)
   protected static void validateOptions(JobContext job) throws IOException {
     Configuration conf = job.getConfiguration();
-    if (!conf.getBoolean(INPUT_INFO_HAS_BEEN_SET, false)) throw new IOException("Input info has not been set.");
-    if (!conf.getBoolean(INSTANCE_HAS_BEEN_SET, false)) throw new IOException("Instance info has not been set.");
+    if (!conf.getBoolean(INPUT_INFO_HAS_BEEN_SET, false))
+      throw new IOException("Input info has not been set.");
+    if (!conf.getBoolean(INSTANCE_HAS_BEEN_SET, false))
+      throw new IOException("Instance info has not been set.");
     // validate that we can connect as configured
     try {
       Connector c = getInstance(job).getConnector(getUsername(job), getPassword(job));
-      if (!c.securityOperations().authenticateUser(getUsername(job), getPassword(job))) throw new IOException("Unable to authenticate user");
-      if (!c.securityOperations().hasTablePermission(getUsername(job), getTablename(job), TablePermission.READ)) throw new IOException("Unable to access table");
+      if (!c.securityOperations().authenticateUser(getUsername(job), getPassword(job)))
+        throw new IOException("Unable to authenticate user");
+      if (!c.securityOperations().hasTablePermission(getUsername(job), getTablename(job), TablePermission.READ))
+        throw new IOException("Unable to access table");
       
       if (!usesLocalIterators(job)) {
         // validate that any scan-time iterators can be loaded by the the tablet servers
         for (AccumuloIterator iter : getIterators(job)) {
-          if (!c.instanceOperations().testClassLoad(iter.getIteratorClass(), SortedKeyValueIterator.class.getName())) throw new AccumuloException(
-              "Servers are unable to load " + iter.getIteratorClass() + " as a " + SortedKeyValueIterator.class.getName());
+          if (!c.instanceOperations().testClassLoad(iter.getIteratorClass(), SortedKeyValueIterator.class.getName()))
+            throw new AccumuloException("Servers are unable to load " + iter.getIteratorClass() + " as a " + SortedKeyValueIterator.class.getName());
         }
       }
       
@@ -531,7 +546,8 @@ public abstract class InputFormatBase<K,
     String iterators = job.getConfiguration().get(ITERATORS);
     
     // If no iterators are present, return an empty list
-    if (iterators == null || iterators.isEmpty()) return new ArrayList<AccumuloIterator>();
+    if (iterators == null || iterators.isEmpty())
+      return new ArrayList<AccumuloIterator>();
     
     // Compose the set of iterators encoded in the job configuration
     StringTokenizer tokens = new StringTokenizer(job.getConfiguration().get(ITERATORS), ITERATORS_DELIM);
@@ -548,7 +564,8 @@ public abstract class InputFormatBase<K,
     String iteratorOptions = job.getConfiguration().get(ITERATORS_OPTIONS);
     
     // If no options are present, return an empty list
-    if (iteratorOptions == null || iteratorOptions.isEmpty()) return new ArrayList<AccumuloIteratorOption>();
+    if (iteratorOptions == null || iteratorOptions.isEmpty())
+      return new ArrayList<AccumuloIteratorOption>();
     
     // Compose the set of options encoded in the job configuration
     StringTokenizer tokens = new StringTokenizer(job.getConfiguration().get(ITERATORS_OPTIONS), ITERATORS_DELIM);
@@ -671,7 +688,8 @@ public abstract class InputFormatBase<K,
     public void close() {}
     
     public float getProgress() throws IOException {
-      if (numKeysRead > 0 && currentKey == null) return 1.0f;
+      if (numKeysRead > 0 && currentKey == null)
+        return 1.0f;
       return split.getProgress(currentKey);
     }
     
@@ -729,7 +747,8 @@ public abstract class InputFormatBase<K,
     ArrayList<InputSplit> splits = new ArrayList<InputSplit>(ranges.size());
     HashMap<Range,ArrayList<String>> splitsToAdd = null;
     
-    if (!autoAdjust) splitsToAdd = new HashMap<Range,ArrayList<String>>();
+    if (!autoAdjust)
+      splitsToAdd = new HashMap<Range,ArrayList<String>>();
     
     for (Entry<String,Map<KeyExtent,List<Range>>> tserverBin : binnedRanges.entrySet()) {
       String location = tserverBin.getKey().split(":", 2)[0];
@@ -743,7 +762,8 @@ public abstract class InputFormatBase<K,
           } else {
             // don't divide ranges
             ArrayList<String> locations = splitsToAdd.get(r);
-            if (locations == null) locations = new ArrayList<String>(1);
+            if (locations == null)
+              locations = new ArrayList<String>(1);
             locations.add(location);
             splitsToAdd.put(r, locations);
           }
@@ -751,8 +771,9 @@ public abstract class InputFormatBase<K,
       }
     }
     
-    if (!autoAdjust) for (Entry<Range,ArrayList<String>> entry : splitsToAdd.entrySet())
-      splits.add(new RangeInputSplit(tableName, entry.getKey(), entry.getValue().toArray(new String[0])));
+    if (!autoAdjust)
+      for (Entry<Range,ArrayList<String>> entry : splitsToAdd.entrySet())
+        splits.add(new RangeInputSplit(tableName, entry.getKey(), entry.getValue().toArray(new String[0])));
     return splits;
   }
   
@@ -776,8 +797,10 @@ public abstract class InputFormatBase<K,
       byte[] bytes = new byte[numBytes + 1];
       bytes[0] = 0;
       for (int i = 0; i < numBytes; i++) {
-        if (i >= seq.length()) bytes[i + 1] = 0;
-        else bytes[i + 1] = seq.byteAt(i);
+        if (i >= seq.length())
+          bytes[i + 1] = 0;
+        else
+          bytes[i + 1] = seq.byteAt(i);
       }
       return bytes;
     }
@@ -791,7 +814,8 @@ public abstract class InputFormatBase<K,
     }
     
     public float getProgress(Key currentKey) {
-      if (currentKey == null) return 0f;
+      if (currentKey == null)
+        return 0f;
       if (range.getStartKey() != null && range.getEndKey() != null) {
         if (range.getStartKey().compareTo(range.getEndKey(), PartialKey.ROW) != 0) {
           // just look at the row progress
@@ -829,7 +853,8 @@ public abstract class InputFormatBase<K,
         diff <<= Byte.SIZE;
       }
       
-      if (startRow.getLength() != stopRow.getLength()) diff |= 0xff;
+      if (startRow.getLength() != stopRow.getLength())
+        diff |= 0xff;
       
       return diff + 1;
     }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java Thu Oct 27 15:24:51 2011
@@ -60,7 +60,8 @@ public class RangePartitioner extends Pa
     
     // both conditions work with numSubBins == 1, but this check is to avoid
     // hashing, when we don't need to, for speed
-    if (numSubBins < 2) return index;
+    if (numSubBins < 2)
+      return index;
     return (key.toString().hashCode() & Integer.MAX_VALUE) % numSubBins + index * numSubBins;
   }
   
@@ -97,7 +98,8 @@ public class RangePartitioner extends Pa
           }
         }
       }
-      if (cutPointArray == null) throw new FileNotFoundException(cutFileName + " not found in distributed cache");
+      if (cutPointArray == null)
+        throw new FileNotFoundException(cutFileName + " not found in distributed cache");
     }
     return cutPointArray;
   }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java Thu Oct 27 15:24:51 2011
@@ -57,7 +57,8 @@ public class MockBatchScanner extends Mo
     @Override
     public boolean accept(Key k, Value v) {
       for (Range r : ranges) {
-        if (r.contains(k)) return true;
+        if (r.contains(k))
+          return true;
       }
       return false;
     }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java Thu Oct 27 15:24:51 2011
@@ -68,7 +68,8 @@ public class MockConnector extends Conne
   @Override
   public Scanner createScanner(String tableName, Authorizations authorizations) throws TableNotFoundException {
     MockTable table = acu.tables.get(tableName);
-    if (table == null) throw new TableNotFoundException(tableName, tableName, "no such table");
+    if (table == null)
+      throw new TableNotFoundException(tableName, tableName, "no such table");
     return new MockScanner(table, authorizations);
   }
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java Thu Oct 27 15:24:51 2011
@@ -45,8 +45,10 @@ public class MockInstance implements Ins
   
   public MockInstance(String instanceName) {
     synchronized (instances) {
-      if (instances.containsKey(instanceName)) acu = instances.get(instanceName);
-      else instances.put(instanceName, acu = new MockAccumulo());
+      if (instances.containsKey(instanceName))
+        acu = instances.get(instanceName);
+      else
+        instances.put(instanceName, acu = new MockAccumulo());
     }
     this.instanceName = instanceName;
   }
@@ -100,7 +102,8 @@ public class MockInstance implements Ins
   
   @Override
   public AccumuloConfiguration getConfiguration() {
-    if (conf == null) conf = AccumuloConfiguration.getDefaultConfiguration();
+    if (conf == null)
+      conf = AccumuloConfiguration.getDefaultConfiguration();
     return conf;
   }
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockScannerBase.java Thu Oct 27 15:24:51 2011
@@ -90,7 +90,8 @@ public class MockScannerBase extends Sca
     }
     
     SortedKeyValueIterator<Key,Value> getTopLevelIterator(SortedKeyValueIterator<Key,Value> iter) {
-      if (topLevelIterators.isEmpty()) return iter;
+      if (topLevelIterators.isEmpty())
+        return iter;
       ArrayList<SortedKeyValueIterator<Key,Value>> allIters = new ArrayList<SortedKeyValueIterator<Key,Value>>(topLevelIterators);
       allIters.add(iter);
       return new MultiIterator(allIters, false);

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java Thu Oct 27 15:24:51 2011
@@ -48,74 +48,90 @@ public class MockSecurityOperations impl
   @Override
   public boolean authenticateUser(String name, byte[] password) throws AccumuloException, AccumuloSecurityException {
     MockUser user = acu.users.get(name);
-    if (user == null) return false;
+    if (user == null)
+      return false;
     return Arrays.equals(user.password, password);
   }
   
   @Override
   public void changeUserPassword(String name, byte[] password) throws AccumuloException, AccumuloSecurityException {
     MockUser user = acu.users.get(name);
-    if (user != null) user.password = Arrays.copyOf(password, password.length);
+    if (user != null)
+      user.password = Arrays.copyOf(password, password.length);
   }
   
   @Override
   public void changeUserAuthorizations(String name, Authorizations authorizations) throws AccumuloException, AccumuloSecurityException {
     MockUser user = acu.users.get(name);
-    if (user != null) user.authorizations = authorizations;
+    if (user != null)
+      user.authorizations = authorizations;
   }
   
   @Override
   public Authorizations getUserAuthorizations(String name) throws AccumuloException, AccumuloSecurityException {
     MockUser user = acu.users.get(name);
-    if (user != null) return user.authorizations;
+    if (user != null)
+      return user.authorizations;
     return new Authorizations();
   }
   
   @Override
   public boolean hasSystemPermission(String name, SystemPermission perm) throws AccumuloException, AccumuloSecurityException {
     MockUser user = acu.users.get(name);
-    if (user != null) return user.permissions.contains(perm);
+    if (user != null)
+      return user.permissions.contains(perm);
     return false;
   }
   
   @Override
   public boolean hasTablePermission(String name, String tableName, TablePermission perm) throws AccumuloException, AccumuloSecurityException {
     MockTable table = acu.tables.get(tableName);
-    if (table == null) return false;
+    if (table == null)
+      return false;
     EnumSet<TablePermission> perms = table.userPermissions.get(name);
-    if (perms == null) return false;
+    if (perms == null)
+      return false;
     return perms.contains(perm);
   }
   
   @Override
   public void grantSystemPermission(String name, SystemPermission permission) throws AccumuloException, AccumuloSecurityException {
     MockUser user = acu.users.get(name);
-    if (user != null) user.permissions.add(permission);
+    if (user != null)
+      user.permissions.add(permission);
   }
   
   @Override
   public void grantTablePermission(String name, String tableName, TablePermission permission) throws AccumuloException, AccumuloSecurityException {
-    if (acu.users.get(name) == null) return;
+    if (acu.users.get(name) == null)
+      return;
     MockTable table = acu.tables.get(tableName);
-    if (table == null) return;
+    if (table == null)
+      return;
     EnumSet<TablePermission> perms = table.userPermissions.get(name);
-    if (perms == null) table.userPermissions.put(name, EnumSet.of(permission));
-    else perms.add(permission);
+    if (perms == null)
+      table.userPermissions.put(name, EnumSet.of(permission));
+    else
+      perms.add(permission);
   }
   
   @Override
   public void revokeSystemPermission(String name, SystemPermission permission) throws AccumuloException, AccumuloSecurityException {
     MockUser user = acu.users.get(name);
-    if (user != null) user.permissions.remove(permission);
+    if (user != null)
+      user.permissions.remove(permission);
   }
   
   @Override
   public void revokeTablePermission(String name, String tableName, TablePermission permission) throws AccumuloException, AccumuloSecurityException {
-    if (acu.users.get(name) == null) return;
+    if (acu.users.get(name) == null)
+      return;
     MockTable table = acu.tables.get(tableName);
-    if (table == null) return;
+    if (table == null)
+      return;
     EnumSet<TablePermission> perms = table.userPermissions.get(name);
-    if (perms != null) perms.remove(permission);
+    if (perms != null)
+      perms.remove(permission);
     
   }
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java Thu Oct 27 15:24:51 2011
@@ -66,11 +66,14 @@ public class MockTable {
     @Override
     public int compareTo(Key o) {
       int compare = super.compareTo(o);
-      if (compare != 0) return compare;
+      if (compare != 0)
+        return compare;
       if (o instanceof MockMemKey) {
         MockMemKey other = (MockMemKey) o;
-        if (count < other.count) return -1;
-        if (count > other.count) return 1;
+        if (count < other.count)
+          return -1;
+        if (count > other.count)
+          return 1;
       } else {
         return 1;
       }
@@ -90,7 +93,8 @@ public class MockTable {
     settings = IteratorUtil.generateInitialTableProperties(aggs);
     for (Entry<String,String> entry : AccumuloConfiguration.getDefaultConfiguration()) {
       String key = entry.getKey();
-      if (key.startsWith(Property.TABLE_PREFIX.getKey())) settings.put(key, entry.getValue());
+      if (key.startsWith(Property.TABLE_PREFIX.getKey()))
+        settings.put(key, entry.getValue());
     }
   }
   
@@ -105,7 +109,8 @@ public class MockTable {
     settings = IteratorUtil.generateInitialTableProperties(aggregators);
     for (Entry<String,String> entry : AccumuloConfiguration.getDefaultConfiguration()) {
       String key = entry.getKey();
-      if (key.startsWith(Property.TABLE_PREFIX.getKey())) settings.put(key, entry.getValue());
+      if (key.startsWith(Property.TABLE_PREFIX.getKey()))
+        settings.put(key, entry.getValue());
     }
   }
   
@@ -115,9 +120,13 @@ public class MockTable {
     for (ColumnUpdate u : m.getUpdates()) {
       Key key = new Key(m.getRow(), 0, m.getRow().length, u.getColumnFamily(), 0, u.getColumnFamily().length, u.getColumnQualifier(), 0,
           u.getColumnQualifier().length, u.getColumnVisibility(), 0, u.getColumnVisibility().length, u.getTimestamp());
-      if (u.isDeleted()) key.setDeleted(true);
-      if (!u.hasTimestamp()) if (timeType.equals(TimeType.LOGICAL)) key.setTimestamp(mutationCount);
-      else key.setTimestamp(now);
+      if (u.isDeleted())
+        key.setDeleted(true);
+      if (!u.hasTimestamp())
+        if (timeType.equals(TimeType.LOGICAL))
+          key.setTimestamp(mutationCount);
+        else
+          key.setTimestamp(now);
       
       table.put(new MockMemKey(key, mutationCount), new Value(u.getValue()));
     }
@@ -126,7 +135,8 @@ public class MockTable {
   public void addAggregators(List<? extends PerColumnIteratorConfig> aggregators) {
     for (Entry<String,String> entry : IteratorUtil.generateInitialTableProperties(aggregators).entrySet()) {
       String key = entry.getKey();
-      if (key.startsWith(Property.TABLE_PREFIX.getKey())) settings.put(key, entry.getValue());
+      if (key.startsWith(Property.TABLE_PREFIX.getKey()))
+        settings.put(key, entry.getValue());
     }
   }
 }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java Thu Oct 27 15:24:51 2011
@@ -208,7 +208,8 @@ public class MockTableOperations extends
   public Text getMaxRow(String tableName, Authorizations auths, Text startRow, boolean startInclusive, Text endRow, boolean endInclusive)
       throws TableNotFoundException, AccumuloException, AccumuloSecurityException {
     MockTable table = acu.tables.get(tableName);
-    if (table == null) throw new TableNotFoundException(tableName, tableName, "no such table");
+    if (table == null)
+      throw new TableNotFoundException(tableName, tableName, "no such table");
     
     return FindMax.findMax(new MockScanner(table, auths), startRow, startInclusive, endRow, endInclusive);
   }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java Thu Oct 27 15:24:51 2011
@@ -82,8 +82,8 @@ public abstract class AccumuloConfigurat
       case 's':
         multiplier *= 1000;
         if (str.length() > 1 && str.endsWith("ms")) // millis
-        // case
-        return Long.parseLong(str.substring(0, str.length() - 2));
+          // case
+          return Long.parseLong(str.substring(0, str.length() - 2));
         return Long.parseLong(str.substring(0, str.length() - 1)) * multiplier;
       default:
         return Long.parseLong(str) * 1000;
@@ -102,7 +102,8 @@ public abstract class AccumuloConfigurat
   }
   
   public double getFraction(String str) {
-    if (str.charAt(str.length() - 1) == '%') return Double.parseDouble(str.substring(0, str.length() - 1)) / 100.0;
+    if (str.charAt(str.length() - 1) == '%')
+      return Double.parseDouble(str.substring(0, str.length() - 1)) / 100.0;
     return Double.parseDouble(str);
   }
   

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/ConfigSanityCheck.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/ConfigSanityCheck.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/ConfigSanityCheck.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/ConfigSanityCheck.java Thu Oct 27 15:24:51 2011
@@ -30,10 +30,14 @@ public class ConfigSanityCheck {
       String key = entry.getKey();
       String value = entry.getValue();
       Property prop = Property.getPropertyByKey(entry.getKey());
-      if (prop == null && Property.isValidTablePropertyKey(key)) continue; // unknown valid per-table property
-      else if (prop == null) log.warn(PREFIX + "unrecognized property key (" + key + ")");
-      else if (prop.getType() == PropertyType.PREFIX) fatal(PREFIX + "incomplete property key (" + key + ")");
-      else if (!prop.getType().isValidFormat(value)) fatal(PREFIX + "improperly formatted value for key (" + key + ", type=" + prop.getType() + ")");
+      if (prop == null && Property.isValidTablePropertyKey(key))
+        continue; // unknown valid per-table property
+      else if (prop == null)
+        log.warn(PREFIX + "unrecognized property key (" + key + ")");
+      else if (prop.getType() == PropertyType.PREFIX)
+        fatal(PREFIX + "incomplete property key (" + key + ")");
+      else if (!prop.getType().isValidFormat(value))
+        fatal(PREFIX + "improperly formatted value for key (" + key + ", type=" + prop.getType() + ")");
     }
     
     checkTimeDuration(acuconf, Property.INSTANCE_ZK_TIMEOUT, new CheckTimeDurationBetween(1000, 300000));
@@ -66,12 +70,14 @@ public class ConfigSanityCheck {
   
   private static void checkTimeDuration(AccumuloConfiguration acuconf, Property prop, CheckTimeDuration chk) {
     verifyPropertyTypes(PropertyType.TIMEDURATION, prop);
-    if (!chk.check(acuconf.getTimeInMillis(prop))) fatal(PREFIX + chk.getDescription(prop));
+    if (!chk.check(acuconf.getTimeInMillis(prop)))
+      fatal(PREFIX + chk.getDescription(prop));
   }
   
   private static void verifyPropertyTypes(PropertyType type, Property... properties) {
     for (Property prop : properties)
-      if (prop.getType() != type) fatal("Unexpected property type (" + prop.getType() + " != " + type + ")");
+      if (prop.getType() != type)
+        fatal("Unexpected property type (" + prop.getType() + " != " + type + ")");
   }
   
   private static void fatal(String msg) {

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java Thu Oct 27 15:24:51 2011
@@ -46,7 +46,8 @@ public class DefaultConfiguration extend
   public Iterator<Entry<String,String>> iterator() {
     TreeMap<String,String> entries = new TreeMap<String,String>();
     for (Property prop : Property.values())
-      if (!prop.getType().equals(PropertyType.PREFIX)) entries.put(prop.getKey(), prop.getDefaultValue());
+      if (!prop.getType().equals(PropertyType.PREFIX))
+        entries.put(prop.getKey(), prop.getDefaultValue());
     
     return entries.entrySet().iterator();
   }
@@ -70,8 +71,10 @@ public class DefaultConfiguration extend
     ArrayList<Property> prefixes = new ArrayList<Property>();
     TreeMap<String,Property> sortedProps = new TreeMap<String,Property>();
     for (Property prop : Property.values()) {
-      if (prop.getType().equals(PropertyType.PREFIX)) prefixes.add(prop);
-      else sortedProps.put(prop.getKey(), prop);
+      if (prop.getType().equals(PropertyType.PREFIX))
+        prefixes.add(prop);
+      else
+        sortedProps.put(prop.getKey(), prop);
     }
     
     doc.println("  <p>Jump to: ");
@@ -87,8 +90,8 @@ public class DefaultConfiguration extend
       doc.println("   <tr><td colspan='5'><a name='" + prefix.name() + "' class='large'>" + prefix.getKey() + "*</a></td></tr>");
       doc.println("   <tr><td colspan='5'><i>" + prefix.getDescription() + "</i></td></tr>");
       if (!prefix.equals(Property.TABLE_CONSTRAINT_PREFIX) && !prefix.equals(Property.TABLE_ITERATOR_PREFIX)
-          && !prefix.equals(Property.TABLE_LOCALITY_GROUP_PREFIX)) doc
-          .println("   <tr><th>Property</th><th>Type</th><th>Zookeeper Mutable</th><th>Default Value</th><th>Description</th></tr>");
+          && !prefix.equals(Property.TABLE_LOCALITY_GROUP_PREFIX))
+        doc.println("   <tr><th>Property</th><th>Type</th><th>Zookeeper Mutable</th><th>Default Value</th><th>Description</th></tr>");
       
       boolean highlight = true;
       for (Property prop : sortedProps.values()) {
@@ -118,7 +121,8 @@ public class DefaultConfiguration extend
     doc.println("   <tr><th>Property Type</th><th>Description</th></tr>");
     boolean highlight = true;
     for (PropertyType type : PropertyType.values()) {
-      if (type.equals(PropertyType.PREFIX)) continue;
+      if (type.equals(PropertyType.PREFIX))
+        continue;
       doc.println("   <tr " + (highlight ? "class='highlight'" : "") + ">");
       highlight = !highlight;
       doc.println("     <td><h3><a name='" + type.name() + "'>" + type + "</a></td>");
@@ -135,6 +139,7 @@ public class DefaultConfiguration extend
    * Generate documentation for conf/accumulo-site.xml file usage
    */
   public static void main(String[] args) {
-    if (args.length == 1 && args[0].equals("--generate-doc")) generateDocumentation(System.out);
+    if (args.length == 1 && args[0].equals("--generate-doc"))
+      generateDocumentation(System.out);
   }
 }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/Property.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/Property.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/Property.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/Property.java Thu Oct 27 15:24:51 2011
@@ -318,7 +318,8 @@ public enum Property {
         if (validTableProperties == null) {
           HashSet<String> tmp = new HashSet<String>();
           for (Property p : Property.values())
-            if (!p.getType().equals(PropertyType.PREFIX) && p.getKey().startsWith(Property.TABLE_PREFIX.getKey())) tmp.add(p.getKey());
+            if (!p.getType().equals(PropertyType.PREFIX) && p.getKey().startsWith(Property.TABLE_PREFIX.getKey()))
+              tmp.add(p.getKey());
           validTableProperties = tmp;
         }
       }
@@ -348,7 +349,8 @@ public enum Property {
   
   public static Property getPropertyByKey(String key) {
     for (Property prop : Property.values())
-      if (prop.getKey().equals(key)) return prop;
+      if (prop.getKey().equals(key))
+        return prop;
     return null;
   }
 }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java Thu Oct 27 15:24:51 2011
@@ -49,8 +49,10 @@ public class SiteConfiguration extends A
     if (xmlConfig == null) {
       xmlConfig = new Configuration(false);
       
-      if (SiteConfiguration.class.getClassLoader().getResource(configFile) == null) log.warn(configFile + " not found on classpath");
-      else xmlConfig.addResource(configFile);
+      if (SiteConfiguration.class.getClassLoader().getResource(configFile) == null)
+        log.warn(configFile + " not found on classpath");
+      else
+        xmlConfig.addResource(configFile);
     }
     return xmlConfig;
   }
@@ -62,7 +64,8 @@ public class SiteConfiguration extends A
     String value = getXmlConfig().get(key);
     
     if (value == null || !property.getType().isValidFormat(value)) {
-      if (value != null) log.error("Using default value for " + key + " due to improperly formatted " + property.getType() + ": " + value);
+      if (value != null)
+        log.error("Using default value for " + key + " due to improperly formatted " + property.getType() + ": " + value);
       value = parent.get(property);
     }
     return value;

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/constraints/Violations.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/constraints/Violations.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/constraints/Violations.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/constraints/Violations.java Thu Oct 27 15:24:51 2011
@@ -42,7 +42,8 @@ public class Violations {
     
     @Override
     public boolean equals(Object o) {
-      if (o instanceof CVSKey) return equals((CVSKey) o);
+      if (o instanceof CVSKey)
+        return equals((CVSKey) o);
       return false;
     }
     

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ArrayByteSequence.java Thu Oct 27 15:24:51 2011
@@ -90,7 +90,8 @@ public class ArrayByteSequence extends B
   
   @Override
   public byte[] toArray() {
-    if (offset == 0 && length == data.length) return data;
+    if (offset == 0 && length == data.length)
+      return data;
     
     byte[] copy = new byte[length];
     System.arraycopy(data, offset, copy, 0, length);

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ByteSequence.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ByteSequence.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ByteSequence.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ByteSequence.java Thu Oct 27 15:24:51 2011
@@ -64,9 +64,11 @@ public abstract class ByteSequence imple
     if (o instanceof ByteSequence) {
       ByteSequence obs = (ByteSequence) o;
       
-      if (this == o) return true;
+      if (this == o)
+        return true;
       
-      if (length() != obs.length()) return false;
+      if (length() != obs.length())
+        return false;
       
       return compareTo(obs) == 0;
     }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/Column.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/Column.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/Column.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/Column.java Thu Oct 27 15:24:51 2011
@@ -36,18 +36,23 @@ import static org.apache.accumulo.core.u
 public class Column implements WritableComparable<Column> {
   
   static private int compareBytes(byte[] a, byte[] b) {
-    if (a == null && b == null) return 0;
-    if (a == null) return -1;
-    if (b == null) return 1;
+    if (a == null && b == null)
+      return 0;
+    if (a == null)
+      return -1;
+    if (b == null)
+      return 1;
     return WritableComparator.compareBytes(a, 0, a.length, b, 0, b.length);
   }
   
   public int compareTo(Column that) {
     int result;
     result = compareBytes(this.columnFamily, that.columnFamily);
-    if (result != 0) return result;
+    if (result != 0)
+      return result;
     result = compareBytes(this.columnQualifier, that.columnQualifier);
-    if (result != 0) return result;
+    if (result != 0)
+      return result;
     return compareBytes(this.columnVisibility, that.columnVisibility);
   }
   
@@ -123,8 +128,10 @@ public class Column implements WritableC
   
   @Override
   public boolean equals(Object that) {
-    if (that == null) return false;
-    if (that instanceof Column) return this.equals((Column) that);
+    if (that == null)
+      return false;
+    if (that instanceof Column)
+      return this.equals((Column) that);
     return false;
   }
   
@@ -133,7 +140,8 @@ public class Column implements WritableC
   }
   
   private static int hash(byte[] b) {
-    if (b == null) return 0;
+    if (b == null)
+      return 0;
     
     return WritableComparator.hashBytes(b, b.length);
   }

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ColumnUpdate.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ColumnUpdate.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ColumnUpdate.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ColumnUpdate.java Thu Oct 27 15:24:51 2011
@@ -48,7 +48,8 @@ public class ColumnUpdate {
   }
   
   public void setSystemTimestamp(long v) {
-    if (hasTimestamp) throw new IllegalStateException("Cannot set system timestamp when user set a timestamp");
+    if (hasTimestamp)
+      throw new IllegalStateException("Cannot set system timestamp when user set a timestamp");
     
     int tso = this.tsOffset;
     data[tso++] = (byte) (v >>> 56);

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ConstraintViolationSummary.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ConstraintViolationSummary.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ConstraintViolationSummary.java (original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/data/ConstraintViolationSummary.java Thu Oct 27 15:24:51 2011
@@ -64,11 +64,13 @@ public class ConstraintViolationSummary 
       sb.append(this.constrainClass);
     }
     first = false;
-    if (!first) sb.append(", ");
+    if (!first)
+      sb.append(", ");
     sb.append("violationCode:");
     sb.append(this.violationCode);
     first = false;
-    if (!first) sb.append(", ");
+    if (!first)
+      sb.append(", ");
     sb.append("violationDescription:");
     if (this.violationDescription == null) {
       sb.append("null");
@@ -76,7 +78,8 @@ public class ConstraintViolationSummary 
       sb.append(this.violationDescription);
     }
     first = false;
-    if (!first) sb.append(", ");
+    if (!first)
+      sb.append(", ");
     sb.append("numberOfViolatingMutations:");
     sb.append(this.numberOfViolatingMutations);
     first = false;



Mime
View raw message