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 [2/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/j...
Date Thu, 27 Oct 2011 15:25:17 GMT

Modified: incubator/accumulo/branches/1.3/contrib/Eclipse-Accumulo-Codestyle.xml
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/contrib/Eclipse-Accumulo-Codestyle.xml?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/contrib/Eclipse-Accumulo-Codestyle.xml (original)
+++ incubator/accumulo/branches/1.3/contrib/Eclipse-Accumulo-Codestyle.xml Thu Oct 27 15:24:51 2011
@@ -20,7 +20,7 @@
 <setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
 <setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
 <setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
 <setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
 <setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/>
 <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
@@ -286,6 +286,6 @@
 <setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
 <setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
 <setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
-<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="true"/>
+<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
 </profile>
 </profiles>

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java Thu Oct 27 15:24:51 2011
@@ -91,7 +91,8 @@ public class IsolatedScanner extends Sca
           
           nextRowStart = null;
           
-          if (lastRow == null) seekRange = range;
+          if (lastRow == null)
+            seekRange = range;
           else {
             Text lastRowText = new Text();
             lastRowText.set(lastRow.getBackingArray(), lastRow.offset(), lastRow.length());

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java Thu Oct 27 15:24:51 2011
@@ -138,7 +138,8 @@ public class ZooKeeperInstance implement
     }
     
     if (zooCache.get(Constants.ZROOT + "/" + instanceId) == null) {
-      if (instanceName == null) throw new RuntimeException("Instance id " + instanceId + " does not exist in zookeeper");
+      if (instanceName == null)
+        throw new RuntimeException("Instance id " + instanceId + " does not exist in zookeeper");
       throw new RuntimeException("Instance id " + instanceId + " pointed to by the name " + instanceName + " does not exist in zookeeper");
     }
     
@@ -177,7 +178,8 @@ public class ZooKeeperInstance implement
   
   @Override
   public String getInstanceName() {
-    if (instanceName == null) instanceName = HdfsZooInstance.lookupInstanceName(zooCache, UUID.fromString(getInstanceID()));
+    if (instanceName == null)
+      instanceName = HdfsZooInstance.lookupInstanceName(zooCache, UUID.fromString(getInstanceID()));
     
     return instanceName;
   }
@@ -206,7 +208,8 @@ public class ZooKeeperInstance implement
   
   @Override
   public AccumuloConfiguration getConfiguration() {
-    if (conf == null) conf = AccumuloConfiguration.getDefaultConfiguration();
+    if (conf == null)
+      conf = AccumuloConfiguration.getDefaultConfiguration();
     return conf;
   }
   

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java Thu Oct 27 15:24:51 2011
@@ -118,7 +118,8 @@ public class TableOperationsImpl extends
    */
   public boolean exists(String tableName) {
     ArgumentChecker.notNull(tableName);
-    if (tableName.equals(Constants.METADATA_TABLE_NAME)) return true;
+    if (tableName.equals(Constants.METADATA_TABLE_NAME))
+      return true;
     
     OpTimer opTimer = new OpTimer(log, Level.TRACE).start("Checking if table " + tableName + "exists...");
     boolean exists = Tables.getNameToIdMap(instance).containsKey(tableName);
@@ -250,27 +251,30 @@ public class TableOperationsImpl extends
       
       while (!successful) {
         
-        if (attempt > 0) UtilWaitThread.sleep(100);
+        if (attempt > 0)
+          UtilWaitThread.sleep(100);
         
         attempt++;
         
         TabletLocation tl = tabLocator.locateTablet(split, false, false);
         
-        if (tl == null) continue;
+        if (tl == null)
+          continue;
         
         try {
           TabletClientService.Iface client = ThriftUtil.getTServerClient(tl.tablet_location, instance.getConfiguration());
           try {
             OpTimer opTimer = null;
-            if (log.isTraceEnabled()) opTimer = new OpTimer(log, Level.TRACE).start("Splitting tablet " + tl.tablet_extent + " on " + tl.tablet_location
-                + " at " + split);
+            if (log.isTraceEnabled())
+              opTimer = new OpTimer(log, Level.TRACE).start("Splitting tablet " + tl.tablet_extent + " on " + tl.tablet_location + " at " + split);
             
             client.splitTablet(null, credentials, tl.tablet_extent.toThrift(), TextUtil.getBytes(split));
             
             // just split it, might as well invalidate it in the cache
             tabLocator.invalidateCache(tl.tablet_extent);
             
-            if (opTimer != null) opTimer.stop("Split tablet in %DURATION%");
+            if (opTimer != null)
+              opTimer.stop("Split tablet in %DURATION%");
           } finally {
             ThriftUtil.returnClient((TServiceClient) client);
           }
@@ -326,7 +330,8 @@ public class TableOperationsImpl extends
     ArrayList<Text> endRows = new ArrayList<Text>(tablets.size());
     
     for (KeyExtent ke : tablets)
-      if (ke.getEndRow() != null) endRows.add(ke.getEndRow());
+      if (ke.getEndRow() != null)
+        endRows.add(ke.getEndRow());
     
     return endRows;
   }
@@ -343,7 +348,8 @@ public class TableOperationsImpl extends
   public Collection<Text> getSplits(String tableName, int maxSplits) throws TableNotFoundException {
     Collection<Text> endRows = getSplits(tableName);
     
-    if (endRows.size() <= maxSplits) return endRows;
+    if (endRows.size() <= maxSplits)
+      return endRows;
     
     double r = (maxSplits + 1) / (double) (endRows.size());
     double pos = 0;
@@ -638,8 +644,10 @@ public class TableOperationsImpl extends
   public Set<Range> splitRangeByTablets(String tableName, Range range, int maxSplits) throws AccumuloException, AccumuloSecurityException,
       TableNotFoundException {
     ArgumentChecker.notNull(tableName, range);
-    if (maxSplits < 1) throw new IllegalArgumentException("maximum splits must be >= 1");
-    if (maxSplits == 1) return Collections.singleton(range);
+    if (maxSplits < 1)
+      throw new IllegalArgumentException("maximum splits must be >= 1");
+    if (maxSplits == 1)
+      return Collections.singleton(range);
     
     Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<String,Map<KeyExtent,List<Range>>>();
     TabletLocator tl = TabletLocator.getInstance(instance, credentials, new Text(Tables.getTableId(instance, tableName)));

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java Thu Oct 27 15:24:51 2011
@@ -130,7 +130,8 @@ public class ConnectorImpl extends Conne
    */
   @Override
   public synchronized TableOperations tableOperations() {
-    if (tableops == null) tableops = new TableOperationsImpl(instance, credentials);
+    if (tableops == null)
+      tableops = new TableOperationsImpl(instance, credentials);
     return tableops;
   }
   
@@ -141,7 +142,8 @@ public class ConnectorImpl extends Conne
    */
   @Override
   public synchronized SecurityOperations securityOperations() {
-    if (secops == null) secops = new SecurityOperationsImpl(instance, credentials);
+    if (secops == null)
+      secops = new SecurityOperationsImpl(instance, credentials);
     
     return secops;
   }
@@ -153,7 +155,8 @@ public class ConnectorImpl extends Conne
    */
   @Override
   public synchronized InstanceOperations instanceOperations() {
-    if (instanceops == null) instanceops = new InstanceOperations(instance, credentials);
+    if (instanceops == null)
+      instanceops = new InstanceOperations(instance, credentials);
     
     return instanceops;
   }

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/HdfsZooInstance.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/HdfsZooInstance.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/HdfsZooInstance.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/HdfsZooInstance.java Thu Oct 27 15:24:51 2011
@@ -59,7 +59,8 @@ public class HdfsZooInstance implements 
   private static HdfsZooInstance cachedHdfsZooInstance = null;
   
   public static Instance getInstance() {
-    if (cachedHdfsZooInstance == null) cachedHdfsZooInstance = new HdfsZooInstance();
+    if (cachedHdfsZooInstance == null)
+      cachedHdfsZooInstance = new HdfsZooInstance();
     return cachedHdfsZooInstance;
   }
   
@@ -118,7 +119,8 @@ public class HdfsZooInstance implements 
   
   @Override
   public String getInstanceID() {
-    if (instanceId == null) _getInstanceID();
+    if (instanceId == null)
+      _getInstanceID();
     return instanceId;
   }
   
@@ -173,7 +175,8 @@ public class HdfsZooInstance implements 
   
   @Override
   public AccumuloConfiguration getConfiguration() {
-    if (conf == null) conf = AccumuloConfiguration.getSystemConfiguration();
+    if (conf == null)
+      conf = AccumuloConfiguration.getSystemConfiguration();
     return conf;
   }
   

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/MetadataLocationObtainer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/MetadataLocationObtainer.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/MetadataLocationObtainer.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/MetadataLocationObtainer.java Thu Oct 27 15:24:51 2011
@@ -75,8 +75,9 @@ public class MetadataLocationObtainer im
     
     try {
       OpTimer opTimer = null;
-      if (log.isTraceEnabled()) opTimer = new OpTimer(log, Level.TRACE).start("Looking up in " + src.tablet_extent.getTableId() + " row="
-          + TextUtil.truncate(row) + "  extent=" + src.tablet_extent + " tserver=" + src.tablet_location);
+      if (log.isTraceEnabled())
+        opTimer = new OpTimer(log, Level.TRACE).start("Looking up in " + src.tablet_extent.getTableId() + " row=" + TextUtil.truncate(row) + "  extent="
+            + src.tablet_extent + " tserver=" + src.tablet_location);
       
       Range range = new Range(row, true, stopRow, true);
       
@@ -92,7 +93,8 @@ public class MetadataLocationObtainer im
             Constants.NO_AUTHS, false, instance.getConfiguration());
       }
       
-      if (opTimer != null) opTimer.stop("Got " + results.size() + " results  from " + src.tablet_extent + " in %DURATION%");
+      if (opTimer != null)
+        opTimer.stop("Got " + results.size() + " results  from " + src.tablet_extent + " in %DURATION%");
       
       // System.out.println("results "+results.keySet());
       
@@ -103,13 +105,16 @@ public class MetadataLocationObtainer im
       }
       
     } catch (AccumuloServerException ase) {
-      if (log.isTraceEnabled()) log.trace(src.tablet_extent.getTableId() + " lookup failed, " + src.tablet_location + " server side exception");
+      if (log.isTraceEnabled())
+        log.trace(src.tablet_extent.getTableId() + " lookup failed, " + src.tablet_location + " server side exception");
       throw ase;
     } catch (NotServingTabletException e) {
-      if (log.isTraceEnabled()) log.trace(src.tablet_extent.getTableId() + " lookup failed, " + src.tablet_location + " not serving " + src.tablet_extent);
+      if (log.isTraceEnabled())
+        log.trace(src.tablet_extent.getTableId() + " lookup failed, " + src.tablet_location + " not serving " + src.tablet_extent);
       parent.invalidateCache(src.tablet_extent);
     } catch (AccumuloException e) {
-      if (log.isTraceEnabled()) log.trace(src.tablet_extent.getTableId() + " lookup failed", e);
+      if (log.isTraceEnabled())
+        log.trace(src.tablet_extent.getTableId() + " lookup failed", e);
       parent.invalidateCache(src.tablet_location);
     }
     
@@ -142,7 +147,8 @@ public class MetadataLocationObtainer im
           instance.getConfiguration());
       if (failures.size() > 0) {
         // invalidate extents in parents cache
-        if (log.isTraceEnabled()) log.trace("lookupTablets failed for " + failures.size() + " extents");
+        if (log.isTraceEnabled())
+          log.trace("lookupTablets failed for " + failures.size() + " extents");
         parent.invalidateCache(failures.keySet());
       }
     } catch (IOException e) {

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java Thu Oct 27 15:24:51 2011
@@ -88,7 +88,8 @@ public class MultiTableBatchWriterImpl i
   public synchronized BatchWriter getBatchWriter(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     ArgumentChecker.notNull(tableName);
     String tableId = Tables.getNameToIdMap(instance).get(tableName);
-    if (tableId == null) throw new TableNotFoundException(tableId, tableName, null);
+    if (tableId == null)
+      throw new TableNotFoundException(tableId, tableName, null);
     BatchWriter tbw = tableWriters.get(tableId);
     if (tbw == null) {
       tbw = new TableBatchWriter(tableId);

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/RootTabletLocator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/RootTabletLocator.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/RootTabletLocator.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/RootTabletLocator.java Thu Oct 27 15:24:51 2011
@@ -86,7 +86,8 @@ public class RootTabletLocator extends T
       UtilWaitThread.sleep(500);
       location = instance.getRootTabletLocation();
     }
-    if (location != null) return new TabletLocation(Constants.ROOT_TABLET_EXTENT, location);
+    if (location != null)
+      return new TabletLocation(Constants.ROOT_TABLET_EXTENT, location);
     return null;
   }
   

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java Thu Oct 27 15:24:51 2011
@@ -100,8 +100,10 @@ public class ScannerImpl extends Scanner
   
   @Override
   public synchronized void setBatchSize(int size) {
-    if (size > 0) this.size = size;
-    else throw new IllegalArgumentException("size must be greater than zero");
+    if (size > 0)
+      this.size = size;
+    else
+      throw new IllegalArgumentException("size must be greater than zero");
   }
   
   @Override

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerIterator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerIterator.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerIterator.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerIterator.java Thu Oct 27 15:24:51 2011
@@ -77,7 +77,8 @@ public class ScannerIterator implements 
             return;
           }
           
