accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From medi...@apache.org
Subject svn commit: r1383500 - in /accumulo/trunk/core/src: main/java/org/apache/accumulo/core/ main/java/org/apache/accumulo/core/bloomfilter/ main/java/org/apache/accumulo/core/client/ main/java/org/apache/accumulo/core/client/impl/ test/java/org/apache/accu...
Date Tue, 11 Sep 2012 18:08:51 GMT
Author: medined
Date: Tue Sep 11 18:08:50 2012
New Revision: 1383500

URL: http://svn.apache.org/viewvc?rev=1383500&view=rev
Log:
add final to parameters .. guided by PMD

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/Constants.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/BloomFilter.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/DynamicBloomFilter.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/Filter.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/AccumuloException.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/AccumuloSecurityException.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/AccumuloServerException.java
    accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/ClientSideIteratorTest.java
    accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/Constants.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/Constants.java?rev=1383500&r1=1383499&r2=1383500&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/Constants.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/Constants.java Tue Sep 11 18:08:50
2012
@@ -165,27 +165,27 @@ public class Constants {
   public static final String EXPORT_FILE = "exportMetadata.zip";
   public static final String EXPORT_INFO_FILE = "accumulo_export_info.txt";
 
-  public static String getBaseDir(AccumuloConfiguration conf) {
+  public static String getBaseDir(final AccumuloConfiguration conf) {
     return conf.get(Property.INSTANCE_DFS_DIR);
   }
   
-  public static String getTablesDir(AccumuloConfiguration conf) {
+  public static String getTablesDir(final AccumuloConfiguration conf) {
     return getBaseDir(conf) + "/tables";
   }
   
-  public static String getRecoveryDir(AccumuloConfiguration conf) {
+  public static String getRecoveryDir(final AccumuloConfiguration conf) {
     return getBaseDir(conf) + "/recovery";
   }
   
-  public static Path getDataVersionLocation(AccumuloConfiguration conf) {
+  public static Path getDataVersionLocation(final AccumuloConfiguration conf) {
     return new Path(getBaseDir(conf) + "/version");
   }
   
-  public static String getMetadataTableDir(AccumuloConfiguration conf) {
+  public static String getMetadataTableDir(final AccumuloConfiguration conf) {
     return getTablesDir(conf) + "/" + METADATA_TABLE_ID;
   }
   
-  public static String getRootTabletDir(AccumuloConfiguration conf) {
+  public static String getRootTabletDir(final AccumuloConfiguration conf) {
     return getMetadataTableDir(conf) + ZROOT_TABLET;
   }
   
@@ -193,7 +193,7 @@ public class Constants {
    * @param conf
    * @return The write-ahead log directory.
    */
-  public static String getWalDirectory(AccumuloConfiguration conf) {
+  public static String getWalDirectory(final AccumuloConfiguration conf) {
     return getBaseDir(conf) + "/wal";
   }
 }

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/BloomFilter.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/BloomFilter.java?rev=1383500&r1=1383499&r2=1383500&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/BloomFilter.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/BloomFilter.java
Tue Sep 11 18:08:50 2012
@@ -99,14 +99,14 @@ public class BloomFilter extends Filter 
    * @param hashType
    *          type of the hashing function (see {@link org.apache.hadoop.util.hash.Hash}).
    */
-  public BloomFilter(int vectorSize, int nbHash, int hashType) {
+  public BloomFilter(final int vectorSize, final int nbHash, final int hashType) {
     super(vectorSize, nbHash, hashType);
     
     bits = new BitSet(this.vectorSize);
   }
   
   @Override
-  public boolean add(Key key) {
+  public boolean add(final Key key) {
     if (key == null) {
       throw new NullPointerException("key cannot be null");
     }
@@ -125,7 +125,7 @@ public class BloomFilter extends Filter 
   }
   
   @Override
-  public void and(Filter filter) {
+  public void and(final Filter filter) {
     if (filter == null || !(filter instanceof BloomFilter) || filter.vectorSize != this.vectorSize
|| filter.nbHash != this.nbHash) {
       throw new IllegalArgumentException("filters cannot be and-ed");
     }
@@ -134,7 +134,7 @@ public class BloomFilter extends Filter 
   }
   
   @Override
-  public boolean membershipTest(Key key) {
+  public boolean membershipTest(final Key key) {
     if (key == null) {
       throw new NullPointerException("key cannot be null");
     }
@@ -155,7 +155,7 @@ public class BloomFilter extends Filter 
   }
   
   @Override
-  public void or(Filter filter) {
+  public void or(final Filter filter) {
     if (filter == null || !(filter instanceof BloomFilter) || filter.vectorSize != this.vectorSize
|| filter.nbHash != this.nbHash) {
       throw new IllegalArgumentException("filters cannot be or-ed");
     }
@@ -163,7 +163,7 @@ public class BloomFilter extends Filter 
   }
   
   @Override
-  public void xor(Filter filter) {
+  public void xor(final Filter filter) {
     if (filter == null || !(filter instanceof BloomFilter) || filter.vectorSize != this.vectorSize
|| filter.nbHash != this.nbHash) {
       throw new IllegalArgumentException("filters cannot be xor-ed");
     }
@@ -185,7 +185,7 @@ public class BloomFilter extends Filter 
   // Writable
   
   @Override
-  public void write(DataOutput out) throws IOException {
+  public void write(final DataOutput out) throws IOException {
     super.write(out);
     
     ByteArrayOutputStream boas = new ByteArrayOutputStream();
@@ -198,7 +198,7 @@ public class BloomFilter extends Filter 
   }
   
   @Override
-  public void readFields(DataInput in) throws IOException {
+  public void readFields(final DataInput in) throws IOException {
     
     super.readFields(in);
     

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/DynamicBloomFilter.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/DynamicBloomFilter.java?rev=1383500&r1=1383499&r2=1383500&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/DynamicBloomFilter.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/DynamicBloomFilter.java
Tue Sep 11 18:08:50 2012
@@ -113,7 +113,7 @@ public class DynamicBloomFilter extends 
    * @param nr
    *          The threshold for the maximum number of keys to record in a dynamic Bloom filter
row.
    */
-  public DynamicBloomFilter(int vectorSize, int nbHash, int hashType, int nr) {
+  public DynamicBloomFilter(final int vectorSize, final int nbHash, final int hashType, final
int nr) {
     super(vectorSize, nbHash, hashType);
     
     this.nr = nr;
@@ -124,7 +124,7 @@ public class DynamicBloomFilter extends 
   }
   
   @Override
-  public boolean add(Key key) {
+  public boolean add(final Key key) {
     if (key == null) {
       throw new NullPointerException("Key can not be null");
     }
@@ -146,7 +146,7 @@ public class DynamicBloomFilter extends 
   }
   
   @Override
-  public void and(Filter filter) {
+  public void and(final Filter filter) {
     if (filter == null || !(filter instanceof DynamicBloomFilter) || filter.vectorSize !=
this.vectorSize || filter.nbHash != this.nbHash) {
       throw new IllegalArgumentException("filters cannot be and-ed");
     }
@@ -163,7 +163,7 @@ public class DynamicBloomFilter extends 
   }
   
   @Override
-  public boolean membershipTest(Key key) {
+  public boolean membershipTest(final Key key) {
     if (key == null) {
       return true;
     }
@@ -185,7 +185,7 @@ public class DynamicBloomFilter extends 
   }
   
   @Override
-  public void or(Filter filter) {
+  public void or(final Filter filter) {
     if (filter == null || !(filter instanceof DynamicBloomFilter) || filter.vectorSize !=
this.vectorSize || filter.nbHash != this.nbHash) {
       throw new IllegalArgumentException("filters cannot be or-ed");
     }
@@ -201,7 +201,7 @@ public class DynamicBloomFilter extends 
   }
   
   @Override
-  public void xor(Filter filter) {
+  public void xor(final Filter filter) {
     if (filter == null || !(filter instanceof DynamicBloomFilter) || filter.vectorSize !=
this.vectorSize || filter.nbHash != this.nbHash) {
       throw new IllegalArgumentException("filters cannot be xor-ed");
     }
@@ -230,7 +230,7 @@ public class DynamicBloomFilter extends 
   // Writable
   
   @Override
-  public void write(DataOutput out) throws IOException {
+  public void write(final DataOutput out) throws IOException {
     super.write(out);
     out.writeInt(nr);
     out.writeInt(currentNbRecord);
@@ -241,7 +241,7 @@ public class DynamicBloomFilter extends 
   }
   
   @Override
-  public void readFields(DataInput in) throws IOException {
+  public void readFields(final DataInput in) throws IOException {
     
     super.readFields(in);
     

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/Filter.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/Filter.java?rev=1383500&r1=1383499&r2=1383500&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/Filter.java (original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/bloomfilter/Filter.java Tue
Sep 11 18:08:50 2012
@@ -101,7 +101,7 @@ public abstract class Filter implements 
    * @param hashType
    *          type of the hashing function (see {@link Hash}).
    */
-  protected Filter(int vectorSize, int nbHash, int hashType) {
+  protected Filter(final int vectorSize, final int nbHash, final int hashType) {
     this.vectorSize = vectorSize;
     this.nbHash = nbHash;
     this.hashType = hashType;
@@ -169,7 +169,7 @@ public abstract class Filter implements 
    * @param keys
    *          The list of keys.
    */
-  public void add(List<Key> keys) {
+  public void add(final List<Key> keys) {
     if (keys == null) {
       throw new IllegalArgumentException("ArrayList<Key> may not be null");
     }
@@ -185,7 +185,7 @@ public abstract class Filter implements 
    * @param keys
    *          The collection of keys.
    */
-  public void add(Collection<Key> keys) {
+  public void add(final Collection<Key> keys) {
     if (keys == null) {
       throw new IllegalArgumentException("Collection<Key> may not be null");
     }
@@ -211,7 +211,7 @@ public abstract class Filter implements 
   
   // Writable interface
   
-  public void write(DataOutput out) throws IOException {
+  public void write(final DataOutput out) throws IOException {
     out.writeInt(VERSION);
     out.writeInt(this.nbHash);
     out.writeByte(this.hashType);
@@ -226,8 +226,8 @@ public abstract class Filter implements 
     return VERSION;
   }
   
-  public void readFields(DataInput in) throws IOException {
-    int ver = in.readInt();
+  public void readFields(final DataInput in) throws IOException {
+    final int ver = in.readInt();
     rVersion = ver;
     if (ver > 0) { // old unversioned format
       this.nbHash = ver;

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/AccumuloException.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/AccumuloException.java?rev=1383500&r1=1383499&r2=1383500&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/AccumuloException.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/AccumuloException.java
Tue Sep 11 18:08:50 2012
@@ -28,7 +28,7 @@ public class AccumuloException extends E
    * @param why
    *          is the reason for the error being thrown
    */
-  public AccumuloException(String why) {
+  public AccumuloException(final String why) {
     super(why);
   }
   
@@ -36,7 +36,7 @@ public class AccumuloException extends E
    * @param cause
    *          is the exception that this exception wraps
    */
-  public AccumuloException(Throwable cause) {
+  public AccumuloException(final Throwable cause) {
     super(cause);
   }
   
@@ -46,7 +46,7 @@ public class AccumuloException extends E
    * @param cause
    *          is the exception that this exception wraps
    */
-  public AccumuloException(String why, Throwable cause) {
+  public AccumuloException(final String why, final Throwable cause) {
     super(why, cause);
   }
   

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/AccumuloSecurityException.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/AccumuloSecurityException.java?rev=1383500&r1=1383499&r2=1383500&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/AccumuloSecurityException.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/AccumuloSecurityException.java
Tue Sep 11 18:08:50 2012
@@ -26,7 +26,7 @@ import org.apache.accumulo.core.security
 public class AccumuloSecurityException extends Exception {
   private static final long serialVersionUID = 1L;
   
-  private static String getDefaultErrorMessage(SecurityErrorCode errorcode) {
+  private static String getDefaultErrorMessage(final SecurityErrorCode errorcode) {
     switch (errorcode) {
       case BAD_CREDENTIALS:
         return "Username or Password is Invalid";
@@ -66,7 +66,7 @@ public class AccumuloSecurityException e
    * @param cause
    *          the exception that caused this violation
    */
-  public AccumuloSecurityException(String user, SecurityErrorCode errorcode, Throwable cause)
{
+  public AccumuloSecurityException(final String user, final SecurityErrorCode errorcode,
final Throwable cause) {
     super(getDefaultErrorMessage(errorcode), cause);
     this.user = user;
     this.errorCode = errorcode == null ? SecurityErrorCode.DEFAULT_SECURITY_ERROR : errorcode;
@@ -78,7 +78,7 @@ public class AccumuloSecurityException e
    * @param errorcode
    *          the specific reason for this exception
    */
-  public AccumuloSecurityException(String user, SecurityErrorCode errorcode) {
+  public AccumuloSecurityException(final String user, final SecurityErrorCode errorcode)
{
     super(getDefaultErrorMessage(errorcode));
     this.user = user;
     this.errorCode = errorcode == null ? SecurityErrorCode.DEFAULT_SECURITY_ERROR : errorcode;

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java?rev=1383500&r1=1383499&r2=1383500&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
Tue Sep 11 18:08:50 2012
@@ -72,12 +72,12 @@ public class ClientSideIteratorScanner e
      * @param scanner
      *          the scanner to iterate over
      */
-    public ScannerTranslator(Scanner scanner) {
+    public ScannerTranslator(final Scanner scanner) {
       this.scanner = scanner;
     }
     
     @Override
-    public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String>
options, IteratorEnvironment env) throws IOException {
+    public void init(final SortedKeyValueIterator<Key,Value> source, final Map<String,String>
options, final IteratorEnvironment env) throws IOException {
       throw new UnsupportedOperationException();
     }
     
@@ -95,9 +95,10 @@ public class ClientSideIteratorScanner e
     }
     
     @Override
-    public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean
inclusive) throws IOException {
-      if (!inclusive && columnFamilies.size() > 0)
+    public void seek(final Range range, final Collection<ByteSequence> columnFamilies,
final boolean inclusive) throws IOException {
+      if (!inclusive && columnFamilies.size() > 0) {
         throw new IllegalArgumentException();
+      }
       scanner.setRange(range);
       scanner.clearColumns();
       for (ByteSequence colf : columnFamilies) {
@@ -118,7 +119,7 @@ public class ClientSideIteratorScanner e
     }
     
     @Override
-    public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env) {
+    public SortedKeyValueIterator<Key,Value> deepCopy(final IteratorEnvironment env)
{
       return new ScannerTranslator(scanner);
     }
   }
@@ -131,7 +132,7 @@ public class ClientSideIteratorScanner e
    * @param scanner
    *          the source scanner
    */
-  public ClientSideIteratorScanner(Scanner scanner) {
+  public ClientSideIteratorScanner(final Scanner scanner) {
     smi = new ScannerTranslator(scanner);
     this.range = scanner.getRange();
     this.size = scanner.getBatchSize();
@@ -143,7 +144,7 @@ public class ClientSideIteratorScanner e
    * 
    * @param scanner
    */
-  public void setSource(Scanner scanner) {
+  public void setSource(final Scanner scanner) {
     smi = new ScannerTranslator(scanner);
   }
   
@@ -156,7 +157,7 @@ public class ClientSideIteratorScanner e
     else
       smi.scanner.disableIsolation();
     
-    TreeMap<Integer,IterInfo> tm = new TreeMap<Integer,IterInfo>();
+    final TreeMap<Integer,IterInfo> tm = new TreeMap<Integer,IterInfo>();
     
     for (IterInfo iterInfo : serverSideIteratorList) {
       tm.put(iterInfo.getPriority(), iterInfo);
@@ -166,7 +167,7 @@ public class ClientSideIteratorScanner e
     try {
       skvi = IteratorUtil.loadIterators(smi, tm.values(), serverSideIteratorOptions, new
IteratorEnvironment() {
         @Override
-        public SortedKeyValueIterator<Key,Value> reserveMapFileReader(String mapFileName)
throws IOException {
+        public SortedKeyValueIterator<Key,Value> reserveMapFileReader(final String
mapFileName) throws IOException {
           return null;
         }
         
@@ -186,13 +187,13 @@ public class ClientSideIteratorScanner e
         }
         
         @Override
-        public void registerSideChannel(SortedKeyValueIterator<Key,Value> iter) {}
+        public void registerSideChannel(final SortedKeyValueIterator<Key,Value> iter)
{}
       }, false);
     } catch (IOException e) {
       throw new RuntimeException(e);
     }
     
-    Set<ByteSequence> colfs = new TreeSet<ByteSequence>();
+    final Set<ByteSequence> colfs = new TreeSet<ByteSequence>();
     for (Column c : this.getFetchedColumns()) {
       colfs.add(new ArrayByteSequence(c.getColumnFamily()));
     }
@@ -207,7 +208,7 @@ public class ClientSideIteratorScanner e
   }
   
   @Override
-  public void setTimeOut(int timeOut) {
+  public void setTimeOut(final int timeOut) {
     this.timeOut = timeOut;
   }
   
@@ -217,7 +218,7 @@ public class ClientSideIteratorScanner e
   }
   
   @Override
-  public void setRange(Range range) {
+  public void setRange(final Range range) {
     this.range = range;
   }
   
@@ -227,7 +228,7 @@ public class ClientSideIteratorScanner e
   }
   
   @Override
-  public void setBatchSize(int size) {
+  public void setBatchSize(final int size) {
     this.size = size;
   }
   

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/AccumuloServerException.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/AccumuloServerException.java?rev=1383500&r1=1383499&r2=1383500&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/AccumuloServerException.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/AccumuloServerException.java
Tue Sep 11 18:08:50 2012
@@ -28,12 +28,12 @@ public class AccumuloServerException ext
   private static final long serialVersionUID = 1L;
   private String server;
   
-  public AccumuloServerException(String server, TApplicationException tae) {
+  public AccumuloServerException(final String server, final TApplicationException tae) {
     super("Error on server " + server, tae);
     this.setServer(server);
   }
   
-  private void setServer(String server) {
+  private void setServer(final String server) {
     this.server = server;
   }
   

Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/ClientSideIteratorTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/ClientSideIteratorTest.java?rev=1383500&r1=1383499&r2=1383500&view=diff
==============================================================================
--- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/ClientSideIteratorTest.java
(original)
+++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/ClientSideIteratorTest.java
Tue Sep 11 18:08:50 2012
@@ -53,7 +53,7 @@ public class ClientSideIteratorTest {
     resultSet3.add(new Key("part2", "", "DOC2"));
   }
   
-  public void checkResults(Iterable<Entry<Key,Value>> scanner, List<Key>
results, PartialKey pk) {
+  public void checkResults(final Iterable<Entry<Key,Value>> scanner, final List<Key>
results, final PartialKey pk) {
     int i = 0;
     for (Entry<Key,Value> entry : scanner) {
       assertTrue(entry.getKey().equals(results.get(i++), pk));
@@ -83,8 +83,8 @@ public class ClientSideIteratorTest {
     bw.addMutation(m);
     bw.flush();
     
-    ClientSideIteratorScanner csis = new ClientSideIteratorScanner(conn.createScanner("intersect",
new Authorizations()));
-    IteratorSetting si = new IteratorSetting(10, "intersect", IntersectingIterator.class);
+    final ClientSideIteratorScanner csis = new ClientSideIteratorScanner(conn.createScanner("intersect",
new Authorizations()));
+    final IteratorSetting si = new IteratorSetting(10, "intersect", IntersectingIterator.class);
     IntersectingIterator.setColumnFamilies(si, new Text[] {new Text("bar"), new Text("foo")});
     csis.addScanIterator(si);
     
@@ -93,13 +93,13 @@ public class ClientSideIteratorTest {
   
   @Test
   public void testVersioning() throws Exception {
-    Instance instance = new MockInstance("local");
-    Connector conn = instance.getConnector("root", "".getBytes());
+    final Instance instance = new MockInstance("local");
+    final Connector conn = instance.getConnector("root", "".getBytes());
     conn.tableOperations().create("table");
     conn.tableOperations().removeProperty("table", "table.iterator.scan.vers");
     conn.tableOperations().removeProperty("table", "table.iterator.majc.vers");
     conn.tableOperations().removeProperty("table", "table.iterator.minc.vers");
-    BatchWriter bw = conn.createBatchWriter("table", 1000, 10l, 1);
+    final BatchWriter bw = conn.createBatchWriter("table", 1000, 10l, 1);
     Mutation m = new Mutation("row1");
     m.put("colf", "colq", 1l, "value");
     m.put("colf", "colq", 2l, "value");
@@ -111,10 +111,10 @@ public class ClientSideIteratorTest {
     bw.addMutation(m);
     bw.flush();
     
-    Scanner scanner = conn.createScanner("table", new Authorizations());
+    final Scanner scanner = conn.createScanner("table", new Authorizations());
     
-    ClientSideIteratorScanner csis = new ClientSideIteratorScanner(scanner);
-    IteratorSetting si = new IteratorSetting(10, "localvers", VersioningIterator.class);
+    final ClientSideIteratorScanner csis = new ClientSideIteratorScanner(scanner);
+    final IteratorSetting si = new IteratorSetting(10, "localvers", VersioningIterator.class);
     si.addOption("maxVersions", "2");
     csis.addScanIterator(si);
     

Modified: accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java?rev=1383500&r1=1383499&r2=1383500&view=diff
==============================================================================
--- accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java
(original)
+++ accumulo/trunk/core/src/test/java/org/apache/accumulo/core/client/RowIteratorTest.java
Tue Sep 11 18:08:50 2012
@@ -35,23 +35,23 @@ import org.junit.Test;
 
 public class RowIteratorTest {
   
-  Iterator<Entry<Key,Value>> makeIterator(String... args) {
-    Map<Key,Value> result = new TreeMap<Key,Value>();
+  Iterator<Entry<Key,Value>> makeIterator(final String... args) {
+    final Map<Key,Value> result = new TreeMap<Key,Value>();
     for (String s : args) {
-      String parts[] = s.split("[ \t]");
-      Key key = new Key(parts[0], parts[1], parts[2]);
-      Value value = new Value(parts[3].getBytes());
+      final String parts[] = s.split("[ \t]");
+      final Key key = new Key(parts[0], parts[1], parts[2]);
+      final Value value = new Value(parts[3].getBytes());
       result.put(key, value);
     }
     return result.entrySet().iterator();
   }
   
-  List<List<Entry<Key,Value>>> getRows(Iterator<Entry<Key,Value>>
iter) {
-    List<List<Entry<Key,Value>>> result = new ArrayList<List<Entry<Key,Value>>>();
-    RowIterator riter = new RowIterator(iter);
+  List<List<Entry<Key,Value>>> getRows(final Iterator<Entry<Key,Value>>
iter) {
+    final List<List<Entry<Key,Value>>> result = new ArrayList<List<Entry<Key,Value>>>();
+    final RowIterator riter = new RowIterator(iter);
     while (riter.hasNext()) {
-      Iterator<Entry<Key,Value>> row = riter.next();
-      List<Entry<Key,Value>> rlist = new ArrayList<Entry<Key,Value>>();
+      final Iterator<Entry<Key,Value>> row = riter.next();
+      final List<Entry<Key,Value>> rlist = new ArrayList<Entry<Key,Value>>();
       while (row.hasNext())
         rlist.add(row.next());
       result.add(rlist);
@@ -100,7 +100,7 @@ public class RowIteratorTest {
   
   @Test
   public void testUnreadRow() {
-    RowIterator i = new RowIterator(makeIterator("a b c d", "a 1 2 3", "b 1 2 3"));
+    final RowIterator i = new RowIterator(makeIterator("a b c d", "a 1 2 3", "b 1 2 3"));
     assertTrue(i.hasNext());
     Iterator<Entry<Key,Value>> firstRow = i.next();
     assertEquals(0, i.getKVCount());



Mime
View raw message