Ejemplo n.º 1
0
 private void doGets(HRegion region) throws IOException {
   for (int i = 0; i < NUM_ROWS; ++i) {
     final byte[] rowKey = LoadTestKVGenerator.md5PrefixedKey(i).getBytes();
     for (int j = 0; j < NUM_COLS_PER_ROW; ++j) {
       final String qualStr = String.valueOf(j);
       if (VERBOSE) {
         System.err.println(
             "Reading row " + i + ", column " + j + " " + Bytes.toString(rowKey) + "/" + qualStr);
       }
       final byte[] qualBytes = Bytes.toBytes(qualStr);
       Get get = new Get(rowKey);
       get.addColumn(CF_BYTES, qualBytes);
       Result result = region.get(get);
       assertEquals(1, result.size());
       byte[] value = result.getValue(CF_BYTES, qualBytes);
       assertTrue(LoadTestKVGenerator.verify(value, rowKey, qualBytes));
     }
   }
 }
Ejemplo n.º 2
0
 @Override
 public boolean verify(byte[] rowKey, byte[] cf, byte[] column, byte[] value) {
   return LoadTestKVGenerator.verify(value, rowKey, cf, column);
 }