-          if (currentBatch.size() == 0) continue;
+          if (currentBatch.size() == 0)
+            continue;
           
           synchQ.add(currentBatch);
           return;
@@ -135,7 +136,8 @@ public class ScannerIterator implements 
   
   @SuppressWarnings("unchecked")
   public boolean hasNext() {
-    if (finished) return false;
+    if (finished)
+      return false;
     
     if (iter != null && iter.hasNext()) {
       return true;
@@ -153,8 +155,10 @@ public class ScannerIterator implements 
       
       if (obj instanceof Exception) {
         finished = true;
-        if (obj instanceof RuntimeException) throw (RuntimeException) obj;
-        else throw new RuntimeException((Exception) obj);
+        if (obj instanceof RuntimeException)
+          throw (RuntimeException) obj;
+        else
+          throw new RuntimeException((Exception) obj);
       }
       
       List<KeyValue> currentBatch = (List<KeyValue>) obj;
@@ -180,7 +184,8 @@ public class ScannerIterator implements 
   }
   
   public Entry<Key,Value> next() {
-    if (hasNext()) return iter.next();
+    if (hasNext())
+      return iter.next();
     throw new NoSuchElementException();
   }
   

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java Thu Oct 27 15:24:51 2011
@@ -58,10 +58,12 @@ public class ScannerOptions implements S
   
   public synchronized void setScanIterators(int priority, String iteratorClass, String iteratorName) {
     ArgumentChecker.notNull(iteratorClass, iteratorName);
-    if (serverSideIteratorList.size() == 0) serverSideIteratorList = new ArrayList<IterInfo>();
+    if (serverSideIteratorList.size() == 0)
+      serverSideIteratorList = new ArrayList<IterInfo>();
     
     for (IterInfo ii : serverSideIteratorList)
-      if (ii.iterName.equals(iteratorName)) throw new RuntimeException("Iterator name is already in use " + iteratorName);
+      if (ii.iterName.equals(iteratorName))
+        throw new RuntimeException("Iterator name is already in use " + iteratorName);
     
     serverSideIteratorList.add(new IterInfo(priority, iteratorClass, iteratorName));
   }
@@ -73,7 +75,8 @@ public class ScannerOptions implements S
   
   public synchronized void setScanIteratorOption(String iteratorName, String key, String value) {
     ArgumentChecker.notNull(iteratorName, key, value);
-    if (serverSideIteratorOptions.size() == 0) serverSideIteratorOptions = new HashMap<String,Map<String,String>>();
+    if (serverSideIteratorOptions.size() == 0)
+      serverSideIteratorOptions = new HashMap<String,Map<String,String>>();
     
     Map<String,String> opts = serverSideIteratorOptions.get(iteratorName);
     
@@ -92,7 +95,8 @@ public class ScannerOptions implements S
   
   public synchronized void setupRegex(String iteratorName, int iteratorPriority) throws IOException {
     ArgumentChecker.notNull(iteratorName);
-    if (regexIterName != null) throw new RuntimeException("regex already setup");
+    if (regexIterName != null)
+      throw new RuntimeException("regex already setup");
     
     setScanIterators(iteratorPriority, RegExIterator.class.getName(), iteratorName);
     regexIterName = iteratorName;
@@ -113,7 +117,8 @@ public class ScannerOptions implements S
   
   public synchronized void setRowRegex(String regex) {
     ArgumentChecker.notNull(regex);
-    if (regexIterName == null) setupDefaultRegex();
+    if (regexIterName == null)
+      setupDefaultRegex();
     setScanIteratorOption(regexIterName, RegExFilter.ROW_REGEX, regex);
   }
   
@@ -124,7 +129,8 @@ public class ScannerOptions implements S
   
   public synchronized void setColumnFamilyRegex(String regex) {
     ArgumentChecker.notNull(regex);
-    if (regexIterName == null) setupDefaultRegex();
+    if (regexIterName == null)
+      setupDefaultRegex();
     setScanIteratorOption(regexIterName, RegExFilter.COLF_REGEX, regex);
   }
   
@@ -135,7 +141,8 @@ public class ScannerOptions implements S
   
   public synchronized void setColumnQualifierRegex(String regex) {
     ArgumentChecker.notNull(regex);
-    if (regexIterName == null) setupDefaultRegex();
+    if (regexIterName == null)
+      setupDefaultRegex();
     setScanIteratorOption(regexIterName, RegExFilter.COLQ_REGEX, regex);
   }
   
@@ -146,7 +153,8 @@ public class ScannerOptions implements S
   
   public synchronized void setValueRegex(String regex) {
     ArgumentChecker.notNull(regex);
-    if (regexIterName == null) setupDefaultRegex();
+    if (regexIterName == null)
+      setupDefaultRegex();
     setScanIteratorOption(regexIterName, RegExFilter.VALUE_REGEX, regex);
   }
   

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java Thu Oct 27 15:24:51 2011
@@ -58,9 +58,9 @@ public class ServerClient {
     // add tservers
     for (String tserver : getZooCache(instance).getChildren(ZooUtil.getRoot(instance) + Constants.ZTSERVERS)) {
       byte[] data = ZooLock.getLockData(getZooCache(instance), ZooUtil.getRoot(instance) + Constants.ZTSERVERS + "/" + tserver);
-      if (data != null && !new String(data).equals("master")) servers.add(new ThriftTransportKey(new ServerServices(new String(data))
-          .getAddressString(Service.TSERV_CLIENT), instance.getConfiguration().getPort(Property.TSERV_CLIENTPORT), instance.getConfiguration().getTimeInMillis(
-          Property.GENERAL_RPC_TIMEOUT)));
+      if (data != null && !new String(data).equals("master"))
+        servers.add(new ThriftTransportKey(new ServerServices(new String(data)).getAddressString(Service.TSERV_CLIENT), instance.getConfiguration().getPort(
+            Property.TSERV_CLIENTPORT), instance.getConfiguration().getTimeInMillis(Property.GENERAL_RPC_TIMEOUT)));
     }
     
     // add masters
@@ -75,7 +75,8 @@ public class ServerClient {
       opened = true;
       return client;
     } finally {
-      if (!opened) log.warn("Failed to find an available server in the list of servers: " + servers);
+      if (!opened)
+        log.warn("Failed to find an available server in the list of servers: " + servers);
     }
   }
   

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/Tables.java Thu Oct 27 15:24:51 2011
@@ -43,8 +43,10 @@ public class Tables {
     for (String tableId : tableIds) {
       byte[] tblPath = zc.get(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_NAME);
       if (tblPath != null) {
-        if (nameAsKey) tableMap.put(new String(tblPath), tableId);
-        else tableMap.put(tableId, new String(tblPath));
+        if (nameAsKey)
+          tableMap.put(new String(tblPath), tableId);
+        else
+          tableMap.put(tableId, new String(tblPath));
       }
     }
     
@@ -53,13 +55,15 @@ public class Tables {
   
   public static String getTableId(Instance instance, String tableName) throws TableNotFoundException {
     String tableId = getNameToIdMap(instance).get(tableName);
-    if (tableId == null) throw new TableNotFoundException(tableId, tableName, null);
+    if (tableId == null)
+      throw new TableNotFoundException(tableId, tableName, null);
     return tableId;
   }
   
   public static String getTableName(Instance instance, String tableId) throws TableNotFoundException {
     String tableName = getIdToNameMap(instance).get(tableId);
-    if (tableName == null) throw new TableNotFoundException(tableId, tableName, null);
+    if (tableName == null)
+      throw new TableNotFoundException(tableId, tableName, null);
     return tableName;
   }
   

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java Thu Oct 27 15:24:51 2011
@@ -75,7 +75,8 @@ public abstract class TabletLocator {
     }
     
     public boolean equals(Object o) {
-      if (o instanceof LocatorKey) return equals((LocatorKey) o);
+      if (o instanceof LocatorKey)
+        return equals((LocatorKey) o);
       return false;
     }
     

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java Thu Oct 27 15:24:51 2011
@@ -63,10 +63,15 @@ public class TabletLocatorImpl extends T
       
       int ret;
       
-      if (o1 == MAX_TEXT) if (o2 == MAX_TEXT) ret = 0;
-      else ret = 1;
-      else if (o2 == MAX_TEXT) ret = -1;
-      else ret = o1.compareTo(o2);
+      if (o1 == MAX_TEXT)
+        if (o2 == MAX_TEXT)
+          ret = 0;
+        else
+          ret = 1;
+      else if (o2 == MAX_TEXT)
+        ret = -1;
+      else
+        ret = o1.compareTo(o2);
       
       return ret;
     }
@@ -107,7 +112,8 @@ public class TabletLocatorImpl extends T
       AccumuloSecurityException, TableNotFoundException {
     
     OpTimer opTimer = null;
-    if (log.isTraceEnabled()) opTimer = new OpTimer(log, Level.TRACE).start("Binning " + mutations.size() + " mutations for table " + tableId);
+    if (log.isTraceEnabled())
+      opTimer = new OpTimer(log, Level.TRACE).start("Binning " + mutations.size() + " mutations for table " + tableId);
     
     ArrayList<Mutation> notInCache = new ArrayList<Mutation>();
     Text row = new Text();
@@ -125,8 +131,10 @@ public class TabletLocatorImpl extends T
       for (Mutation mutation : mutations) {
         row.set(mutation.getRow());
         TabletLocation tl = locateTabletInCache(row);
-        if (tl == null) notInCache.add(mutation);
-        else addMutation(binnedMutations, mutation, tl);
+        if (tl == null)
+          notInCache.add(mutation);
+        else
+          addMutation(binnedMutations, mutation, tl);
         
       }
     } finally {
@@ -167,8 +175,8 @@ public class TabletLocatorImpl extends T
       }
     }
     
-    if (opTimer != null) opTimer.stop("Binned " + mutations.size() + " mutations for table " + tableId + " to " + binnedMutations.size()
-        + " tservers in %DURATION%");
+    if (opTimer != null)
+      opTimer.stop("Binned " + mutations.size() + " mutations for table " + tableId + " to " + binnedMutations.size() + " tservers in %DURATION%");
   }
   
   private void addMutation(Map<String,TabletServerMutations> binnedMutations, Mutation mutation, TabletLocation tl) {
@@ -196,16 +204,20 @@ public class TabletLocatorImpl extends T
       
       if (range.getStartKey() != null) {
         startRow = range.getStartKey().getRow();
-      } else startRow = new Text();
+      } else
+        startRow = new Text();
       
       TabletLocation tl = null;
       
-      if (useCache) tl = locateTabletInCache(startRow);
-      else if (!lookupFailed) tl = _locateTablet(startRow, false, false, false);
+      if (useCache)
+        tl = locateTabletInCache(startRow);
+      else if (!lookupFailed)
+        tl = _locateTablet(startRow, false, false, false);
       
       if (tl == null) {
         failures.add(range);
-        if (!useCache) lookupFailed = true;
+        if (!useCache)
+          lookupFailed = true;
         continue;
       }
       
@@ -222,7 +234,8 @@ public class TabletLocatorImpl extends T
         
         if (tl == null) {
           failures.add(range);
-          if (!useCache) lookupFailed = true;
+          if (!useCache)
+            lookupFailed = true;
           continue l1;
         }
         tabletLocations.add(tl);
@@ -247,7 +260,8 @@ public class TabletLocatorImpl extends T
      */
     
     OpTimer opTimer = null;
-    if (log.isTraceEnabled()) opTimer = new OpTimer(log, Level.TRACE).start("Binning " + ranges.size() + " ranges for table " + tableId);
+    if (log.isTraceEnabled())
+      opTimer = new OpTimer(log, Level.TRACE).start("Binning " + ranges.size() + " ranges for table " + tableId);
     
     List<Range> failures;
     rLock.lock();
@@ -277,7 +291,8 @@ public class TabletLocatorImpl extends T
       }
     }
     
