Package org.apache.hadoop.hbase.io

Examples of org.apache.hadoop.hbase.io.BatchUpdate.compareTo()


    ImmutableBytesWritable expectedKey1 = new ImmutableBytesWritable(keyString1.getBytes("UTF-8"));
    assertEquals(expectedKey1, outputReader.getCurrentKey());
   
    BatchUpdate expectedValue1 = new BatchUpdate(keyString1);
    expectedValue1.put(column1, new byte[] {49, 57});
    assertEquals(0, expectedValue1.compareTo(outputReader.getCurrentValue())); //no equals

   
    assertTrue(outputReader.readKeyValue());
   
    //second one
View Full Code Here


    ImmutableBytesWritable expectedKey2 = new ImmutableBytesWritable(keyString2.getBytes("UTF-8"));
    assertEquals(expectedKey2, outputReader.getCurrentKey());
   
    BatchUpdate expectedValue2 = new BatchUpdate(keyString2);
    expectedValue2.put(column2, new byte[] {49, 57});
    assertEquals(0, expectedValue2.compareTo(outputReader.getCurrentValue())); //no equals

   
    assertFalse(outputReader.readKeyValue());
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.