hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject svn commit: r1523854 - in /hbase/branches/0.96: hbase-client/src/main/java/org/apache/hadoop/hbase/client/ hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ hbase-common/src/main/java/org/apache/hadoop/hbase/ hbase-examples/src/test/java/org...
Date Tue, 17 Sep 2013 00:19:35 GMT
Author: sershe
Date: Tue Sep 17 00:19:35 2013
New Revision: 1523854

URL: http://svn.apache.org/r1523854
Log:
HBASE-9496 make sure HBase APIs are compatible between 0.94 and 0.96

Modified:
    hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
    hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java
    hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
    hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ResponseConverter.java
    hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java
    hbase/branches/0.96/hbase-examples/src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestBulkDeleteProtocol.java
    hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
    hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
    hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
    hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/MetaMockingUtil.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/TestMetaReaderEditorNoCluster.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIntraRowPagination.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestPutDeleteEtcCellIteration.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResult.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedUpdater.java
    hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java

Modified: hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java (original)
+++ hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java Tue Sep 17 00:19:35 2013
@@ -39,6 +39,7 @@ import org.apache.hadoop.hbase.io.HeapSi
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.ClassSize;
 
+import com.google.common.collect.Lists;
 import com.google.common.io.ByteArrayDataInput;
 import com.google.common.io.ByteArrayDataOutput;
 import com.google.common.io.ByteStreams;
@@ -245,13 +246,26 @@ public abstract class Mutation extends O
   /**
    * Method for setting the put's familyMap
    */
-  public void setFamilyMap(NavigableMap<byte [], List<Cell>> map) {
+  public void setFamilyCellMap(NavigableMap<byte [], List<Cell>> map) {
     // TODO: Shut this down or move it up to be a Constructor.  Get new object rather than change
     // this internal data member.
     this.familyMap = map;
   }
 
   /**
+   * Method for setting the put's familyMap that is deprecated and inefficient.
+   * @deprecated use {@link #setFamilyCellMap(NavigableMap)} instead.
+   */
+  @Deprecated
+  public void setFamilyMap(NavigableMap<byte [], List<KeyValue>> map) {
+    TreeMap<byte[], List<Cell>> fm = new TreeMap<byte[], List<Cell>>(Bytes.BYTES_COMPARATOR);
+    for (Map.Entry<byte[], List<KeyValue>> e : map.entrySet()) {
+      fm.put(e.getKey(), Lists.<Cell>newArrayList(e.getValue()));
+    }
+    this.familyMap = fm;
+  }
+
+  /**
    * Method to check if the familyMap is empty
    * @return true if empty, false otherwise
    */

Modified: hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java (original)
+++ hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java Tue Sep 17 00:19:35 2013
@@ -29,6 +29,8 @@ import java.util.Map;
 import java.util.NavigableMap;
 import java.util.TreeMap;
 
+import javax.annotation.Nullable;
+
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
 import org.apache.hadoop.hbase.Cell;
@@ -95,27 +97,46 @@ public class Result implements CellScann
   }
 
   /**
-   * Instantiate a Result with the specified array of KeyValues.
-   * <br><strong>Note:</strong> You must ensure that the keyvalues
-   * are already sorted
-   * @param cells array of KeyValues
+   * @deprecated Use {@link #create(List)} instead.
    */