-    if (opTimer != null) opTimer.stop("Binned " + ranges.size() + " ranges for table " + tableId + " to " + binnedRanges.size() + " tservers in %DURATION%");
+    if (opTimer != null)
+      opTimer.stop("Binned " + ranges.size() + " ranges for table " + tableId + " to " + binnedRanges.size() + " tservers in %DURATION%");
     
     return failures;
   }
@@ -290,7 +305,8 @@ public class TabletLocatorImpl extends T
     } finally {
       wLock.unlock();
     }
-    if (log.isTraceEnabled()) log.trace("Invalidated extent=" + failedExtent);
+    if (log.isTraceEnabled())
+      log.trace("Invalidated extent=" + failedExtent);
   }
   
   @Override
@@ -301,7 +317,8 @@ public class TabletLocatorImpl extends T
     } finally {
       wLock.unlock();
     }
-    if (log.isTraceEnabled()) log.trace("Invalidated " + keySet.size() + " cache entries for table " + tableId);
+    if (log.isTraceEnabled())
+      log.trace("Invalidated " + keySet.size() + " cache entries for table " + tableId);
   }
   
   @Override
@@ -319,7 +336,8 @@ public class TabletLocatorImpl extends T
       wLock.unlock();
     }
     
-    if (log.isTraceEnabled()) log.trace("invalidated " + invalidatedCount + " cache entries  table=" + tableId + " server=" + server);
+    if (log.isTraceEnabled())
+      log.trace("invalidated " + invalidatedCount + " cache entries  table=" + tableId + " server=" + server);
     
   }
   
