You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2013/05/08 22:01:59 UTC

svn commit: r1480430 - in /hbase/trunk: hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/ hbase-common/src/main/java/org/apache/hadoop/hbase/ hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/decode/

Author: stack
Date: Wed May  8 20:01:57 2013
New Revision: 1480430

URL: http://svn.apache.org/r1480430
Log:
HBASE-7897 Add support for tags to Cell Interface

Modified:
    hbase/trunk/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestPayloadCarryingRpcController.java
    hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/Cell.java
    hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
    hbase/trunk/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/decode/PrefixTreeCell.java

Modified: hbase/trunk/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestPayloadCarryingRpcController.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestPayloadCarryingRpcController.java?rev=1480430&r1=1480429&r2=1480430&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestPayloadCarryingRpcController.java (original)
+++ hbase/trunk/hbase-client/src/test/java/org/apache/hadoop/hbase/ipc/TestPayloadCarryingRpcController.java Wed May  8 20:01:57 2013
@@ -157,6 +157,24 @@ public class TestPayloadCarryingRpcContr
               public int getValueLength() {
                 return Bytes.SIZEOF_INT;
               }
+
+              @Override
+              public int getTagsOffset() {
+                // TODO Auto-generated method stub
+                return 0;
+              }
+
+              @Override
+              public int getTagsLength() {
+                // TODO Auto-generated method stub
+                return 0;
+              }
+
+              @Override
+              public byte[] getTagsArray() {
+                // TODO Auto-generated method stub
+                return null;
+              }
             };
           }
 

Modified: hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/Cell.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/Cell.java?rev=1480430&r1=1480429&r2=1480430&view=diff
==============================================================================
--- hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/Cell.java (original)
+++ hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/Cell.java Wed May  8 20:01:57 2013
@@ -90,7 +90,7 @@ public interface Cell {
   byte[] getFamilyArray();
 
   /**
-   * @return Array index of first row byte
+   * @return Array index of first family byte
    */
   int getFamilyOffset();
 
@@ -167,5 +167,20 @@ public interface Cell {
    * @return Number of value bytes.  Must be < valueArray.length - offset.
    */
   int getValueLength();
+  
+  /**
+   * @return the tags byte array
+   */
+  byte[] getTagsArray();
+
+  /**
+   * @return the first offset where the tags start in the Cell
+   */
+  int getTagsOffset();
+  
+  /**
+   * @return the total length of the tags in the Cell.
+   */
+  int getTagsLength();
 
 }

Modified: hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java?rev=1480430&r1=1480429&r2=1480430&view=diff
==============================================================================
--- hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java (original)
+++ hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java Wed May  8 20:01:57 2013
@@ -873,7 +873,7 @@ public class KeyValue implements Cell, H
   /**
    * Clones a KeyValue.  This creates a copy, re-allocating the buffer.
    * @return Fully copied clone of this KeyValue
-   * @throws CloneNotSupportedException 
+   * @throws CloneNotSupportedException
    */
   @Override
   public KeyValue clone() throws CloneNotSupportedException {
@@ -2806,4 +2806,19 @@ public class KeyValue implements Cell, H
     sum += Bytes.SIZEOF_LONG;// memstoreTS
     return ClassSize.align(sum);
   }
+
+  @Override
+  public int getTagsOffset() {
+    throw new UnsupportedOperationException("Not implememnted");
+  }
+
+  @Override
+  public int getTagsLength() {
+    throw new UnsupportedOperationException("Not implememnted");
+  }
+
+  @Override
+  public byte[] getTagsArray() {
+    throw new UnsupportedOperationException("Not implememnted");
+  }
 }

Modified: hbase/trunk/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/decode/PrefixTreeCell.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/decode/PrefixTreeCell.java?rev=1480430&r1=1480429&r2=1480430&view=diff
==============================================================================
--- hbase/trunk/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/decode/PrefixTreeCell.java (original)
+++ hbase/trunk/hbase-prefix-tree/src/main/java/org/apache/hadoop/hbase/codec/prefixtree/decode/PrefixTreeCell.java Wed May  8 20:01:57 2013
@@ -194,4 +194,18 @@ public class PrefixTreeCell implements C
     return kv.toString();
   }
 
+  @Override
+  public int getTagsOffset() {
+    throw new UnsupportedOperationException("Not implemented");
+  }
+
+  @Override
+  public int getTagsLength() {
+    throw new UnsupportedOperationException("Not implemented");
+  }
+
+  @Override
+  public byte[] getTagsArray() {
+    throw new UnsupportedOperationException("Not implemented");
+  }
 }