hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r755878 [3/4] - in /hadoop/hbase/trunk: ./ src/java/org/apache/hadoop/hbase/ src/java/org/apache/hadoop/hbase/client/ src/java/org/apache/hadoop/hbase/client/tableindexed/ src/java/org/apache/hadoop/hbase/client/transactional/ src/java/org/...
Date Thu, 19 Mar 2009 09:03:20 GMT
Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/transactional/TransactionState.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/transactional/TransactionState.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/transactional/TransactionState.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/transactional/TransactionState.java Thu Mar 19 09:03:08 2009
@@ -67,9 +67,9 @@
    * Simple container of the range of the scanners we've opened. Used to check
    * for conflicting writes.
    */
-  private class ScanRange {
-    private byte[] startRow;
-    private byte[] endRow;
+  private static class ScanRange {
+    protected byte[] startRow;
+    protected byte[] endRow;
 
     public ScanRange(byte[] startRow, byte[] endRow) {
       this.startRow = startRow;
@@ -80,7 +80,7 @@
      * Check if this scan range contains the given key.
      * 
      * @param rowKey
-     * @return
+     * @return boolean
      */
     public boolean contains(byte[] rowKey) {
       if (startRow != null && Bytes.compareTo(rowKey, startRow) < 0) {
@@ -260,7 +260,7 @@
   /**
    * Set the startSequenceNumber.
    * 
-   * @param startSequenceNumber.
+   * @param startSequenceNumber
    */
   void setStartSequenceNumber(final int startSequenceNumber) {
     this.startSequenceNumber = startSequenceNumber;

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/transactional/TransactionalRegion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/transactional/TransactionalRegion.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/transactional/TransactionalRegion.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/transactional/TransactionalRegion.java Thu Mar 19 09:03:08 2009
@@ -86,7 +86,7 @@
   static final Log LOG = LogFactory.getLog(TransactionalRegion.class);
 
   // Collection of active transactions (PENDING) keyed by id.
-  private Map<String, TransactionState> transactionsById = new HashMap<String, TransactionState>();
+  protected Map<String, TransactionState> transactionsById = new HashMap<String, TransactionState>();
 
   // Map of recent transactions that are COMMIT_PENDING or COMMITED keyed by
   // their sequence number
@@ -533,7 +533,7 @@
     transactionsById.remove(key);
   }
 
-  private TransactionState getTransactionState(final long transactionId)
+  protected TransactionState getTransactionState(final long transactionId)
       throws UnknownTransactionException {
     String key = String.valueOf(transactionId);
     TransactionState state = null;
@@ -622,8 +622,7 @@
   }
 
   // TODO, resolve from the global transaction log
-  @SuppressWarnings("unused")
-  private void resolveTransactionFromLog(final long transactionId) {
+  protected void resolveTransactionFromLog() {
     throw new RuntimeException("Globaql transaction log is not Implemented");
   }
 
@@ -653,7 +652,7 @@
         LOG.info("Transaction " + s.getTransactionId()
             + " expired in COMMIT_PENDING state");
         LOG.info("Checking transaction status in transaction log");
-        resolveTransactionFromLog(s.getTransactionId());
+        resolveTransactionFromLog();
         break;
       default:
         LOG.warn("Unexpected status on expired lease");

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/AbstractController.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/AbstractController.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/AbstractController.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/AbstractController.java Thu Mar 19 09:03:08 2009
@@ -21,8 +21,6 @@
 
 import java.util.Map;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
@@ -31,8 +29,6 @@
 import org.apache.hadoop.hbase.util.Bytes;
 
 public abstract class AbstractController implements RESTConstants {
-
-  private Log LOG = LogFactory.getLog(AbstractController.class);
   protected Configuration conf;
   protected AbstractModel model;
 

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/AbstractModel.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/AbstractModel.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/AbstractModel.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/AbstractModel.java Thu Mar 19 09:03:08 2009
@@ -49,7 +49,7 @@
     public static Encoding EBase64 = new Encoding() {
 
       public String encode(byte[] b) throws HBaseRestException {
-        return new String(Base64.encodeBytes(b));
+        return Base64.encodeBytes(b);
       }
     };
     public static Encoding EUTF8 = new Encoding() {
@@ -60,7 +60,7 @@
     };
   }
 
-  protected static Encodings.Encoding encoding = Encodings.EUTF8;
+  protected static final Encodings.Encoding encoding = Encodings.EUTF8;
 
   public void initialize(HBaseConfiguration conf, HBaseAdmin admin) {
     this.conf = conf;
@@ -85,7 +85,7 @@
     }
   }
 
-  protected static byte COLON = Bytes.toBytes(":")[0];
+  protected static final byte COLON = Bytes.toBytes(":")[0];
 
   protected boolean isColumnFamily(byte[] columnName) {
     for (int i = 0; i < columnName.length; i++) {

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/DatabaseController.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/DatabaseController.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/DatabaseController.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/DatabaseController.java Thu Mar 19 09:03:08 2009
@@ -38,8 +38,7 @@
   }
 
   @Override
-  protected AbstractModel generateModel(
-      @SuppressWarnings("hiding") HBaseConfiguration conf,
+  protected AbstractModel generateModel(HBaseConfiguration conf,
       HBaseAdmin admin) {
     return new DatabaseModel(conf, admin);
   }

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/Dispatcher.java Thu Mar 19 09:03:08 2009
@@ -21,9 +21,7 @@
 
 import java.io.BufferedReader;
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 import java.util.Map;
 
 import javax.servlet.ServletException;
@@ -42,7 +40,6 @@
 import org.apache.hadoop.hbase.util.InfoServer;
 import org.mortbay.http.NCSARequestLog;
 import org.mortbay.http.SocketListener;
-import org.mortbay.jetty.servlet.WebApplicationContext;
 
 /**
  * Servlet implementation class for hbase REST interface. Presumes container
@@ -389,8 +386,7 @@
     }
   }
 
-  protected IHBaseRestParser getParser(HttpServletRequest request)
-      throws HBaseRestException {
+  protected IHBaseRestParser getParser(HttpServletRequest request) {
     return HBaseRestParserFactory.getParser(ContentType.getContentType(request
         .getHeader("content-type")));
   }
@@ -478,8 +474,7 @@
     NCSARequestLog ncsa = new NCSARequestLog();
     ncsa.setLogLatency(true);
     webServer.setRequestLog(ncsa);
-    WebApplicationContext context = webServer.addWebApplication("/", InfoServer
-        .getWebAppDir("rest"));
+    webServer.addWebApplication("/", InfoServer.getWebAppDir("rest"));
     webServer.start();
   }
 

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/RESTConstants.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/RESTConstants.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/RESTConstants.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/RESTConstants.java Thu Mar 19 09:03:08 2009
@@ -77,7 +77,7 @@
 
   static class FactoryMap {
 
-    protected static boolean created = false;
+    static boolean created = false;
     protected HashMap<String, FilterFactory> map = new HashMap<String, FilterFactory>();
 
     protected FactoryMap() {
@@ -89,9 +89,8 @@
         FactoryMap f = new FactoryMap();
         f.initialize();
         return f;
-      } else {
-        return null;
       }
+      return null;
     }
 
     public FilterFactory get(String c) {

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/RowController.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/RowController.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/RowController.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/RowController.java Thu Mar 19 09:03:08 2009
@@ -42,8 +42,8 @@
   }
 
   @Override
-  protected AbstractModel generateModel(
-      @SuppressWarnings("hiding") HBaseConfiguration conf, HBaseAdmin admin) {
+  protected AbstractModel generateModel(HBaseConfiguration conf,
+      HBaseAdmin admin) {
     return new RowModel(conf, admin);
   }
 

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/ScannerModel.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/ScannerModel.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/ScannerModel.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/ScannerModel.java Thu Mar 19 09:03:08 2009
@@ -25,8 +25,6 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.HBaseConfiguration;
 import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
@@ -42,9 +40,6 @@
  */
 public class ScannerModel extends AbstractModel {
 
-  @SuppressWarnings("unused")
-  private Log LOG = LogFactory.getLog(TableModel.class);
-
   public ScannerModel(HBaseConfiguration config, HBaseAdmin admin) {
     super.initialize(config, admin);
   }
@@ -54,11 +49,11 @@
   //
   protected static class ScannerMaster {
 
-    protected static Map<Integer, Scanner> scannerMap = new ConcurrentHashMap<Integer, Scanner>();
-    protected static AtomicInteger nextScannerId = new AtomicInteger(1);
+    protected static final Map<Integer, Scanner> scannerMap = new ConcurrentHashMap<Integer, Scanner>();
+    protected static final AtomicInteger nextScannerId = new AtomicInteger(1);
 
     public Integer addScanner(Scanner scanner) {
-      Integer i = new Integer(nextScannerId.getAndIncrement());
+      Integer i = Integer.valueOf(nextScannerId.getAndIncrement());
       scannerMap.put(i, scanner);
       return i;
     }
@@ -81,7 +76,7 @@
     }
   }
 
-  protected static ScannerMaster scannerMaster = new ScannerMaster();
+  protected static final ScannerMaster scannerMaster = new ScannerMaster();
 
   /**
    * returns the next numResults RowResults from the Scaner mapped to Integer

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableController.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableController.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableController.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableController.java Thu Mar 19 09:03:08 2009
@@ -43,7 +43,7 @@
 
   @Override
   protected AbstractModel generateModel(
-      @SuppressWarnings("hiding") HBaseConfiguration conf, HBaseAdmin admin) {
+      HBaseConfiguration conf, HBaseAdmin admin) {
     return new TableModel(conf, admin);
   }
 

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableModel.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableModel.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableModel.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TableModel.java Thu Mar 19 09:03:08 2009
@@ -143,11 +143,10 @@
 
   /**
    * Get table metadata.
-   * 
-   * @param request
-   * @param response
+   *
    * @param tableName
-   * @throws IOException
+   * @return HTableDescriptor
+   * @throws HBaseRestException
    */
   public HTableDescriptor getTableMetadata(final String tableName)
       throws HBaseRestException {
@@ -173,9 +172,9 @@
 
   /**
    * Return region offsets.
-   * 
-   * @param request
-   * @param response
+   * @param tableName 
+   * @return Regions
+   * @throws HBaseRestException 
    */
   public Regions getTableRegions(final String tableName)
       throws HBaseRestException {
@@ -239,7 +238,7 @@
     }
   }
 
-  public class Regions implements ISerializable {
+  public static class Regions implements ISerializable {
     byte[][] regionKey;
 
     public Regions(byte[][] bs) {

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TimestampController.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TimestampController.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TimestampController.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TimestampController.java Thu Mar 19 09:03:08 2009
@@ -42,7 +42,7 @@
 
   @Override
   protected AbstractModel generateModel(
-      @SuppressWarnings("hiding") HBaseConfiguration conf, HBaseAdmin admin) {
+      HBaseConfiguration conf, HBaseAdmin admin) {
     return new TimestampModel(conf, admin);
   }
 

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TimestampModel.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TimestampModel.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TimestampModel.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/TimestampModel.java Thu Mar 19 09:03:08 2009
@@ -95,7 +95,7 @@
    * @param tableName
    * @param rowName
    * @param timestamp
-   * @return
+   * @return RowResult
    * @throws HBaseRestException
    */
   public RowResult get(byte[] tableName, byte[] rowName, long timestamp)

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/descriptors/RestCell.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/descriptors/RestCell.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/descriptors/RestCell.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/descriptors/RestCell.java Thu Mar 19 09:03:08 2009
@@ -41,7 +41,8 @@
   }
   
   /**
-   * 
+   * @param name 
+   * @param cell
    */
   public RestCell(byte[] name, Cell cell) {
     super(cell.getValue(), cell.getTimestamp());

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/filter/FilterFactoryConstants.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/filter/FilterFactoryConstants.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/filter/FilterFactoryConstants.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/filter/FilterFactoryConstants.java Thu Mar 19 09:03:08 2009
@@ -29,6 +29,7 @@
   static String VALUE = "value";
 
   static class MalformedFilterException extends HBaseRestException {
+    private static final long serialVersionUID = 1L;
 
     public MalformedFilterException() {
     }

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/filter/RowFilterSetFactory.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/filter/RowFilterSetFactory.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/filter/RowFilterSetFactory.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/filter/RowFilterSetFactory.java Thu Mar 19 09:03:08 2009
@@ -25,7 +25,6 @@
 import org.apache.hadoop.hbase.filter.RowFilterSet;
 import org.apache.hadoop.hbase.rest.RESTConstants;
 import org.apache.hadoop.hbase.rest.exception.HBaseRestException;
-import org.apache.hadoop.hbase.rest.filter.FilterFactoryConstants.MalformedFilterException;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/parser/IHBaseRestParser.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/parser/IHBaseRestParser.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/parser/IHBaseRestParser.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/parser/IHBaseRestParser.java Thu Mar 19 09:03:08 2009
@@ -35,7 +35,7 @@
    * Parses a HTableDescriptor given the input array.
    * 
    * @param input
-   * @return
+   * @return HTableDescriptor
    * @throws HBaseRestException
    */
   public HTableDescriptor getTableDescriptor(byte[] input)

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/parser/JsonRestParser.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/parser/JsonRestParser.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/parser/JsonRestParser.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/parser/JsonRestParser.java Thu Mar 19 09:03:08 2009
@@ -23,7 +23,6 @@
 
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.io.hfile.Compression;
 import org.apache.hadoop.hbase.rest.RESTConstants;
 import org.apache.hadoop.hbase.rest.descriptors.RowUpdateDescriptor;
 import org.apache.hadoop.hbase.rest.descriptors.ScannerDescriptor;

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/parser/XMLRestParser.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/parser/XMLRestParser.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/parser/XMLRestParser.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/parser/XMLRestParser.java Thu Mar 19 09:03:08 2009
@@ -27,13 +27,10 @@
 
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.HColumnDescriptor.CompressionType;
-import org.apache.hadoop.hbase.io.hfile.Compression;
 import org.apache.hadoop.hbase.rest.RESTConstants;
 import org.apache.hadoop.hbase.rest.descriptors.RowUpdateDescriptor;
 import org.apache.hadoop.hbase.rest.descriptors.ScannerDescriptor;
 import org.apache.hadoop.hbase.rest.exception.HBaseRestException;
-import org.apache.hadoop.hbase.thrift.generated.Hbase;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/serializer/AbstractRestSerializer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/serializer/AbstractRestSerializer.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/serializer/AbstractRestSerializer.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/rest/serializer/AbstractRestSerializer.java Thu Mar 19 09:03:08 2009
@@ -47,6 +47,7 @@
    * should be called whenever creating a RestSerializer object.
    * 
    * @param response
+   * @param prettyPrint 
    */
   public AbstractRestSerializer(HttpServletResponse response,
       boolean prettyPrint) {

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/thrift/ThriftServer.java Thu Mar 19 09:03:08 2009
@@ -275,11 +275,10 @@
         if (columns == null) {
           return ThriftUtilities.rowResultFromHBase(table.getRow(row,
                                                         timestamp));
-        } else {
-          byte[][] columnArr = columns.toArray(new byte[columns.size()][]);
-          return ThriftUtilities.rowResultFromHBase(table.getRow(row,
-                                                        columnArr, timestamp));
         }
+        byte[][] columnArr = columns.toArray(new byte[columns.size()][]);
+        return ThriftUtilities.rowResultFromHBase(table.getRow(row,
+                                                      columnArr, timestamp));
       } catch (IOException e) {
         throw new IOError(e.getMessage());
       }

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/Bytes.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/Bytes.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/Bytes.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/Bytes.java Thu Mar 19 09:03:08 2009
@@ -299,6 +299,7 @@
   /**
    * Converts a byte array to a long value
    * @param bytes
+   * @param offset 
    * @return the long value
    */
   public static long toLong(byte[] bytes, int offset) {
@@ -308,6 +309,8 @@
   /**
    * Converts a byte array to a long value
    * @param bytes
+   * @param offset 
+   * @param length 
    * @return the long value
    */
   public static long toLong(byte[] bytes, int offset,final int length) {

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/FSUtils.java Thu Mar 19 09:03:08 2009
@@ -63,8 +63,9 @@
 
   /**
    * Check if directory exists.  If it does not, create it.
+   * @param fs 
    * @param dir
-   * @return
+   * @return Path
    * @throws IOException
    */
   public Path checkdir(final FileSystem fs, final Path dir) throws IOException {
@@ -78,7 +79,7 @@
    * Create file.
    * @param fs
    * @param p
-   * @return
+   * @return Path
    * @throws IOException
    */
   public static Path create(final FileSystem fs, final Path p)

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/Merge.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/Merge.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/Merge.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/Merge.java Thu Mar 19 09:03:08 2009
@@ -187,28 +187,28 @@
    * Merges two regions from a user table.
    */
   private void mergeTwoRegions() throws IOException {
-    LOG.info("Merging regions " + this.region1.toString() + " and " +
-      this.region2.toString() + " in table " + this.tableName.toString());
+    LOG.info("Merging regions " + Bytes.toString(this.region1) + " and " +
+        Bytes.toString(this.region2) + " in table " + Bytes.toString(this.tableName));
     // Scan the root region for all the meta regions that contain the regions
     // we're merging.
     MetaScannerListener listener = new MetaScannerListener(region1, region2);
     this.utils.scanRootRegion(listener);
     HRegionInfo meta1 = listener.getMeta1();
     if (meta1 == null) {
-      throw new IOException("Could not find meta region for " + region1);
+      throw new IOException("Could not find meta region for " + Bytes.toString(region1));
     }
     HRegionInfo meta2 = listener.getMeta2();
     if (meta2 == null) {
-      throw new IOException("Could not find meta region for " + region2);
+      throw new IOException("Could not find meta region for " + Bytes.toString(region2));
     }
-    LOG.info("Found meta for region1 " + meta1.getRegionName() +
-      ", meta for region2 " + meta2.getRegionName());
+    LOG.info("Found meta for region1 " + Bytes.toString(meta1.getRegionName()) +
+      ", meta for region2 " + Bytes.toString(meta2.getRegionName()));
     HRegion metaRegion1 = this.utils.getMetaRegion(meta1);
     Cell[] cells1 = metaRegion1.get(region1, HConstants.COL_REGIONINFO, -1, -1);
     HRegionInfo info1 = Writables.getHRegionInfo((cells1 == null)? null : cells1[0]);
     if (info1== null) {
-      throw new NullPointerException("info1 is null using key " + region1 +
-        " in " + meta1);
+      throw new NullPointerException("info1 is null using key " +
+          Bytes.toString(region1) + " in " + meta1);
     }
 
     HRegion metaRegion2 = null;
@@ -231,7 +231,7 @@
     HRegionInfo mergedInfo = listener.getMeta1();
     if (mergedInfo == null) {
       throw new IOException("Could not find meta region for " +
-          merged.getRegionName());
+          Bytes.toString(merged.getRegionName()));
     }
     HRegion mergeMeta = null;
     if (Bytes.equals(mergedInfo.getRegionName(), meta1.getRegionName())) {
@@ -258,12 +258,12 @@
       HRegion meta2)
   throws IOException {
     if (info1 == null) {
-      throw new IOException("Could not find " + region1 + " in " +
-          meta1.getRegionName());
+      throw new IOException("Could not find " + Bytes.toString(region1) + " in " +
+          Bytes.toString(meta1.getRegionName()));
     }
     if (info2 == null) {
-      throw new IOException("Cound not find " + region2 + " in " +
-          meta2.getRegionName());
+      throw new IOException("Cound not find " + Bytes.toString(region2) + " in " +
+          Bytes.toString(meta2.getRegionName()));
     }
     HRegion merged = null;
     HLog log = utils.getLog();

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/MetaUtils.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/MetaUtils.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/MetaUtils.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/MetaUtils.java Thu Mar 19 09:03:08 2009
@@ -201,8 +201,9 @@
         HRegionInfo info = Writables.getHRegionInfoOrNull(
             results.get(HConstants.COL_REGIONINFO).getValue());
         if (info == null) {
-          LOG.warn("region info is null for row " + key.getRow() +
-              " in table " + HConstants.ROOT_TABLE_NAME);
+          LOG.warn("region info is null for row " +
+              Bytes.toString(key.getRow()) + " in table " +
+              Bytes.toString(HConstants.ROOT_TABLE_NAME));
           continue;
         }
         if (!listener.processRow(info)) {
@@ -253,8 +254,8 @@
         HRegionInfo info = Writables.getHRegionInfoOrNull(
             results.get(HConstants.COL_REGIONINFO).getValue());
         if (info == null) {
-          LOG.warn("regioninfo null for row " + key.getRow() + " in table " +
-            Bytes.toString(m.getTableDesc().getName()));
+          LOG.warn("regioninfo null for row " + Bytes.toString(key.getRow()) +
+            " in table " + Bytes.toString(m.getTableDesc().getName()));
           continue;
         }
         if (!listener.processRow(info)) {
@@ -303,7 +304,7 @@
     HTable t = new HTable(c, HConstants.META_TABLE_NAME);
     Cell cell = t.get(row, HConstants.COL_REGIONINFO);
     if (cell == null) {
-      throw new IOException("no information for row " + row);
+      throw new IOException("no information for row " + Bytes.toString(row));
     }
     // Throws exception if null.
     HRegionInfo info = Writables.getHRegionInfo(cell);

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/Pair.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/Pair.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/Pair.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/util/Pair.java Thu Mar 19 09:03:08 2009
@@ -4,6 +4,8 @@
 
 /**
  * A generic class for pairs.
+ * @param <T1> 
+ * @param <T2> 
  */
 public class Pair<T1, T2> implements Serializable
 {
@@ -49,6 +51,7 @@
 
   /**
    * Return the first element stored in the pair.
+   * @return T1
    */
   public T1 getFirst()
   {
@@ -57,6 +60,7 @@
 
   /**
    * Return the second element stored in the pair.
+   * @return T2
    */
   public T2 getSecond()
   {

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/AbstractMergeTestBase.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/AbstractMergeTestBase.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/AbstractMergeTestBase.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/AbstractMergeTestBase.java Thu Mar 19 09:03:08 2009
@@ -34,7 +34,7 @@
 public abstract class AbstractMergeTestBase extends HBaseClusterTestCase {
   static final Log LOG =
     LogFactory.getLog(AbstractMergeTestBase.class.getName());
-  protected static final byte [] COLUMN_NAME = Bytes.toBytes("contents:");
+  static final byte [] COLUMN_NAME = Bytes.toBytes("contents:");
   protected final Random rand = new Random();
   protected HTableDescriptor desc;
   protected ImmutableBytesWritable value;
@@ -44,7 +44,9 @@
     this(true);
   }
   
-  /** constructor */
+  /** constructor 
+   * @param startMiniHBase
+   */
   public AbstractMergeTestBase(boolean startMiniHBase) {
     super();
     

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/DFSAbort.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/DFSAbort.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/DFSAbort.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/DFSAbort.java Thu Mar 19 09:03:08 2009
@@ -67,7 +67,7 @@
   /**
    * @param args unused
    */
-  public static void main(@SuppressWarnings("unused") String[] args) {
+  public static void main(String[] args) {
     TestRunner.run(new TestSuite(DFSAbort.class));
   }
 }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseClusterTestCase.java Thu Mar 19 09:03:08 2009
@@ -39,7 +39,7 @@
  */
 public abstract class HBaseClusterTestCase extends HBaseTestCase {
   private static final Log LOG = LogFactory.getLog(HBaseClusterTestCase.class);
-  protected MiniHBaseCluster cluster;
+  public MiniHBaseCluster cluster;
   protected MiniDFSCluster dfsCluster;
   protected MiniZooKeeperCluster zooKeeperCluster;
   protected int regionServers;
@@ -97,7 +97,7 @@
 
     // Note that this is done before we create the MiniHBaseCluster because we
     // need to edit the config to add the ZooKeeper servers.
-    this.zooKeeperCluster = new MiniZooKeeperCluster(conf);
+    this.zooKeeperCluster = new MiniZooKeeperCluster();
     this.zooKeeperCluster.startup(numZooKeeperPeers, testDir);
 
     // start the mini cluster

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HBaseTestCase.java Thu Mar 19 09:03:08 2009
@@ -65,8 +65,7 @@
   protected static final char FIRST_CHAR = 'a';
   protected static final char LAST_CHAR = 'z';
   protected static final String PUNCTUATION = "~`@#$%^&*()-_+=:;',.<>/?[]{}|";
-  protected static final byte [] START_KEY_BYTES =
-    {FIRST_CHAR, FIRST_CHAR, FIRST_CHAR};
+  protected static final byte [] START_KEY_BYTES = {FIRST_CHAR, FIRST_CHAR, FIRST_CHAR};
   protected String START_KEY;
   protected static final int MAXVERSIONS = 3;
   
@@ -74,7 +73,7 @@
     initialize();
   }
   
-  protected volatile HBaseConfiguration conf;
+  public volatile HBaseConfiguration conf;
 
   /** constructor */
   public HBaseTestCase() {
@@ -385,20 +384,12 @@
    */
   public static class HRegionIncommon implements Incommon, FlushCache {
     final HRegion region;
-    private BatchUpdate batch;
-    
-    private void checkBatch() {
-      if (batch == null) {
-        throw new IllegalStateException("No update in progress");
-      }
-    }
     
     /**
      * @param HRegion
      */
     public HRegionIncommon(final HRegion HRegion) {
       this.region = HRegion;
-      this.batch = null;
     }
     
     public void commit(BatchUpdate batchUpdate) throws IOException {
@@ -451,7 +442,6 @@
    */
   public static class HTableIncommon implements Incommon {
     final HTable table;
-    private BatchUpdate batch;
 
     /**
      * @param table
@@ -459,7 +449,6 @@
     public HTableIncommon(final HTable table) {
       super();
       this.table = table;
-      this.batch = null;
     }
     
     public void commit(BatchUpdate batchUpdate) throws IOException {
@@ -524,6 +513,7 @@
       scanner.close();
     }
     
+    @SuppressWarnings("unchecked")
     public Iterator iterator() {
       return scanner.iterator();
     }
@@ -545,7 +535,7 @@
       scanner.close();
     }
     
-    public Iterator iterator() {
+    public Iterator<Map.Entry<HStoreKey, SortedMap<byte [], Cell>>> iterator() {
       throw new UnsupportedOperationException();
     }
   }
@@ -556,14 +546,14 @@
     Map<byte [], Cell> result = region.getFull(row, null, timestamp, 1, null);
     Cell cell_value = result.get(column);
     if(value == null){
-      assertEquals(column.toString() + " at timestamp " + timestamp, null, cell_value);
+      assertEquals(Bytes.toString(column) + " at timestamp " + timestamp, null, cell_value);
     } else {
       if (cell_value == null) {
-        fail(column.toString() + " at timestamp " + timestamp + 
+        fail(Bytes.toString(column) + " at timestamp " + timestamp + 
           "\" was expected to be \"" + value + " but was null");
       }
       if (cell_value != null) {
-        assertEquals(column.toString() + " at timestamp " 
+        assertEquals(Bytes.toString(column) + " at timestamp " 
             + timestamp, value, new String(cell_value.getValue()));
       }
     }
@@ -577,7 +567,6 @@
    * If debugging is enabled, reconfigures loggin so that the root log level is
    * set to WARN and the logging level for the package is set to DEBUG.
    */
-  @SuppressWarnings("unchecked")
   public static void initialize() {
     if (System.getProperty(TEST_DIRECTORY_KEY) == null) {
       System.setProperty(TEST_DIRECTORY_KEY, new File(

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HFilePerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HFilePerformanceEvaluation.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HFilePerformanceEvaluation.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/HFilePerformanceEvaluation.java Thu Mar 19 09:03:08 2009
@@ -112,7 +112,7 @@
     
   }
   
-  private void runBenchmark(RowOrientedBenchmark benchmark, int rowCount)
+  protected void runBenchmark(RowOrientedBenchmark benchmark, int rowCount)
     throws Exception {
     LOG.info("Running " + benchmark.getClass().getSimpleName() + " for " +
         rowCount + " rows.");
@@ -240,8 +240,7 @@
     private HFileScanner scanner;
     
     public SequentialReadBenchmark(Configuration conf, FileSystem fs,
-      Path mf, int totalRows)
-    throws IOException {
+      Path mf, int totalRows) {
       super(conf, fs, mf, totalRows);
     }
     
@@ -253,7 +252,7 @@
     }
 
     @Override
-    void doRow(@SuppressWarnings("unused") int i) throws Exception {
+    void doRow(int i) throws Exception {
       if (this.scanner.next()) {
         ByteBuffer k = this.scanner.getKey();
         PerformanceEvaluationCommons.assertKey(format(i + 1), k);
@@ -279,7 +278,7 @@
     }
 
     @Override
-    void doRow(@SuppressWarnings("unused") int i) throws Exception {
+    void doRow(int i) throws Exception {
       HFileScanner scanner = this.reader.getScanner();
       byte [] b = getRandomRow();
       scanner.seekTo(b);
@@ -303,7 +302,7 @@
     }
 
     @Override
-    void doRow(@SuppressWarnings("unused") int i) throws Exception {
+    void doRow(int i) throws Exception {
       HFileScanner scanner = this.reader.getScanner();
       byte [] b = getRandomRow();
       if (scanner.seekTo(b) != 0) {
@@ -337,7 +336,7 @@
     }
 
     @Override
-    void doRow(@SuppressWarnings("unused") int i) throws Exception {
+    void doRow(int i) throws Exception {
       HFileScanner scanner = this.reader.getScanner();
       scanner.seekTo(getGaussianRandomRowBytes());
       for (int ii = 0; ii < 30; ii++) {
@@ -357,6 +356,7 @@
   
   /**
    * @param args
+   * @throws Exception 
    * @throws IOException 
    */
   public static void main(String[] args) throws Exception {

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MapFilePerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MapFilePerformanceEvaluation.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MapFilePerformanceEvaluation.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MapFilePerformanceEvaluation.java Thu Mar 19 09:03:08 2009
@@ -40,7 +40,7 @@
  * </p>
  */
 public class MapFilePerformanceEvaluation {
-  private final HBaseConfiguration conf;
+  protected final HBaseConfiguration conf;
   private static final int ROW_LENGTH = 10;
   private static final int ROW_COUNT = 100000;
   
@@ -61,7 +61,7 @@
     return w;
   }
 
-  private void runBenchmarks(final String[] args) throws Exception {
+  private void runBenchmarks() throws Exception {
     final FileSystem fs = FileSystem.get(this.conf);
     final Path mf = fs.makeQualified(new Path("performanceevaluation.mapfile"));
     if (fs.exists(mf)) {
@@ -112,7 +112,7 @@
     });
   }
   
-  private void runBenchmark(RowOrientedBenchmark benchmark, int rowCount)
+  protected void runBenchmark(RowOrientedBenchmark benchmark, int rowCount)
     throws Exception {
     LOG.info("Running " + benchmark.getClass().getSimpleName() + " for " +
         rowCount + " rows.");
@@ -249,7 +249,7 @@
     }
 
     @Override
-    void doRow(@SuppressWarnings("unused") int i) throws Exception {
+    void doRow(int i) throws Exception {
       this.reader.next(key, value);
       PerformanceEvaluationCommons.assertKey(this.key.get(),
         format(i, this.verify).get());
@@ -273,7 +273,7 @@
     }
 
     @Override
-    void doRow(@SuppressWarnings("unused") int i) throws Exception {
+    void doRow(int i) throws Exception {
       ImmutableBytesWritable k = getRandomRow();
       ImmutableBytesWritable r = (ImmutableBytesWritable)reader.get(k, value);
       PerformanceEvaluationCommons.assertValueSize(r.getSize(), ROW_LENGTH);
@@ -294,7 +294,7 @@
     }
 
     @Override
-    void doRow(@SuppressWarnings("unused") int i) throws Exception {
+    void doRow(int i) throws Exception {
       ImmutableBytesWritable ibw = getRandomRow();
       WritableComparable<?> wc = this.reader.getClosest(ibw, this.value);
       if (wc == null) {
@@ -323,7 +323,7 @@
     }
 
     @Override
-    void doRow(@SuppressWarnings("unused") int i) throws Exception {
+    void doRow(int i) throws Exception {
       ImmutableBytesWritable k = getGaussianRandomRow();
       ImmutableBytesWritable r = (ImmutableBytesWritable)reader.get(k, value);
       PerformanceEvaluationCommons.assertValueSize(r.getSize(), ROW_LENGTH);
@@ -338,10 +338,11 @@
 
   /**
    * @param args
+   * @throws Exception 
    * @throws IOException 
    */
   public static void main(String[] args) throws Exception {
     new MapFilePerformanceEvaluation(new HBaseConfiguration()).
-      runBenchmarks(args);
+      runBenchmarks();
   }
 }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MiniZooKeeperCluster.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MiniZooKeeperCluster.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MiniZooKeeperCluster.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/MiniZooKeeperCluster.java Thu Mar 19 09:03:08 2009
@@ -34,11 +34,9 @@
 import org.apache.hadoop.fs.FileUtil;
 import org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper;
 import org.apache.zookeeper.server.NIOServerCnxn;
-import org.apache.zookeeper.server.ServerStats;
 import org.apache.zookeeper.server.ZooKeeperServer;
 import org.apache.zookeeper.server.persistence.FileTxnLog;
 import org.apache.zookeeper.server.quorum.QuorumPeer;
-import org.apache.zookeeper.server.quorum.QuorumStats;
 import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer;
 
 /**
@@ -57,8 +55,6 @@
   private static final int SYNC_LIMIT = 3;
   private static final int CONNECTION_TIMEOUT = 30000;
 
-  private HBaseConfiguration conf;
-
   private boolean started;
   private int numPeers;
   private File baseDir;
@@ -69,11 +65,9 @@
   private NIOServerCnxn.Factory standaloneServerFactory;
 
   /**
-   * @param conf
    * @throws IOException
    */
-  public MiniZooKeeperCluster(HBaseConfiguration conf) throws IOException {
-    this.conf = conf;
+  public MiniZooKeeperCluster() throws IOException {
     this.started = false;
   }
 

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java Thu Mar 19 09:03:08 2009
@@ -76,7 +76,7 @@
  * runs an individual client. Each client does about 1GB of data.
  */
 public class PerformanceEvaluation implements HConstants {
-  private static final Log LOG = LogFactory.getLog(PerformanceEvaluation.class.getName());
+  protected static final Log LOG = LogFactory.getLog(PerformanceEvaluation.class.getName());
   
   private static final int ROW_LENGTH = 1000;
   private static final int ONE_GB = 1024 * 1024 * 1000;
@@ -84,7 +84,7 @@
   
   static final byte [] COLUMN_NAME = Bytes.toBytes(COLUMN_FAMILY_STR + "data");
   
-  protected static HTableDescriptor TABLE_DESCRIPTOR;
+  protected static final HTableDescriptor TABLE_DESCRIPTOR;
   static {
     TABLE_DESCRIPTOR = new HTableDescriptor("TestTable");
     TABLE_DESCRIPTOR.addFamily(new HColumnDescriptor(COLUMN_FAMILY));
@@ -170,7 +170,7 @@
       this.pe = new PerformanceEvaluation(new HBaseConfiguration(j));
     }
     
-    public void map(@SuppressWarnings("unused") final Object key,
+    public void map(final Object key,
       final Object value, final OutputCollector output,
       final Reporter reporter)
     throws IOException {
@@ -370,7 +370,6 @@
       this.table.setWriteBufferSize(1024*1024*12);
     }
 
-    @SuppressWarnings("unused")
     void testTakedown()  throws IOException {
       this.table.flushCommits();
     }
@@ -418,11 +417,12 @@
       super(conf, startRow, perClientRunRows, totalRows, status);
     }
     
-    void testRow(@SuppressWarnings("unused") final int i) throws IOException {
+    @Override
+    void testRow(final int i) throws IOException {
       Scanner s = this.table.getScanner(new byte [][] {COLUMN_NAME},
         getRandomRow(this.rand, this.totalRows),
         new WhileMatchRowFilter(new PageRowFilter(120)));
-      int count = 0;
+      //int count = 0;
       for (RowResult rr = null; (rr = s.next()) != null;) {
         // LOG.info("" + count++ + " " + rr.toString());
       }
@@ -448,7 +448,7 @@
     }
     
     @Override
-    void testRow(@SuppressWarnings("unused") final int i) throws IOException {
+    void testRow(final int i) throws IOException {
       this.table.get(getRandomRow(this.rand, this.totalRows), COLUMN_NAME);
     }
 
@@ -471,7 +471,7 @@
     }
     
     @Override
-    void testRow(@SuppressWarnings("unused") final int i) throws IOException {
+    void testRow(final int i) throws IOException {
       byte [] row = getRandomRow(this.rand, this.totalRows);
       BatchUpdate b = new BatchUpdate(row);
       b.put(COLUMN_NAME, generateValue(this.rand));
@@ -509,7 +509,7 @@
     
     
     @Override
-    void testRow(@SuppressWarnings("unused") final int i) throws IOException {
+    void testRow(final int i) throws IOException {
       testScanner.next();
     }
 
@@ -620,7 +620,7 @@
           totalRows, status);
         totalElapsedTime = t.test();
     } else {
-      new IllegalArgumentException("Invalid command value: " + cmd);
+      throw new IllegalArgumentException("Invalid command value: " + cmd);
     }
     status.setStatus("Finished " + cmd + " in " + totalElapsedTime +
       "ms at offset " + startRow + " for " + perClientRunRows + " rows");
@@ -629,7 +629,6 @@
   
   private void runNIsOne(final String cmd) {
     Status status = new Status() {
-      @SuppressWarnings("unused")
       public void setStatus(String msg) throws IOException {
         LOG.info(msg);
       }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestClassMigration.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestClassMigration.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestClassMigration.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestClassMigration.java Thu Mar 19 09:03:08 2009
@@ -253,8 +253,8 @@
      */
     public static byte[] getBytes(final HStoreKey hsk)
     throws UnsupportedEncodingException {
-      StringBuilder s = new StringBuilder(hsk.getRow().toString());
-      s.append(hsk.getColumn().toString());
+      StringBuilder s = new StringBuilder(Bytes.toString(hsk.getRow()));
+      s.append(Bytes.toString(hsk.getColumn()));
       return s.toString().getBytes(HConstants.UTF8_ENCODING);
     }
   }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestHBaseCluster.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestHBaseCluster.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestHBaseCluster.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestHBaseCluster.java Thu Mar 19 09:03:08 2009
@@ -76,11 +76,10 @@
   private static final int FIRST_ROW = 1;
   private static final int NUM_VALS = 1000;
   private static final byte [] CONTENTS = Bytes.toBytes("contents:");
-  private static final byte [] CONTENTS_MINUS_COLON = Bytes.toBytes("contents");
-  private static final byte [] CONTENTS_BASIC = Bytes.toBytes("contents:basic");
+  private static final String CONTENTS_BASIC_STR = "contents:basic";
+  private static final byte [] CONTENTS_BASIC = Bytes.toBytes(CONTENTS_BASIC_STR);
   private static final String CONTENTSTR = "contentstr";
   private static final byte [] ANCHOR = Bytes.toBytes("anchor:");
-  private static final byte [] ANCHOR_MINUS_COLON = Bytes.toBytes("anchor");
   private static final String ANCHORNUM = "anchor:anchornum-";
   private static final String ANCHORSTR = "anchorstr";
 
@@ -115,23 +114,25 @@
 
     byte [] collabel = null;
     for (int k = FIRST_ROW; k <= NUM_VALS; k++) {
-      byte [] rowlabel = Bytes.toBytes("row_" + k);
+      String rowlabelStr = "row_" + k;
+      byte [] rowlabel = Bytes.toBytes(rowlabelStr);
 
       byte bodydata[] = table.get(rowlabel, CONTENTS_BASIC).getValue();
-      assertNotNull("no data for row " + rowlabel + "/" + CONTENTS_BASIC,
+      assertNotNull("no data for row " + rowlabelStr + "/" + CONTENTS_BASIC_STR,
           bodydata);
       String bodystr = new String(bodydata, HConstants.UTF8_ENCODING);
       String teststr = CONTENTSTR + k;
-      assertTrue("Incorrect value for key: (" + rowlabel + "/" +
-          CONTENTS_BASIC + "), expected: '" + teststr + "' got: '" +
+      assertTrue("Incorrect value for key: (" + rowlabelStr + "/" +
+          CONTENTS_BASIC_STR + "), expected: '" + teststr + "' got: '" +
           bodystr + "'", teststr.compareTo(bodystr) == 0);
       
-      collabel = Bytes.toBytes(ANCHORNUM + k);
+      String collabelStr = ANCHORNUM + k;
+      collabel = Bytes.toBytes(collabelStr);
       bodydata = table.get(rowlabel, collabel).getValue();
-      assertNotNull("no data for row " + rowlabel + "/" + collabel, bodydata);
+      assertNotNull("no data for row " + rowlabelStr + "/" + collabelStr, bodydata);
       bodystr = new String(bodydata, HConstants.UTF8_ENCODING);
       teststr = ANCHORSTR + k;
-      assertTrue("Incorrect value for key: (" + rowlabel + "/" + collabel +
+      assertTrue("Incorrect value for key: (" + rowlabelStr + "/" + collabelStr +
           "), expected: '" + teststr + "' got: '" + bodystr + "'",
           teststr.compareTo(bodystr) == 0);
     }
@@ -158,15 +159,15 @@
           byte val[] = curVals.get(col).getValue();
           String curval = Bytes.toString(val);
           if (Bytes.compareTo(col, CONTENTS_BASIC) == 0) {
-            assertTrue("Error at:" + curVals.getRow() 
-                + ", Value for " + col + " should start with: " + CONTENTSTR
+            assertTrue("Error at:" + Bytes.toString(curVals.getRow()) 
+                + ", Value for " + Bytes.toString(col) + " should start with: " + CONTENTSTR
                 + ", but was fetched as: " + curval,
                 curval.startsWith(CONTENTSTR));
             contentsFetched++;
             
           } else if (Bytes.toString(col).startsWith(ANCHORNUM)) {
-            assertTrue("Error at:" + curVals.getRow()
-                + ", Value for " + col + " should start with: " + ANCHORSTR
+            assertTrue("Error at:" + Bytes.toString(curVals.getRow())
+                + ", Value for " + Bytes.toString(col) + " should start with: " + ANCHORSTR
                 + ", but was fetched as: " + curval,
                 curval.startsWith(ANCHORSTR));
             anchorFetched++;

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestHStoreKey.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestHStoreKey.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestHStoreKey.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestHStoreKey.java Thu Mar 19 09:03:08 2009
@@ -31,10 +31,12 @@
  * Tests for the HStoreKey Plain and Meta RawComparators.
  */
 public class TestHStoreKey extends TestCase {
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
   }
 
+  @Override
   protected void tearDown() throws Exception {
     super.tearDown();
   }
@@ -230,6 +232,7 @@
 
   /**
    * Test the byte comparator works same as the object comparator.
+   * @throws IOException 
    */
   public void testRawComparator() throws IOException {
     long timestamp = System.currentTimeMillis();

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestInfoServers.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestInfoServers.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestInfoServers.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestInfoServers.java Thu Mar 19 09:03:08 2009
@@ -71,6 +71,6 @@
     }
     bis.close();
     String content = sb.toString();
-    content.matches(expected);
+    assertTrue(content.matches(expected));
   }
 }
\ No newline at end of file

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestMergeMeta.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestMergeMeta.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestMergeMeta.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestMergeMeta.java Thu Mar 19 09:03:08 2009
@@ -24,7 +24,9 @@
 /** Tests region merging */
 public class TestMergeMeta extends AbstractMergeTestBase {
 
-  /** constructor */
+  /** constructor 
+   * @throws Exception
+   */
   public TestMergeMeta() throws Exception {
     super(false);
     conf.setLong("hbase.client.pause", 1 * 1000);

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TestRegionRebalancing.java Thu Mar 19 09:03:08 2009
@@ -90,6 +90,7 @@
   /**
    * For HBASE-71. Try a few different configurations of starting and stopping
    * region servers to see if the assignment or regions is pretty balanced.
+   * @throws IOException 
    */
   public void testRebalancing() throws IOException {
     table = new HTable(conf, "test");

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TimestampTestBase.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TimestampTestBase.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TimestampTestBase.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/TimestampTestBase.java Thu Mar 19 09:03:08 2009
@@ -21,8 +21,6 @@
 import java.io.IOException;
 import java.util.TreeMap;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.io.BatchUpdate;
 import org.apache.hadoop.hbase.io.Cell;
 import org.apache.hadoop.hbase.util.Bytes;
@@ -33,9 +31,6 @@
  * run against an HRegion and against an HTable: i.e. both local and remote.
  */
 public class TimestampTestBase extends HBaseTestCase {
-  private static final Log LOG =
-    LogFactory.getLog(TimestampTestBase.class.getName());
-
   private static final long T0 = 10L;
   private static final long T1 = 100L;
   private static final long T2 = 200L;

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestBatchUpdate.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestBatchUpdate.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestBatchUpdate.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestBatchUpdate.java Thu Mar 19 09:03:08 2009
@@ -99,7 +99,7 @@
     Scanner scanner = table.getScanner(columns, HConstants.EMPTY_START_ROW);
     for (RowResult r : scanner) {
       for(Map.Entry<byte [], Cell> e: r.entrySet()) {
-        System.out.println(r.getRow() + ": row: " + e.getKey() + " value: " + 
+        System.out.println(Bytes.toString(r.getRow()) + ": row: " + e.getKey() + " value: " + 
             new String(e.getValue().getValue(), HConstants.UTF8_ENCODING));
       }
     }
@@ -146,7 +146,7 @@
       byte [][] columns = { CONTENTS };
       Scanner scanner = table.getScanner(columns, HConstants.EMPTY_START_ROW);
       int nbRows = 0;
-      for(RowResult row : scanner)
+      for(@SuppressWarnings("unused") RowResult row : scanner)
         nbRows++;
       assertEquals(NB_BATCH_ROWS, nbRows);
     } catch (IOException e) {
@@ -168,7 +168,7 @@
       byte [][] columns = { CONTENTS };
       Scanner scanner = table.getScanner(columns, HConstants.EMPTY_START_ROW);
       int nbRows = 0;
-      for(RowResult row : scanner)
+      for(@SuppressWarnings("unused") RowResult row : scanner)
         nbRows++;
       assertEquals(0, nbRows);  
       scanner.close();
@@ -177,7 +177,7 @@
       
       scanner = table.getScanner(columns, HConstants.EMPTY_START_ROW);
       nbRows = 0;
-      for(RowResult row : scanner)
+      for(@SuppressWarnings("unused") RowResult row : scanner)
         nbRows++;
       assertEquals(NB_BATCH_ROWS*10, nbRows);
     } catch (IOException e) {
@@ -202,7 +202,7 @@
       byte [][] columns = { CONTENTS };
       Scanner scanner = table.getScanner(columns, HConstants.EMPTY_START_ROW);
       int nbRows = 0;
-      for(RowResult row : scanner)
+      for(@SuppressWarnings("unused") RowResult row : scanner)
         nbRows++;
       assertEquals(NB_BATCH_ROWS*10, nbRows);
     } catch (IOException e) {

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestForceSplit.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestForceSplit.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestForceSplit.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestForceSplit.java Thu Mar 19 09:03:08 2009
@@ -24,7 +24,6 @@
 
 import org.apache.hadoop.hbase.HBaseClusterTestCase;
 import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HConstants;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HServerAddress;
 import org.apache.hadoop.hbase.HTableDescriptor;
@@ -37,8 +36,8 @@
 public class TestForceSplit extends HBaseClusterTestCase {
   private static final byte[] tableName = Bytes.toBytes("test");
   private static final byte[] columnName = Bytes.toBytes("a:");
-  private static final byte[] key_mmi = Bytes.toBytes("mmi");
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
     this.conf.setInt("hbase.io.index.interval", 32);
@@ -46,6 +45,7 @@
 
   /**
    * the test
+   * @throws Exception 
    * @throws IOException
    */
   public void testHTable() throws Exception {

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestTimestamp.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestTimestamp.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestTimestamp.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/TestTimestamp.java Thu Mar 19 09:03:08 2009
@@ -20,13 +20,10 @@
 
 import java.io.IOException;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.HBaseClusterTestCase;
 import org.apache.hadoop.hbase.HColumnDescriptor;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.TimestampTestBase;
-import org.apache.hadoop.hbase.util.Bytes;
 
 /**
  * Tests user specifiable time stamps putting, getting and scanning.  Also
@@ -34,13 +31,7 @@
  * run against an HRegion and against an HTable: i.e. both local and remote.
  */
 public class TestTimestamp extends HBaseClusterTestCase {
-  private static final Log LOG =
-    LogFactory.getLog(TestTimestamp.class.getName());
-  
   private static final String COLUMN_NAME = "contents:";
-  private static final byte [] COLUMN = Bytes.toBytes(COLUMN_NAME);
-  // When creating column descriptor, how many versions of a cell to allow.
-  private static final int VERSIONS = 3;
   
   /** constructor */
   public TestTimestamp() {

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/transactional/StressTestTransactions.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/transactional/StressTestTransactions.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/transactional/StressTestTransactions.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/client/transactional/StressTestTransactions.java Thu Mar 19 09:03:08 2009
@@ -50,7 +50,7 @@
  * the sum is as expected.
  */
 public class StressTestTransactions extends HBaseClusterTestCase {
-  private static final Log LOG = LogFactory
+  protected static final Log LOG = LogFactory
       .getLog(StressTestTransactions.class);
 
   private static final int NUM_TABLES = 3;
@@ -60,14 +60,14 @@
   private static final int NUM_SINGLE_TABLE_THREADS = 6;
   private static final int NUM_MULTI_TABLE_THREADS = 6;
   private static final int PRE_COMMIT_SLEEP = 10;
-  private static final Random RAND = new Random();
+  protected static final Random RAND = new Random();
 
   private static final byte[] FAMILY = Bytes.toBytes("family:");
-  private static final byte[] COL = Bytes.toBytes("family:a");
+  static final byte[] COL = Bytes.toBytes("family:a");
 
   private HBaseAdmin admin;
-  private TransactionalTable[] tables;
-  private TransactionManager transactionManager;
+  protected TransactionalTable[] tables;
+  protected TransactionManager transactionManager;
 
   /** constructor */
   public StressTestTransactions() {
@@ -115,18 +115,17 @@
     }
   }
 
-  private byte[] makeSTRow(final int i) {
+  protected byte[] makeSTRow(final int i) {
     return Bytes.toBytes("st" + i);
   }
 
-  private byte[] makeMTRow(final int i) {
+  protected byte[] makeMTRow(final int i) {
     return Bytes.toBytes("mt" + i);
   }
 
-  private static int nextThreadNum = 1;
-  private static final AtomicBoolean stopRequest = new AtomicBoolean(false);
-  private static final AtomicBoolean consistencyFailure = new AtomicBoolean(
-      false);
+  static int nextThreadNum = 1;
+  protected static final AtomicBoolean stopRequest = new AtomicBoolean(false);
+  static final AtomicBoolean consistencyFailure = new AtomicBoolean(false);
 
   // Thread which runs transactions
   abstract class TransactionThread extends Thread {

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestInclusiveStopRowFilter.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestInclusiveStopRowFilter.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestInclusiveStopRowFilter.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestInclusiveStopRowFilter.java Thu Mar 19 09:03:08 2009
@@ -74,14 +74,14 @@
   }
   
   private void stopRowTests(RowFilterInterface filter) throws Exception {
-    assertFalse("Filtering on " + GOOD_ROW, filter.filterRowKey(GOOD_ROW));
-    assertFalse("Filtering on " + STOP_ROW, filter.filterRowKey(STOP_ROW));
-    assertTrue("Filtering on " + PAST_STOP_ROW, filter.filterRowKey(PAST_STOP_ROW));
+    assertFalse("Filtering on " + Bytes.toString(GOOD_ROW), filter.filterRowKey(GOOD_ROW));
+    assertFalse("Filtering on " + Bytes.toString(STOP_ROW), filter.filterRowKey(STOP_ROW));
+    assertTrue("Filtering on " + Bytes.toString(PAST_STOP_ROW), filter.filterRowKey(PAST_STOP_ROW));
     
-    assertFalse("Filtering on " + GOOD_ROW, filter.filterColumn(GOOD_ROW, null, 
+    assertFalse("Filtering on " + Bytes.toString(GOOD_ROW), filter.filterColumn(GOOD_ROW, null, 
       null));
-    assertFalse("Filtering on " + STOP_ROW, filter.filterColumn(STOP_ROW, null, null));
-    assertTrue("Filtering on " + PAST_STOP_ROW, filter.filterColumn(PAST_STOP_ROW, 
+    assertFalse("Filtering on " + Bytes.toString(STOP_ROW), filter.filterColumn(STOP_ROW, null, null));
+    assertTrue("Filtering on " + Bytes.toString(PAST_STOP_ROW), filter.filterColumn(PAST_STOP_ROW, 
       null, null));
 
     assertFalse("FilterAllRemaining", filter.filterAllRemaining());

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestPageRowFilter.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestPageRowFilter.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestPageRowFilter.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestPageRowFilter.java Thu Mar 19 09:03:08 2009
@@ -35,7 +35,7 @@
 public class TestPageRowFilter extends TestCase {
   
   RowFilterInterface mainFilter;
-  final int ROW_LIMIT = 3;
+  static final int ROW_LIMIT = 3;
   
   @Override
   protected void setUp() throws Exception {

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestPrefixRowFilter.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestPrefixRowFilter.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestPrefixRowFilter.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestPrefixRowFilter.java Thu Mar 19 09:03:08 2009
@@ -24,14 +24,10 @@
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.UnsupportedEncodingException;
-import java.util.Map;
-import java.util.TreeMap;
 
 import junit.framework.TestCase;
 
 import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.io.Cell;
-import org.apache.hadoop.hbase.regionserver.HLogEdit;
 import org.apache.hadoop.hbase.util.Bytes;
 
 /**
@@ -39,9 +35,9 @@
  */
 public class TestPrefixRowFilter extends TestCase {
   RowFilterInterface mainFilter;
-  final char FIRST_CHAR = 'a';
-  final char LAST_CHAR = 'e';
-  final String HOST_PREFIX = "org.apache.site-";
+  static final char FIRST_CHAR = 'a';
+  static final char LAST_CHAR = 'e';
+  static final String HOST_PREFIX = "org.apache.site-";
   static byte [] GOOD_BYTES = null;
 
   static {

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRegExpRowFilter.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRegExpRowFilter.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRegExpRowFilter.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRegExpRowFilter.java Thu Mar 19 09:03:08 2009
@@ -40,9 +40,9 @@
 public class TestRegExpRowFilter extends TestCase {
   TreeMap<byte [], Cell> colvalues;
   RowFilterInterface mainFilter;
-  final char FIRST_CHAR = 'a';
-  final char LAST_CHAR = 'e';
-  final String HOST_PREFIX = "org.apache.site-";
+  static final char FIRST_CHAR = 'a';
+  static final char LAST_CHAR = 'e';
+  static final String HOST_PREFIX = "org.apache.site-";
   static byte [] GOOD_BYTES = null;
 
   static {

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRowFilterAfterWrite.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRowFilterAfterWrite.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRowFilterAfterWrite.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRowFilterAfterWrite.java Thu Mar 19 09:03:08 2009
@@ -44,7 +44,6 @@
 /** Test regexp filters HBASE-476 */
 public class TestRowFilterAfterWrite extends HBaseClusterTestCase {
 
-  @SuppressWarnings("hiding")
   private static final Log LOG = LogFactory.getLog(TestRowFilterAfterWrite.class.getName());
 
   static final String TABLE_NAME = "TestTable";
@@ -184,7 +183,7 @@
       try {
         for (RowResult result : scanner) {
           if (printValues) {
-            LOG.info("row: " + result.getRow());
+            LOG.info("row: " + Bytes.toString(result.getRow()));
             for (Map.Entry<byte [], Cell> e : result.entrySet()) {
               LOG.info(" column: " + e.getKey() + " value: "
                   + new String(e.getValue().getValue(), HConstants.UTF8_ENCODING));

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRowFilterOnMultipleFamilies.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRowFilterOnMultipleFamilies.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRowFilterOnMultipleFamilies.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRowFilterOnMultipleFamilies.java Thu Mar 19 09:03:08 2009
@@ -108,7 +108,7 @@
       try {
         for (RowResult result : scanner) {
           if (printValues) {
-            LOG.info("row: " + result.getRow());
+            LOG.info("row: " + Bytes.toString(result.getRow()));
 
             for (Map.Entry<byte [], Cell> e : result.entrySet()) {
               LOG.info(" column: " + e.getKey() + " value: "

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRowFilterSet.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRowFilterSet.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRowFilterSet.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestRowFilterSet.java Thu Mar 19 09:03:08 2009
@@ -43,8 +43,8 @@
   RowFilterInterface filterMPALL;
   RowFilterInterface filterMPONE;
   static final int MAX_PAGES = 5;
-  final char FIRST_CHAR = 'a';
-  final char LAST_CHAR = 'e';
+  static final char FIRST_CHAR = 'a';
+  static final char LAST_CHAR = 'e';
   TreeMap<byte [], Cell> colvalues;
   static byte[] GOOD_BYTES = null;
   static byte[] BAD_BYTES = null;

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/filter/TestStopRowFilter.java Thu Mar 19 09:03:08 2009
@@ -74,14 +74,14 @@
   }
   
   private void stopRowTests(RowFilterInterface filter) throws Exception {
-    assertFalse("Filtering on " + GOOD_ROW, filter.filterRowKey(GOOD_ROW));
-    assertTrue("Filtering on " + STOP_ROW, filter.filterRowKey(STOP_ROW));
-    assertTrue("Filtering on " + PAST_STOP_ROW, filter.filterRowKey(PAST_STOP_ROW));
+    assertFalse("Filtering on " + Bytes.toString(GOOD_ROW), filter.filterRowKey(GOOD_ROW));
+    assertTrue("Filtering on " + Bytes.toString(STOP_ROW), filter.filterRowKey(STOP_ROW));
+    assertTrue("Filtering on " + Bytes.toString(PAST_STOP_ROW), filter.filterRowKey(PAST_STOP_ROW));
     
-    assertFalse("Filtering on " + GOOD_ROW, filter.filterColumn(GOOD_ROW, null, 
+    assertFalse("Filtering on " + Bytes.toString(GOOD_ROW), filter.filterColumn(GOOD_ROW, null, 
       null));
-    assertTrue("Filtering on " + STOP_ROW, filter.filterColumn(STOP_ROW, null, null));
-    assertTrue("Filtering on " + PAST_STOP_ROW, filter.filterColumn(PAST_STOP_ROW, 
+    assertTrue("Filtering on " + Bytes.toString(STOP_ROW), filter.filterColumn(STOP_ROW, null, null));
+    assertTrue("Filtering on " + Bytes.toString(PAST_STOP_ROW), filter.filterColumn(PAST_STOP_ROW, 
       null, null));
 
     assertFalse("FilterAllRemaining", filter.filterAllRemaining());

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java Thu Mar 19 09:03:08 2009
@@ -37,10 +37,12 @@
 
 public class TestHbaseObjectWritable extends TestCase {
 
+  @Override
   protected void setUp() throws Exception {
     super.setUp();
   }
 
+  @Override
   protected void tearDown() throws Exception {
     super.tearDown();
   }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/io/hfile/KeySampler.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/io/hfile/KeySampler.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/io/hfile/KeySampler.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/io/hfile/KeySampler.java Thu Mar 19 09:03:08 2009
@@ -16,8 +16,6 @@
  */
 package org.apache.hadoop.hbase.io.hfile;
 
-import java.io.IOException;
-import java.nio.ByteBuffer;
 import java.util.Random;
 
 import org.apache.hadoop.io.BytesWritable;
@@ -37,14 +35,14 @@
   private static final int MIN_KEY_LEN = 4;
 
   public KeySampler(Random random, byte [] first, byte [] last,
-      DiscreteRNG keyLenRNG) throws IOException {
+      DiscreteRNG keyLenRNG) {
     this.random = random;
     min = keyPrefixToInt(first);
     max = keyPrefixToInt(last);
     this.keyLenRNG = keyLenRNG;
   }
 
-  private int keyPrefixToInt(byte [] key) throws IOException {
+  private int keyPrefixToInt(byte [] key) {
     byte[] b = key;
     int o = 0;
     return (b[o] & 0xff) << 24 | (b[o + 1] & 0xff) << 16

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/io/hfile/TestHFileSeek.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/io/hfile/TestHFileSeek.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/io/hfile/TestHFileSeek.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/io/hfile/TestHFileSeek.java Thu Mar 19 09:03:08 2009
@@ -163,7 +163,6 @@
             keyLenGen);
     HFileScanner scanner = reader.getScanner();
     BytesWritable key = new BytesWritable();
-    BytesWritable val = new BytesWritable();
     timer.reset();
     timer.start();
     for (int i = 0; i < options.seekCount; ++i) {
@@ -181,7 +180,6 @@
       }
     }
     timer.stop();
-    double duration = (double) timer.read() / 1000; // in us.
     System.out.printf(
         "time: %s...avg seek: %s...%d hit...%d miss...avg I/O size: %.2fKB\n",
         timer.toString(), NanoTimer.nanoTimeToString(timer.read()
@@ -236,14 +234,6 @@
     int dictSize = 1000;
     int minWordLen = 5;
     int maxWordLen = 20;
-    int osInputBufferSize = 64 * 1024;
-    int osOutputBufferSize = 64 * 1024;
-    int fsInputBufferSizeNone = 0;
-    int fsInputBufferSizeLzo = 0;
-    int fsInputBufferSizeGz = 0;
-    int fsOutputBufferSizeNone = 1;
-    int fsOutputBufferSizeLzo = 1;
-    int fsOutputBufferSizeGz = 1;
    
     String rootDir =
         System.getProperty("test.build.data", "/tmp/TestTFileSeek");

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/mapred/TestTableIndex.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/mapred/TestTableIndex.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/mapred/TestTableIndex.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/mapred/TestTableIndex.java Thu Mar 19 09:03:08 2009
@@ -94,7 +94,6 @@
    * 
    * @throws IOException
    */
-  @SuppressWarnings("static-access")
   public void testTableIndex() throws IOException {
     boolean printResults = false;
     if (printResults) {
@@ -256,7 +255,7 @@
   /**
    * @param args unused
    */
-  public static void main(@SuppressWarnings("unused") String[] args) {
+  public static void main(String[] args) {
     TestRunner.run(new TestSuite(TestTableIndex.class));
   }
 }
\ No newline at end of file

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/mapred/TestTableMapReduce.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/mapred/TestTableMapReduce.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/mapred/TestTableMapReduce.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/mapred/TestTableMapReduce.java Thu Mar 19 09:03:08 2009
@@ -50,7 +50,6 @@
  * a particular cell, and write it back to the table.
  */
 public class TestTableMapReduce extends MultiRegionTable {
-  @SuppressWarnings("hiding")
   private static final Log LOG =
     LogFactory.getLog(TestTableMapReduce.class.getName());
 
@@ -79,11 +78,15 @@
   implements TableMap<ImmutableBytesWritable, BatchUpdate> {
     /**
      * Pass the key, and reversed value to reduce
+     * @param key 
+     * @param value 
+     * @param output 
+     * @param reporter 
+     * @throws IOException 
      */
-    @SuppressWarnings("unchecked")
     public void map(ImmutableBytesWritable key, RowResult value,
       OutputCollector<ImmutableBytesWritable, BatchUpdate> output,
-      @SuppressWarnings("unused") Reporter reporter) 
+      Reporter reporter) 
     throws IOException {
       if (value.size() != 1) {
         throw new IOException("There should only be one input column");
@@ -120,7 +123,6 @@
   }
 
   private void runTestOnTable(HTable table) throws IOException {
-    @SuppressWarnings("deprecation")
     MiniMRCluster mrCluster = new MiniMRCluster(2, fs.getUri().toString(), 1);
 
     JobConf jobConf = null;
@@ -149,7 +151,6 @@
     }
   }
 
-  @SuppressWarnings("null")
   private void verify(String tableName) throws IOException {
     HTable table = new HTable(conf, tableName);
     boolean verified = false;

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestBloomFilters.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestBloomFilters.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestBloomFilters.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestBloomFilters.java Thu Mar 19 09:03:08 2009
@@ -190,7 +190,7 @@
 
     for(int i = 0; i < 100; i++) {
       byte [] row = rows[i];
-      String value = row.toString();
+      String value = Bytes.toString(row);
       BatchUpdate b = new BatchUpdate(row);
       b.put(CONTENTS, value.getBytes(HConstants.UTF8_ENCODING));
       table.commit(b);
@@ -222,8 +222,8 @@
     for(int i = 0; i < testKeys.length; i++) {
       Cell value = table.get(testKeys[i], CONTENTS);
       if(value != null && value.getValue().length != 0) {
-        LOG.error("non existant key: " + testKeys[i] + " returned value: " +
-            new String(value.getValue(), HConstants.UTF8_ENCODING));
+        LOG.error("non existant key: " + Bytes.toString(testKeys[i]) + " returned value: " +
+            Bytes.toString(value.getValue()));
         fail();
       }
     }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet.java Thu Mar 19 09:03:08 2009
@@ -20,7 +20,6 @@
 package org.apache.hadoop.hbase.regionserver;
 
 import java.io.IOException;
-import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.commons.logging.Log;
@@ -64,10 +63,11 @@
     Map<byte [], Cell> values = r.getFull(ROW_KEY);
     
     // assertEquals(4, values.keySet().size());
-    for(Iterator<byte []> i = values.keySet().iterator(); i.hasNext(); ) {
-      byte [] column = i.next();
+    for (Map.Entry<byte[], Cell> entry : values.entrySet()) {
+      byte[] column = entry.getKey();
+      Cell cell = entry.getValue();
       if (Bytes.equals(column, HConstants.COL_SERVER)) {
-        String server = Writables.cellToString(values.get(column));
+        String server = Writables.cellToString(cell);
         assertEquals(expectedServer, server);
         LOG.info(server);
       }

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet2.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet2.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet2.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestGet2.java Thu Mar 19 09:03:08 2009
@@ -165,8 +165,10 @@
     }  
   }
 
-  /** For HBASE-694 */
-  public void testGetClosestRowBefore2() throws IOException{
+  /** For HBASE-694 
+   * @throws IOException
+   */
+  public void testGetClosestRowBefore2() throws IOException {
 
     HRegion region = null;
     BatchUpdate batchUpdate = null;
@@ -302,9 +304,10 @@
   
   /**
    * Test file of multiple deletes and with deletes as final key.
+   * @throws IOException 
    * @see <a href="https://issues.apache.org/jira/browse/HBASE-751">HBASE-751</a>
    */
-  public void testGetClosestRowBefore3() throws IOException{
+  public void testGetClosestRowBefore3() throws IOException {
     HRegion region = null;
     BatchUpdate batchUpdate = null;
     try {
@@ -607,6 +610,7 @@
 
   /**
    * For HBASE-40
+   * @throws IOException 
    */
   public void testGetFullWithSpecifiedColumns() throws IOException {
     HRegion region = null;

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHMemcache.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHMemcache.java?rev=755878&r1=755877&r2=755878&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHMemcache.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHMemcache.java Thu Mar 19 09:03:08 2009
@@ -153,15 +153,17 @@
   private void isExpectedRowWithoutTimestamps(final int rowIndex,
       TreeMap<byte [], Cell> row) {
     int i = 0;
-    for (byte [] colname: row.keySet()) {
+    for (Map.Entry<byte[], Cell> entry : row.entrySet()) {
+      byte[] colname = entry.getKey();
+      Cell cell = entry.getValue();
       String expectedColname = Bytes.toString(getColumnName(rowIndex, i++));
       String colnameStr = Bytes.toString(colname);
       assertEquals("Column name", colnameStr, expectedColname);
       // Value is column name as bytes.  Usually result is
       // 100 bytes in size at least. This is the default size
-      // for BytesWriteable.  For comparison, comvert bytes to
+      // for BytesWriteable.  For comparison, convert bytes to
       // String and trim to remove trailing null bytes.
-      byte [] value = row.get(colname).getValue();
+      byte [] value = cell.getValue();
       String colvalueStr = Bytes.toString(value).trim();
       assertEquals("Content", colnameStr, colvalueStr);
     }



Mime
View raw message