@@ -333,15 +351,17 @@ public class TabletLocatorImpl extends T
     } finally {
       wLock.unlock();
     }
-    if (log.isTraceEnabled()) log.trace("invalidated all " + invalidatedCount + " cache entries for table=" + tableId);
+    if (log.isTraceEnabled())
+      log.trace("invalidated all " + invalidatedCount + " cache entries for table=" + tableId);
   }
   
   @Override
   public TabletLocation locateTablet(Text row, boolean skipRow, boolean retry) throws AccumuloException, AccumuloSecurityException, TableNotFoundException {
     
     OpTimer opTimer = null;
-    if (log.isTraceEnabled()) opTimer = new OpTimer(log, Level.TRACE).start("Locating tablet  table=" + tableId + " row=" + TextUtil.truncate(row)
-        + "  skipRow=" + skipRow + " retry=" + retry);
+    if (log.isTraceEnabled())
+      opTimer = new OpTimer(log, Level.TRACE).start("Locating tablet  table=" + tableId + " row=" + TextUtil.truncate(row) + "  skipRow=" + skipRow + " retry="
+          + retry);
     
     while (true) {
       
@@ -351,12 +371,13 @@ public class TabletLocatorImpl extends T
       
       if (retry && tl == null) {
         UtilWaitThread.sleep(100);
-        if (log.isTraceEnabled()) log.trace("Failed to locate tablet containing row " + TextUtil.truncate(row) + " in table " + tableId + ", will retry...");
+        if (log.isTraceEnabled())
+          log.trace("Failed to locate tablet containing row " + TextUtil.truncate(row) + " in table " + tableId + ", will retry...");
         continue;
       }
       
-      if (opTimer != null) opTimer.stop("Located tablet " + (tl == null ? null : tl.tablet_extent) + " at " + (tl == null ? null : tl.tablet_location)
-          + " in %DURATION%");
+      if (opTimer != null)
+        opTimer.stop("Located tablet " + (tl == null ? null : tl.tablet_extent) + " at " + (tl == null ? null : tl.tablet_location) + " in %DURATION%");
       
       return tl;
     }
@@ -376,7 +397,8 @@ public class TabletLocatorImpl extends T
         if (er != null && er.compareTo(lastTabletRow) < 0) {
           // System.out.println("er "+er+"  ltr "+lastTabletRow);
           ptl = parent.locateTablet(er, true, retry);
-          if (ptl != null) locations = locationObtainer.lookupTablet(ptl, metadataRow, lastTabletRow, parent);
+          if (ptl != null)
+            locations = locationObtainer.lookupTablet(ptl, metadataRow, lastTabletRow, parent);
         }
       }
       
