hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1594139 - /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
Date Tue, 13 May 2014 06:15:47 GMT
Author: larsh
Date: Tue May 13 06:15:47 2014
New Revision: 1594139

URL: http://svn.apache.org/r1594139
Log:
HBASE-10936 Add zeroByte encoding test.

Modified:
    hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java

Modified: hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java?rev=1594139&r1=1594138&r2=1594139&view=diff
==============================================================================
--- hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
(original)
+++ hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java
Tue May 13 06:15:47 2014
@@ -121,6 +121,26 @@ public class TestDataBlockEncoders {
   }
 
   /**
+   * Test KeyValues with negative timestamp.
+   * @throws IOException On test failure.
+   */
+  @Test
+  public void testZeroByte() throws IOException {
+    List<KeyValue> kvList = new ArrayList<KeyValue>();
+    byte[] row = Bytes.toBytes("abcd");
+    byte[] family = new byte[] { 'f' };
+    byte[] qualifier0 = new byte[] { 'b' };
+    byte[] qualifier1 = new byte[] { 'c' };
+    byte[] value0 = new byte[] { 'd' };
+    byte[] value1 = new byte[] { 0x00 };
+    kvList.add(new KeyValue(row, family, qualifier0, 0, Type.Put, value0));
+    kvList.add(new KeyValue(row, family, qualifier1, 0, Type.Put, value1));
+    testEncodersOnDataset(
+        RedundantKVGenerator.convertKvToByteBuffer(kvList,
+            includesMemstoreTS));
+  }
+
+  /**
    * Test whether compression -> decompression gives the consistent results on
    * pseudorandom sample.
    * @throws IOException On test failure.



Mime
View raw message