-  public Result(Cell [] cells) {
+  @Deprecated
+  public Result(KeyValue [] cells) {
     this.cells = cells;
   }
 
   /**
-   * Instantiate a Result with the specified List of KeyValues.
-   * <br><strong>Note:</strong> You must ensure that the keyvalues
-   * are already sorted
-   * @param kvs List of KeyValues
+   * @deprecated Use {@link #create(List)} instead.
    */
-  public Result(List<Cell> kvs) {
+  @Deprecated
+  public Result(List<KeyValue> kvs) {
     // TODO: Here we presume the passed in Cells are KVs.  One day this won't always be so.
     this(kvs.toArray(new Cell[kvs.size()]));
   }
 
   /**
+   * Instantiate a Result with the specified List of KeyValues.
+   * <br><strong>Note:</strong> You must ensure that the keyvalues are already sorted.
+   * @param cells List of cells
+   */
+  public static Result create(List<Cell> cells) {
+    return new Result(cells.toArray(new Cell[cells.size()]));
+  }
+
+  /**
+   * Instantiate a Result with the specified array of KeyValues.
+   * <br><strong>Note:</strong> You must ensure that the keyvalues are already sorted.
+   * @param cells array of cells
+   */
+  public static Result create(Cell[] cells) {
+    return new Result(cells);
+  }
+
+  /** Private ctor. Use {@link #create(Cell[])}. */
+  private Result(Cell[] cells) {
+    this.cells = cells;
+  }
+
+  /**
    * Method for retrieving the row key that corresponds to
    * the row from which this Result was created.
    * @return row
@@ -196,6 +217,13 @@ public class Result implements CellScann
     return isEmpty() ? null : Arrays.asList(raw());
   }
 
+  /**
+   * @deprecated Use {@link #getColumnCells(byte[], byte[])} instead.
+   */
+  @Deprecated
+  public List<KeyValue> getColumn(byte [] family, byte [] qualifier) {
+    return KeyValueUtil.ensureKeyValues(getColumnCells(family, qualifier));
+  }
 
   /**
    * Return the Cells for the specific column.  The Cells are sorted in
@@ -212,7 +240,7 @@ public class Result implements CellScann
    * @return a list of Cells for this column or empty list if the column
    * did not exist in the result set
    */
-  public List<Cell> getColumn(byte [] family, byte [] qualifier) {
+  public List<Cell> getColumnCells(byte [] family, byte [] qualifier) {
     List<Cell> result = new ArrayList<Cell>();
 
     Cell [] kvs = rawCells();
@@ -301,6 +329,14 @@ public class Result implements CellScann
   }
 
   /**
+   * @deprecated Use {@link #getColumnLatestCell(byte[], byte[])} instead.
+   */
+  @Deprecated
+  public KeyValue getColumnLatest(byte [] family, byte [] qualifier) {
+    return KeyValueUtil.ensureKeyValue(getColumnLatestCell(family, qualifier));
+  }
+
+  /**
    * The Cell for the most recent timestamp for a given column.
    *
    * @param family
@@ -309,7 +345,7 @@ public class Result implements CellScann
    * @return the Cell for the column, or null if no value exists in the row or none have been
    * selected in the query (Get/Scan)
    */
-  public Cell getColumnLatest(byte [] family, byte [] qualifier) {
+  public Cell getColumnLatestCell(byte [] family, byte [] qualifier) {
     Cell [] kvs = rawCells(); // side effect possibly.
     if (kvs == null || kvs.length == 0) {
       return null;
@@ -326,6 +362,16 @@ public class Result implements CellScann
   }
 
   /**
+   * @deprecated Use {@link #getColumnLatestCell(byte[], int, int, byte[], int, int)} instead.
+   */
+  @Deprecated
+  public KeyValue getColumnLatest(byte [] family, int foffset, int flength,
+      byte [] qualifier, int qoffset, int qlength) {
+    return KeyValueUtil.ensureKeyValue(
+        getColumnLatestCell(family, foffset, flength, qualifier, qoffset, qlength));
+  }
+
+  /**
    * The Cell for the most recent timestamp for a given column.
    *
    * @param family family name
@@ -338,7 +384,7 @@ public class Result implements CellScann
    * @return the Cell for the column, or null if no value exists in the row or none have been
    * selected in the query (Get/Scan)
    */
-  public Cell getColumnLatest(byte [] family, int foffset, int flength,
+  public Cell getColumnLatestCell(byte [] family, int foffset, int flength,
       byte [] qualifier, int qoffset, int qlength) {
 
     Cell [] kvs = rawCells(); // side effect possibly.
@@ -363,7 +409,7 @@ public class Result implements CellScann
    * @return value of latest version of column, null if none found
    */
   public byte[] getValue(byte [] family, byte [] qualifier) {
-    Cell kv = getColumnLatest(family, qualifier);
+    Cell kv = getColumnLatestCell(family, qualifier);
     if (kv == null) {
       return null;
     }
@@ -380,7 +426,7 @@ public class Result implements CellScann
    */
   public ByteBuffer getValueAsByteBuffer(byte [] family, byte [] qualifier) {
 
-    Cell kv = getColumnLatest(family, 0, family.length, qualifier, 0, qualifier.length);
+    Cell kv = getColumnLatestCell(family, 0, family.length, qualifier, 0, qualifier.length);
 
     if (kv == null) {
       return null;
@@ -403,7 +449,7 @@ public class Result implements CellScann
   public ByteBuffer getValueAsByteBuffer(byte [] family, int foffset, int flength,
       byte [] qualifier, int qoffset, int qlength) {
 
-    Cell kv = getColumnLatest(family, foffset, flength, qualifier, qoffset, qlength);
+    Cell kv = getColumnLatestCell(family, foffset, flength, qualifier, qoffset, qlength);
 
     if (kv == null) {
       return null;
@@ -449,7 +495,7 @@ public class Result implements CellScann
   public boolean loadValue(byte [] family, int foffset, int flength,
       byte [] qualifier, int qoffset, int qlength, ByteBuffer dst)
           throws BufferOverflowException {
-    Cell kv = getColumnLatest(family, foffset, flength, qualifier, qoffset, qlength);
+    Cell kv = getColumnLatestCell(family, foffset, flength, qualifier, qoffset, qlength);
 
     if (kv == null) {
       return false;
@@ -486,7 +532,7 @@ public class Result implements CellScann
   public boolean containsNonEmptyColumn(byte [] family, int foffset, int flength,
       byte [] qualifier, int qoffset, int qlength) {
 
-    Cell kv = getColumnLatest(family, foffset, flength, qualifier, qoffset, qlength);
+    Cell kv = getColumnLatestCell(family, foffset, flength, qualifier, qoffset, qlength);
 
     return (kv != null) && (kv.getValueLength() > 0);
   }
@@ -518,7 +564,7 @@ public class Result implements CellScann
    */
   public boolean containsEmptyColumn(byte [] family, int foffset, int flength,
       byte [] qualifier, int qoffset, int qlength) {
-    Cell kv = getColumnLatest(family, foffset, flength, qualifier, qoffset, qlength);
+    Cell kv = getColumnLatestCell(family, foffset, flength, qualifier, qoffset, qlength);
 
     return (kv != null) && (kv.getValueLength() == 0);
   }
@@ -532,7 +578,7 @@ public class Result implements CellScann
    * @return true if at least one value exists in the result, false if not
    */
   public boolean containsColumn(byte [] family, byte [] qualifier) {
-    Cell kv = getColumnLatest(family, qualifier);
+    Cell kv = getColumnLatestCell(family, qualifier);
     return kv != null;
   }
 
@@ -551,7 +597,7 @@ public class Result implements CellScann
   public boolean containsColumn(byte [] family, int foffset, int flength,
       byte [] qualifier, int qoffset, int qlength) {
 
-    return getColumnLatest(family, foffset, flength, qualifier, qoffset, qlength) != null;
+    return getColumnLatestCell(family, foffset, flength, qualifier, qoffset, qlength) != null;
   }
 
   /**

Modified: hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java (original)
+++ hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java Tue Sep 17 00:19:35 2013
@@ -1060,7 +1060,7 @@ public final class ProtobufUtil {
     for (CellProtos.Cell c: values) {
       cells.add(toCell(c));
     }
-    return new Result(cells);
+    return Result.create(cells);
   }
 
   /**
@@ -1088,7 +1088,7 @@ public final class ProtobufUtil {
     for (CellProtos.Cell c: values) {
       cells.add(toCell(c));
     }
-    return new Result(cells);
+    return Result.create(cells);
   }
 
   /**

Modified: hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ResponseConverter.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ResponseConverter.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ResponseConverter.java (original)
+++ hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ResponseConverter.java Tue Sep 17 00:19:35 2013
@@ -309,7 +309,7 @@ public final class ResponseConverter {
           }
           cells.add(cellScanner.current());
         }
-        results[i] = new Result(cells);
+        results[i] = Result.create(cells);
       } else {
         // Result is pure pb.
         results[i] = ProtobufUtil.toResult(response.getResults(i));

Modified: hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java (original)
+++ hbase/branches/0.96/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java Tue Sep 17 00:19:35 2013
@@ -19,6 +19,8 @@
 package org.apache.hadoop.hbase;
 
 import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.hbase.util.ByteBufferUtils;
@@ -27,6 +29,9 @@ import org.apache.hadoop.hbase.util.Byte
 import org.apache.hadoop.hbase.util.IterableUtils;
 import org.apache.hadoop.io.WritableUtils;
 
+import com.google.common.base.Function;
+import com.google.common.collect.Lists;
+
 /**
  * static convenience methods for dealing with KeyValues and collections of KeyValues
  */
@@ -203,4 +208,13 @@ public class KeyValueUtil {
     if (cell == null) return null;
     return cell instanceof KeyValue? (KeyValue)cell: copyToNewKeyValue(cell);
   }
+
+  public static List<KeyValue> ensureKeyValues(List<Cell> cells) {
+    List<KeyValue> lazyList = Lists.transform(cells, new Function<Cell, KeyValue>() {
+      public KeyValue apply(Cell arg0) {
+        return KeyValueUtil.ensureKeyValue(arg0);
+      }
+    });
+    return new ArrayList<KeyValue>(lazyList);
+  }
 }

Modified: hbase/branches/0.96/hbase-examples/src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestBulkDeleteProtocol.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-examples/src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestBulkDeleteProtocol.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-examples/src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestBulkDeleteProtocol.java (original)
+++ hbase/branches/0.96/hbase-examples/src/test/java/org/apache/hadoop/hbase/coprocessor/example/TestBulkDeleteProtocol.java Tue Sep 17 00:19:35 2013
@@ -202,9 +202,9 @@ public class TestBulkDeleteProtocol {
     int rows = 0;
     for (Result result : ht.getScanner(new Scan())) {
       assertEquals(2, result.getFamilyMap(FAMILY1).size());
-      assertTrue(result.getColumn(FAMILY1, QUALIFIER2).isEmpty());
-      assertEquals(1, result.getColumn(FAMILY1, QUALIFIER1).size());
-      assertEquals(1, result.getColumn(FAMILY1, QUALIFIER3).size());
+      assertTrue(result.getColumnCells(FAMILY1, QUALIFIER2).isEmpty());
+      assertEquals(1, result.getColumnCells(FAMILY1, QUALIFIER1).size());
+      assertEquals(1, result.getColumnCells(FAMILY1, QUALIFIER3).size());
       rows++;
     }
     assertEquals(100, rows);
@@ -235,7 +235,7 @@ public class TestBulkDeleteProtocol {
     int rows = 0;
     for (Result result : ht.getScanner(new Scan())) {
       assertTrue(result.getFamilyMap(FAMILY1).isEmpty());
-      assertEquals(1, result.getColumn(FAMILY2, QUALIFIER2).size());
+      assertEquals(1, result.getColumnCells(FAMILY2, QUALIFIER2).size());
       rows++;
     }
     assertEquals(100, rows);
@@ -273,15 +273,15 @@ public class TestBulkDeleteProtocol {
     scan.setMaxVersions();
     for (Result result : ht.getScanner(scan)) {
       assertEquals(3, result.getFamilyMap(FAMILY1).size());
-      List<Cell> column = result.getColumn(FAMILY1, QUALIFIER1);
+      List<Cell> column = result.getColumnCells(FAMILY1, QUALIFIER1);
       assertEquals(1, column.size());
       assertTrue(CellUtil.matchingValue(column.get(0), "v1".getBytes()));
 
-      column = result.getColumn(FAMILY1, QUALIFIER2);
+      column = result.getColumnCells(FAMILY1, QUALIFIER2);
       assertEquals(1, column.size());
       assertTrue(CellUtil.matchingValue(column.get(0), "v1".getBytes()));
 
-      column = result.getColumn(FAMILY1, QUALIFIER3);
+      column = result.getColumnCells(FAMILY1, QUALIFIER3);
       assertEquals(1, column.size());
       assertTrue(CellUtil.matchingValue(column.get(0), "v1".getBytes()));
       rows++;
@@ -325,9 +325,9 @@ public class TestBulkDeleteProtocol {
     scan.setMaxVersions();
     for (Result result : ht.getScanner(scan)) {
       assertEquals(3, result.getFamilyMap(FAMILY1).size());
-      assertEquals(3, result.getColumn(FAMILY1, QUALIFIER1).size());
-      assertEquals(3, result.getColumn(FAMILY1, QUALIFIER2).size());
-      List<Cell> column = result.getColumn(FAMILY1, QUALIFIER3);
+      assertEquals(3, result.getColumnCells(FAMILY1, QUALIFIER1).size());
+      assertEquals(3, result.getColumnCells(FAMILY1, QUALIFIER2).size());
+      List<Cell> column = result.getColumnCells(FAMILY1, QUALIFIER3);
       assertEquals(2, column.size());
       assertTrue(CellUtil.matchingValue(column.get(0), "v3".getBytes()));
       assertTrue(CellUtil.matchingValue(column.get(1), "v1".getBytes()));
@@ -407,15 +407,15 @@ public class TestBulkDeleteProtocol {
     scan1.setMaxVersions();
     for (Result res : ht.getScanner(scan1)) {
       assertEquals(3, res.getFamilyMap(FAMILY1).size());
-      List<Cell> column = res.getColumn(FAMILY1, QUALIFIER1);
+      List<Cell> column = res.getColumnCells(FAMILY1, QUALIFIER1);
       assertEquals(2, column.size());
       assertTrue(CellUtil.matchingValue(column.get(0), "v4".getBytes()));
       assertTrue(CellUtil.matchingValue(column.get(1), "v3".getBytes()));
-      column = res.getColumn(FAMILY1, QUALIFIER2);
+      column = res.getColumnCells(FAMILY1, QUALIFIER2);
       assertEquals(2, column.size());
       assertTrue(CellUtil.matchingValue(column.get(0), "v4".getBytes()));
       assertTrue(CellUtil.matchingValue(column.get(1), "v3".getBytes()));
-      assertEquals(4, res.getColumn(FAMILY1, QUALIFIER3).size());
+      assertEquals(4, res.getColumnCells(FAMILY1, QUALIFIER3).size());
       rows++;
     }
     assertEquals(100, rows);

Modified: hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java (original)
+++ hbase/branches/0.96/hbase-it/src/test/java/org/apache/hadoop/hbase/mapreduce/IntegrationTestBulkLoad.java Tue Sep 17 00:19:35 2013
@@ -470,7 +470,7 @@ public class IntegrationTestBulkLoad ext
       for (Map.Entry<byte[], byte[]> entry : value.getFamilyMap(CHAIN_FAM).entrySet()) {
         long chainId = Bytes.toLong(entry.getKey());
         long next = Bytes.toLong(entry.getValue());
-        Cell c = value.getColumn(SORT_FAM, entry.getKey()).get(0);
+        Cell c = value.getColumnCells(SORT_FAM, entry.getKey()).get(0);
         long order = Bytes.toLong(CellUtil.cloneValue(c));
         context.write(new LinkKey(chainId, order), new LinkChain(longRk, next));
       }

Modified: hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java (original)
+++ hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/master/TableNamespaceManager.java Tue Sep 17 00:19:35 2013
@@ -170,8 +170,8 @@ public class TableNamespaceManager {
     if (res.isEmpty()) {
       return null;
     }
-    byte[] val = CellUtil.cloneValue(res.getColumnLatest(HTableDescriptor.NAMESPACE_FAMILY_INFO_BYTES,
-        HTableDescriptor.NAMESPACE_COL_DESC_BYTES));
+    byte[] val = CellUtil.cloneValue(res.getColumnLatestCell(
+        HTableDescriptor.NAMESPACE_FAMILY_INFO_BYTES, HTableDescriptor.NAMESPACE_COL_DESC_BYTES));
     return
         ProtobufUtil.toNamespaceDescriptor(
             HBaseProtos.NamespaceDescriptor.parseFrom(val));
@@ -241,7 +241,8 @@ public class TableNamespaceManager {
     ResultScanner scanner = getNamespaceTable().getScanner(HTableDescriptor.NAMESPACE_FAMILY_INFO_BYTES);
     try {
       for(Result r : scanner) {
-        byte[] val = CellUtil.cloneValue(r.getColumnLatest(HTableDescriptor.NAMESPACE_FAMILY_INFO_BYTES,
+        byte[] val = CellUtil.cloneValue(r.getColumnLatestCell(
+          HTableDescriptor.NAMESPACE_FAMILY_INFO_BYTES,
           HTableDescriptor.NAMESPACE_COL_DESC_BYTES));
         ret.add(ProtobufUtil.toNamespaceDescriptor(
             HBaseProtos.NamespaceDescriptor.parseFrom(val)));

Modified: hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Tue Sep 17 00:19:35 2013
@@ -1804,7 +1804,7 @@ public class HRegion implements HeapSize
   void delete(NavigableMap<byte[], List<Cell>> familyMap,
       Durability durability) throws IOException {
     Delete delete = new Delete(FOR_UNIT_TESTS_ONLY);
-    delete.setFamilyMap(familyMap);
+    delete.setFamilyCellMap(familyMap);
     delete.setDurability(durability);
     doBatchMutate(delete);
   }
@@ -2616,7 +2616,7 @@ public class HRegion implements HeapSize
 
     familyMap.put(family, edits);
     Put p = new Put(row);
-    p.setFamilyMap(familyMap);
+    p.setFamilyCellMap(familyMap);
     doBatchMutate(p);
   }
 
@@ -4397,7 +4397,7 @@ public class HRegion implements HeapSize
       }
     }
     List<Cell> results = get(get, true);
-    return new Result(results);
+    return Result.create(results);
   }
 
   /*
@@ -4835,7 +4835,7 @@ public class HRegion implements HeapSize
     }
 
 
-    return append.isReturnResults() ? new Result(allKVs) : null;
+    return append.isReturnResults() ? Result.create(allKVs) : null;
   }
 
   /**
@@ -4980,7 +4980,7 @@ public class HRegion implements HeapSize
       requestFlush();
     }
 
-    return new Result(allKVs);
+    return Result.create(allKVs);
   }
 
   //

Modified: hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Tue Sep 17 00:19:35 2013
@@ -3115,7 +3115,7 @@ public class HRegionServer implements Cl
                           currentScanResultSize += KeyValueUtil.ensureKeyValue(kv).heapSize();
                         }
                       }
-                      results.add(new Result(values));
+                      results.add(Result.create(values));
                     }
                     if (!moreRows) {
                       break;

Modified: hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java (original)
+++ hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/RemoteHTable.java Tue Sep 17 00:19:35 2013
@@ -176,7 +176,7 @@ public class RemoteHTable implements HTa
         kvs.add(new KeyValue(row.getKey(), column, qualifier,
           cell.getTimestamp(), cell.getValue()));
       }
-      results.add(new Result(kvs));
+      results.add(Result.create(kvs));
     }
     return results.toArray(new Result[results.size()]);
   }

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/TestSerialization.java Tue Sep 17 00:19:35 2013
@@ -345,7 +345,7 @@ public class TestSerialization {
    * TODO
   @Test public void testResultEmpty() throws Exception {
     List<KeyValue> keys = new ArrayList<KeyValue>();
-    Result r = new Result(keys);
+    Result r = Result.newResult(keys);
     assertTrue(r.isEmpty());
     byte [] rb = Writables.getBytes(r);
     Result deserializedR = (Result)Writables.getWritable(rb, new Result());
@@ -367,7 +367,7 @@ public class TestSerialization {
     KeyValue kvA = new KeyValue(rowA, famA, qfA, valueA);
     KeyValue kvB = new KeyValue(rowB, famB, qfB, valueB);
 
-    Result result = new Result(new KeyValue[]{kvA, kvB});
+    Result result = Result.newResult(new KeyValue[]{kvA, kvB});
 
     byte [] rb = Writables.getBytes(result);
     Result deResult = (Result)Writables.getWritable(rb, new Result());
@@ -399,7 +399,7 @@ public class TestSerialization {
     KeyValue kvA = new KeyValue(rowA, famA, qfA, valueA);
     KeyValue kvB = new KeyValue(rowB, famB, qfB, valueB);
 
-    Result result = new Result(new KeyValue[]{kvA, kvB});
+    Result result = Result.newResult(new KeyValue[]{kvA, kvB});
 
     byte [] rb = Writables.getBytes(result);
 
@@ -441,9 +441,9 @@ public class TestSerialization {
     KeyValue kvB = new KeyValue(rowB, famB, qfB, valueB);
 
 
-    Result result1 = new Result(new KeyValue[]{kvA, kvB});
-    Result result2 = new Result(new KeyValue[]{kvB});
-    Result result3 = new Result(new KeyValue[]{kvB});
+    Result result1 = Result.newResult(new KeyValue[]{kvA, kvB});
+    Result result2 = Result.newResult(new KeyValue[]{kvB});
+    Result result3 = Result.newResult(new KeyValue[]{kvB});
 
     Result [] results = new Result [] {result1, result2, result3};
 
@@ -477,7 +477,7 @@ public class TestSerialization {
 
   @Test public void testResultArrayEmpty() throws Exception {
     List<KeyValue> keys = new ArrayList<KeyValue>();
-    Result r = new Result(keys);
+    Result r = Result.newResult(keys);
     Result [] results = new Result [] {r};
 
     ByteArrayOutputStream byteStream = new ByteArrayOutputStream();

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/MetaMockingUtil.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/MetaMockingUtil.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/MetaMockingUtil.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/MetaMockingUtil.java Tue Sep 17 00:19:35 2013
@@ -107,7 +107,7 @@ public class MetaMockingUtil {
     //important: sort the kvs so that binary search work
     Collections.sort(kvs, KeyValue.META_COMPARATOR);
 
-    return new Result(kvs);
+    return Result.create(kvs);
   }
 
   /**

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/TestMetaReaderEditorNoCluster.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/TestMetaReaderEditorNoCluster.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/TestMetaReaderEditorNoCluster.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/catalog/TestMetaReaderEditorNoCluster.java Tue Sep 17 00:19:35 2013
@@ -99,26 +99,26 @@ public class TestMetaReaderEditorNoClust
     assertNull(HRegionInfo.getHRegionInfo(new Result()));
 
     List<Cell> kvs = new ArrayList<Cell>();
-    Result r = new Result(kvs);
+    Result r = Result.create(kvs);
     assertNull(HRegionInfo.getHRegionInfo(r));
 
     byte [] f = HConstants.CATALOG_FAMILY;
     // Make a key value that doesn't have the expected qualifier.
     kvs.add(new KeyValue(HConstants.EMPTY_BYTE_ARRAY, f,
       HConstants.SERVER_QUALIFIER, f));
-    r = new Result(kvs);
+    r = Result.create(kvs);
     assertNull(HRegionInfo.getHRegionInfo(r));
     // Make a key that does not have a regioninfo value.
     kvs.add(new KeyValue(HConstants.EMPTY_BYTE_ARRAY, f,
       HConstants.REGIONINFO_QUALIFIER, f));
-    HRegionInfo hri = HRegionInfo.getHRegionInfo(new Result(kvs));
+    HRegionInfo hri = HRegionInfo.getHRegionInfo(Result.create(kvs));
     assertTrue(hri == null);
     // OK, give it what it expects
     kvs.clear();
     kvs.add(new KeyValue(HConstants.EMPTY_BYTE_ARRAY, f,
       HConstants.REGIONINFO_QUALIFIER,
       HRegionInfo.FIRST_META_REGIONINFO.toByteArray()));
-    hri = HRegionInfo.getHRegionInfo(new Result(kvs));
+    hri = HRegionInfo.getHRegionInfo(Result.create(kvs));
     assertNotNull(hri);
     assertTrue(hri.equals(HRegionInfo.FIRST_META_REGIONINFO));
   }
@@ -165,7 +165,7 @@ public class TestMetaReaderEditorNoClust
         HConstants.CATALOG_FAMILY, HConstants.STARTCODE_QUALIFIER,
         Bytes.toBytes(sn.getStartcode())));
       final List<CellScannable> cellScannables = new ArrayList<CellScannable>(1);
-      cellScannables.add(new Result(kvs));
+      cellScannables.add(Result.create(kvs));
       final ScanResponse.Builder builder = ScanResponse.newBuilder();
       for (CellScannable result : cellScannables) {
         builder.addCellsPerResult(((Result)result).size());

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIntraRowPagination.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIntraRowPagination.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIntraRowPagination.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestIntraRowPagination.java Tue Sep 17 00:19:35 2013
@@ -96,7 +96,7 @@ public class TestIntraRowPagination {
         kvListScan.addAll(results);
         results.clear();
       }
-      result = new Result(kvListScan);
+      result = Result.create(kvListScan);
       TestScannersFromClientSide.verifyResult(result, kvListExp, toLog,
           "Testing scan with storeOffset and storeLimit");
     } finally {

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestPutDeleteEtcCellIteration.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestPutDeleteEtcCellIteration.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestPutDeleteEtcCellIteration.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestPutDeleteEtcCellIteration.java Tue Sep 17 00:19:35 2013
@@ -138,7 +138,7 @@ public class TestPutDeleteEtcCellIterati
       byte [] bytes = Bytes.toBytes(i);
       cells[i] = new KeyValue(ROW, bytes, bytes, TIMESTAMP, bytes);
     }
-    Result r = new Result(Arrays.asList(cells));
+    Result r = Result.create(Arrays.asList(cells));
     int index = 0;
     for (CellScanner cellScanner = r.cellScanner(); cellScanner.advance();) {
       Cell cell = cellScanner.current();

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResult.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResult.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResult.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestResult.java Tue Sep 17 00:19:35 2013
@@ -65,15 +65,15 @@ public class TestResult extends TestCase
 
     Arrays.sort(kvs, KeyValue.COMPARATOR);
 
-    Result r = new Result(kvs);
+    Result r = Result.create(kvs);
 
     for (int i = 0; i < 100; ++i) {
       final byte[] qf = Bytes.toBytes(i);
 
-      List<Cell> ks = r.getColumn(family, qf);
+      List<Cell> ks = r.getColumnCells(family, qf);
       assertEquals(1, ks.size());
       assertTrue(CellUtil.matchingQualifier(ks.get(0), qf));
-      assertEquals(ks.get(0), r.getColumnLatest(family, qf));
+      assertEquals(ks.get(0), r.getColumnLatestCell(family, qf));
     }
   }
 
@@ -87,15 +87,15 @@ public class TestResult extends TestCase
 
     Arrays.sort(kvs, KeyValue.COMPARATOR);
 
-    Result r = new Result(kvs);
+    Result r = Result.create(kvs);
     for (int i = 0; i < 100; ++i) {
       final byte[] qf = Bytes.toBytes(i);
 
-      List<Cell> ks = r.getColumn(family, qf);
+      List<Cell> ks = r.getColumnCells(family, qf);
       assertEquals(2, ks.size());
       assertTrue(CellUtil.matchingQualifier(ks.get(0), qf));
       assertEquals(200, ks.get(0).getTimestamp());
-      assertEquals(ks.get(0), r.getColumnLatest(family, qf));
+      assertEquals(ks.get(0), r.getColumnLatestCell(family, qf));
     }
   }
 
@@ -104,7 +104,7 @@ public class TestResult extends TestCase
 
     Arrays.sort(kvs, KeyValue.COMPARATOR);
 
-    Result r = new Result(kvs);
+    Result r = Result.create(kvs);
 
     for (int i = 0; i < 100; ++i) {
       final byte[] qf = Bytes.toBytes(i);
@@ -124,7 +124,7 @@ public class TestResult extends TestCase
 
     Arrays.sort(kvs, KeyValue.COMPARATOR);
 
-    Result r = new Result(kvs);
+    Result r = Result.create(kvs);
     for (int i = 0; i < 100; ++i) {
       final byte[] qf = Bytes.toBytes(i);
 
@@ -138,7 +138,7 @@ public class TestResult extends TestCase
 
     Arrays.sort(kvs, KeyValue.COMPARATOR);
 
-    Result r = new Result(kvs);
+    Result r = Result.create(kvs);
     ByteBuffer loadValueBuffer = ByteBuffer.allocate(1024);
 
     for (int i = 0; i < 100; ++i) {
@@ -165,7 +165,7 @@ public class TestResult extends TestCase
 
     ByteBuffer loadValueBuffer = ByteBuffer.allocate(1024);
 
-    Result r = new Result(kvs);
+    Result r = Result.create(kvs);
     for (int i = 0; i < 100; ++i) {
       final byte[] qf = Bytes.toBytes(i);
 
@@ -188,8 +188,8 @@ public class TestResult extends TestCase
     KeyValue kv1 = new KeyValue(row, family, qual, value);
     KeyValue kv2 = new KeyValue(row, family, qual, value1);
 
-    Result r1 = new Result(new KeyValue[] {kv1});
-    Result r2 = new Result(new KeyValue[] {kv2});
+    Result r1 = Result.create(new KeyValue[] {kv1});
+    Result r2 = Result.create(new KeyValue[] {kv2});
     // no exception thrown
     Result.compareResults(r1, r1);
     try {
@@ -226,7 +226,7 @@ public class TestResult extends TestCase
         Bytes.toBytes(valueSB.toString()), 1, n);
     Arrays.sort(kvs, KeyValue.COMPARATOR);
     ByteBuffer loadValueBuffer = ByteBuffer.allocate(1024);
-    Result r = new Result(kvs);
+    Result r = Result.create(kvs);
 
     byte[][] qfs = new byte[n][Bytes.SIZEOF_INT];
     for (int i = 0; i < n; ++i) {

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannersFromClientSide.java Tue Sep 17 00:19:35 2013
@@ -324,7 +324,7 @@ public class TestScannersFromClientSide 
         kvListScan.add(kv);
       }
     }
-    result = new Result(kvListScan);
+    result = Result.create(kvListScan);
     verifyResult(result, kvListExp, toLog, "Testing scan with maxResults");
 
   }

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestChangingEncoding.java Tue Sep 17 00:19:35 2013
@@ -156,7 +156,7 @@ public class TestChangingEncoding {
       Get get = new Get(getRowKey(batchId, i));
       Result result = table.get(get);
       for (int j = 0; j < NUM_COLS_PER_ROW; ++j) {
-        Cell kv = result.getColumnLatest(CF_BYTES, getQualifier(j));
+        Cell kv = result.getColumnLatestCell(CF_BYTES, getQualifier(j));
         assertTrue(CellUtil.matchingValue(kv, getValue(batchId, i, j)));
       }
     }

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java Tue Sep 17 00:19:35 2013
@@ -294,7 +294,7 @@ public class TestHRegion extends HBaseTe
       Get get = new Get(row);
       Result result = region.get(get);
       for (long i = minSeqId; i <= maxSeqId; i += 10) {
-        List<Cell> kvs = result.getColumn(family, Bytes.toBytes(i));
+        List<Cell> kvs = result.getColumnCells(family, Bytes.toBytes(i));
         assertEquals(1, kvs.size());
         assertEquals(Bytes.toBytes(i), CellUtil.cloneValue(kvs.get(0)));
       }
@@ -347,7 +347,7 @@ public class TestHRegion extends HBaseTe
       Get get = new Get(row);
       Result result = region.get(get);
       for (long i = minSeqId; i <= maxSeqId; i += 10) {
-        List<Cell> kvs = result.getColumn(family, Bytes.toBytes(i));
+        List<Cell> kvs = result.getColumnCells(family, Bytes.toBytes(i));
         if (i < recoverSeqId) {
           assertEquals(0, kvs.size());
         } else {
@@ -3609,7 +3609,7 @@ public class TestHRegion extends HBaseTe
     get.addColumn(Incrementer.family, Incrementer.qualifier);
     get.setMaxVersions(1);
     Result res = this.region.get(get);
-    List<Cell> kvs = res.getColumn(Incrementer.family,
+    List<Cell> kvs = res.getColumnCells(Incrementer.family,
         Incrementer.qualifier);
 
     //we just got the latest version
@@ -3703,7 +3703,7 @@ public class TestHRegion extends HBaseTe
     get.addColumn(Appender.family, Appender.qualifier);
     get.setMaxVersions(1);
     Result res = this.region.get(get);
-    List<Cell> kvs = res.getColumn(Appender.family,
+    List<Cell> kvs = res.getColumnCells(Appender.family,
         Appender.qualifier);
 
     //we just got the latest version
@@ -3740,7 +3740,7 @@ public class TestHRegion extends HBaseTe
     get.addColumn(family, qualifier);
     get.setMaxVersions();
     res = this.region.get(get);
-    kvs = res.getColumn(family, qualifier);
+    kvs = res.getColumnCells(family, qualifier);
     assertEquals(1, kvs.size());
     assertEquals(Bytes.toBytes("value0"), CellUtil.cloneValue(kvs.get(0)));
 
@@ -3749,7 +3749,7 @@ public class TestHRegion extends HBaseTe
     get.addColumn(family, qualifier);
     get.setMaxVersions();
     res = this.region.get(get);
-    kvs = res.getColumn(family, qualifier);
+    kvs = res.getColumnCells(family, qualifier);
     assertEquals(1, kvs.size());
     assertEquals(Bytes.toBytes("value0"), CellUtil.cloneValue(kvs.get(0)));
 
@@ -3761,7 +3761,7 @@ public class TestHRegion extends HBaseTe
     get.addColumn(family, qualifier);
     get.setMaxVersions();
     res = this.region.get(get);
-    kvs = res.getColumn(family, qualifier);
+    kvs = res.getColumnCells(family, qualifier);
     assertEquals(1, kvs.size());
     assertEquals(Bytes.toBytes("value1"), CellUtil.cloneValue(kvs.get(0)));
 
@@ -3770,7 +3770,7 @@ public class TestHRegion extends HBaseTe
     get.addColumn(family, qualifier);
     get.setMaxVersions();
     res = this.region.get(get);
-    kvs = res.getColumn(family, qualifier);
+    kvs = res.getColumnCells(family, qualifier);
     assertEquals(1, kvs.size());
     assertEquals(Bytes.toBytes("value1"), CellUtil.cloneValue(kvs.get(0)));
   }

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java Tue Sep 17 00:19:35 2013
@@ -832,7 +832,7 @@ public class TestKeepDeletes {
 
   private void checkResult(Result r, byte[] fam, byte[] col, byte[] ... vals) {
     assertEquals(r.size(), vals.length);
-    List<Cell> kvs = r.getColumn(fam, col);
+    List<Cell> kvs = r.getColumnCells(fam, col);
     assertEquals(kvs.size(), vals.length);
     for (int i=0;i<vals.length;i++) {
       assertArrayEquals(CellUtil.cloneValue(kvs.get(i)), vals[i]);

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java Tue Sep 17 00:19:35 2013
@@ -461,7 +461,7 @@ public class TestMinVersions {
 
   private void checkResult(Result r, byte[] col, byte[] ... vals) {
     assertEquals(r.size(), vals.length);
-    List<Cell> kvs = r.getColumn(col, col);
+    List<Cell> kvs = r.getColumnCells(col, col);
     assertEquals(kvs.size(), vals.length);
     for (int i=0;i<vals.length;i++) {
       assertTrue(CellUtil.matchingValue(kvs.get(i), vals[i]));

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedUpdater.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedUpdater.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedUpdater.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedUpdater.java Tue Sep 17 00:19:35 2013
@@ -180,7 +180,7 @@ public class MultiThreadedUpdater extend
                 byte[] hashCodeBytes = Bytes.toBytes(hashCode);
                 byte[] checkedValue = HConstants.EMPTY_BYTE_ARRAY;
                 if (hashCode % 2 == 0) {
-                  Cell kv = result.getColumnLatest(cf, column);
+                  Cell kv = result.getColumnLatestCell(cf, column);
                   checkedValue = kv != null ? CellUtil.cloneValue(kv) : null;
                   Preconditions.checkNotNull(checkedValue,
                     "Column value to be checked should not be null");

Modified: hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java?rev=1523854&r1=1523853&r2=1523854&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java (original)
+++ hbase/branches/0.96/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java Tue Sep 17 00:19:35 2013
@@ -1281,9 +1281,9 @@ public class TestHBaseFsck {
 
       Get get = new Get(hri.getRegionName());
       Result result = meta.get(get);
-      assertTrue(result.getColumn(HConstants.CATALOG_FAMILY,
+      assertTrue(result.getColumnCells(HConstants.CATALOG_FAMILY,
         HConstants.SPLITA_QUALIFIER).isEmpty());
-      assertTrue(result.getColumn(HConstants.CATALOG_FAMILY,
+      assertTrue(result.getColumnCells(HConstants.CATALOG_FAMILY,
         HConstants.SPLITB_QUALIFIER).isEmpty());
       TEST_UTIL.getHBaseAdmin().flush(TableName.META_TABLE_NAME.getName());
 



Mime
View raw message