@@ -426,10 +448,12 @@ public class TabletLocatorImpl extends T
     
     // add it to cache
     Text er = tabletLocation.tablet_extent.getEndRow();
-    if (er == null) er = MAX_TEXT;
+    if (er == null)
+      er = MAX_TEXT;
     metaCache.put(er, tabletLocation);
     
-    if (badExtents.size() > 0) removeOverlapping(badExtents, tabletLocation.tablet_extent);
+    if (badExtents.size() > 0)
+      removeOverlapping(badExtents, tabletLocation.tablet_extent);
   }
   
   static void removeOverlapping(TreeMap<Text,TabletLocation> metaCache, KeyExtent nke) {
@@ -478,7 +502,8 @@ public class TabletLocatorImpl extends T
     
     if (entry != null) {
       KeyExtent ke = entry.getValue().tablet_extent;
-      if (ke.getPrevEndRow() == null || ke.getPrevEndRow().compareTo(row) < 0) return entry.getValue();
+      if (ke.getPrevEndRow() == null || ke.getPrevEndRow().compareTo(row) < 0)
+        return entry.getValue();
     }
     return null;
   }
@@ -493,23 +518,27 @@ public class TabletLocatorImpl extends T
     
     TabletLocation tl;
     
-    if (lock) rLock.lock();
+    if (lock)
+      rLock.lock();
     try {
       processInvalidated();
       tl = locateTabletInCache(row);
     } finally {
-      if (lock) rLock.unlock();
+      if (lock)
+        rLock.unlock();
     }
     
     if (tl == null) {
-      if (lock) wLock.lock();
+      if (lock)
+        wLock.lock();
       try {
         // not in cache, so obtain info
         lookupTabletLocation(row, retry);
         
         tl = locateTabletInCache(row);
       } finally {
-        if (lock) wLock.unlock();
+        if (lock)
+          wLock.unlock();
       }
     }
     
@@ -518,14 +547,16 @@ public class TabletLocatorImpl extends T
   
   private void processInvalidated() throws AccumuloSecurityException, AccumuloException, TableNotFoundException {
     
-    if (badExtents.size() == 0) return;
+    if (badExtents.size() == 0)
+      return;
     
     boolean writeLockHeld = rwLock.isWriteLockedByCurrentThread();
     try {
       if (!writeLockHeld) {
         rLock.unlock();
         wLock.lock();
-        if (badExtents.size() == 0) return;
+        if (badExtents.size() == 0)
+          return;
       }
       
       List<Range> lookups = new ArrayList<Range>(badExtents.size());

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchDeleter.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchDeleter.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchDeleter.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchDeleter.java Thu Oct 27 15:24:51 2011
@@ -72,7 +72,8 @@ public class TabletServerBatchDeleter ex
         bw.addMutation(m);
       }
     } finally {
-      if (bw != null) bw.close();
+      if (bw != null)
+        bw.close();
     }
   }
   

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java Thu Oct 27 15:24:51 2011
@@ -144,8 +144,10 @@ public class TabletServerBatchReaderIter
         try {
           resultsQueue.put(new MyEntry(key, value));
         } catch (InterruptedException e) {
-          if (TabletServerBatchReaderIterator.this.queryThreadPool.isShutdown()) log.debug("Failed to add Batch Scan result for key " + key, e);
-          else log.warn("Failed to add Batch Scan result for key " + key, e);
+          if (TabletServerBatchReaderIterator.this.queryThreadPool.isShutdown())
+            log.debug("Failed to add Batch Scan result for key " + key, e);
+          else
+            log.warn("Failed to add Batch Scan result for key " + key, e);
           fatalException = e;
           throw new RuntimeException(e);
           
@@ -165,14 +167,16 @@ public class TabletServerBatchReaderIter
   public boolean hasNext() {
     synchronized (nextLock) {
       // check if one was cached
-      if (nextEntry != null) return true;
+      if (nextEntry != null)
+        return true;
       
       // don't have one cached, try to cache one and return success
       try {
         while (nextEntry == null && fatalException == null)
           nextEntry = resultsQueue.poll(1, TimeUnit.SECONDS);
         
-        if (fatalException != null) throw new RuntimeException(fatalException);
+        if (fatalException != null)
+          throw new RuntimeException(fatalException);
         
         return nextEntry.getKey() != null && nextEntry.getValue() != null;
       } catch (InterruptedException e) {
@@ -220,7 +224,8 @@ public class TabletServerBatchReaderIter
       List<Range> failures = tabletLocator.binRanges(ranges, binnedRanges);
       
       if (failures.size() > 0) {
-        if (log.isTraceEnabled()) log.trace("Failed to bin " + failures.size() + " ranges, tablet locations were null, retrying in 100ms");
+        if (log.isTraceEnabled())
+          log.trace("Failed to bin " + failures.size() + " ranges, tablet locations were null, retrying in 100ms");
         try {
           Thread.sleep(100);
         } catch (InterruptedException e) {
@@ -235,7 +240,8 @@ public class TabletServerBatchReaderIter
   
   private void processFailures(Map<KeyExtent,List<Range>> failures, ResultReceiver receiver, List<Column> columns) throws AccumuloException,
       AccumuloSecurityException, TableNotFoundException {
-    if (log.isTraceEnabled()) log.trace("Failed to execute multiscans against " + failures.size() + " tablets, retrying...");
+    if (log.isTraceEnabled())
+      log.trace("Failed to execute multiscans against " + failures.size() + " tablets, retrying...");
     
     UtilWaitThread.sleep(failSleepTime);
     failSleepTime = Math.min(5000, failSleepTime * 2);
@@ -278,7 +284,8 @@ public class TabletServerBatchReaderIter
           
         }
         
-        if (map.size() == 0) iter.remove();
+        if (map.size() == 0)
+          iter.remove();
       }
       
       // merge
@@ -351,8 +358,10 @@ public class TabletServerBatchReaderIter
         log.debug(e.getMessage(), e);
         fatalException = e;
       } catch (Throwable t) {
-        if (queryThreadPool.isShutdown()) log.debug(t.getMessage(), t);
-        else log.warn(t.getMessage(), t);
+        if (queryThreadPool.isShutdown())
+          log.debug(t.getMessage(), t);
+        else
+          log.warn(t.getMessage(), t);
         fatalException = t;
       } finally {
         semaphore.release();
@@ -529,7 +538,8 @@ public class TabletServerBatchReaderIter
             Translator.RT));
         InitialMultiScan imsr = client.startMultiScan(null, credentials, thriftTabletRanges, Translator.translate(columns, Translator.CT),
             options.serverSideIteratorList, options.serverSideIteratorOptions, authorizations.getAuthorizations(), waitForWrites);
-        if (waitForWrites) ThriftScanner.serversWaitedForWrites.get(ttype).add(server);
+        if (waitForWrites)
+          ThriftScanner.serversWaitedForWrites.get(ttype).add(server);
         
         MultiScanResult scanResult = imsr.result;
         

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java Thu Oct 27 15:24:51 2011
@@ -156,7 +156,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);
@@ -167,7 +168,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();
@@ -180,8 +182,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();
     
@@ -190,7 +194,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) {
@@ -234,7 +239,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");
     
@@ -271,7 +277,8 @@ public class TabletServerBatchWriter {
   
   public synchronized void close() throws MutationsRejectedException {
     
-    if (closed) return;
+    if (closed)
+      return;
     
     Span span = Trace.start("close");
     try {
@@ -490,7 +497,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) {
@@ -585,13 +593,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());
@@ -606,7 +615,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;
     }
@@ -656,8 +666,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()) {
@@ -678,7 +689,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/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletType.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletType.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/TabletType.java (original)
+++ incubator/accumulo/branches/1.3/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/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java Thu Oct 27 15:24:51 2011
@@ -89,10 +89,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);
   }
@@ -106,7 +109,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);
@@ -121,7 +125,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.getAuthorizations(), waitForWrites, scanState.isolated);
-        if (waitForWrites) serversWaitedForWrites.get(ttype).add(server);
+        if (waitForWrites)
+          serversWaitedForWrites.get(ttype).add(server);
         
         Key.decompress(isr.result.results);
         
@@ -224,19 +229,23 @@ 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) {
               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 {
@@ -260,8 +269,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);
@@ -281,8 +292,10 @@ public class ThriftScanner {
           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);
@@ -291,14 +304,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;
           
@@ -306,16 +322,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) {
@@ -325,8 +345,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;
           
@@ -335,7 +357,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 {
@@ -355,7 +378,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);
     
@@ -365,7 +389,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;
       
@@ -380,12 +405,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.getAuthorizations(), 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);
@@ -419,8 +447,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/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportKey.java (original)
+++ incubator/accumulo/branches/1.3/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/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java (original)
+++ incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java Thu Oct 27 15:24:51 2011
@@ -345,7 +345,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;
             }
           }
@@ -385,7 +386,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;
         }
       }
@@ -407,7 +409,8 @@ public class ThriftTransportPool {
     }
     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);
     
@@ -444,10 +447,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);
             
@@ -465,7 +470,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);
@@ -488,7 +494,8 @@ public class ThriftTransportPool {
   public static ThriftTransportPool getInstance() {
     if (instance == null) {
       synchronized (ThriftTransportPool.class) {
-        if (instance == null) instance = new ThriftTransportPool();
+        if (instance == null)
+          instance = new ThriftTransportPool();
       }
     }
     return instance;

Modified: incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/Trie.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/Trie.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/Trie.java (original)
+++ incubator/accumulo/branches/1.3/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/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java?rev=1189806&r1=1189805&r2=1189806&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java (original)
+++ incubator/accumulo/branches/1.3/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);



Mime
View raw message