本文整理匯總了Java中org.apache.hadoop.hbase.mapreduce.WALInputFormat.WALRecordReader類的典型用法代碼示例。如果您正苦於以下問題:Java WALRecordReader類的具體用法?Java WALRecordReader怎麽用?Java WALRecordReader使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
WALRecordReader類屬於org.apache.hadoop.hbase.mapreduce.WALInputFormat包,在下文中一共展示了WALRecordReader類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testSplit
import org.apache.hadoop.hbase.mapreduce.WALInputFormat.WALRecordReader; //導入依賴的package包/類
/**
* Create a new reader from the split, and match the edits against the passed columns.
*/
private void testSplit(InputSplit split, byte[]... columns) throws Exception {
final WALRecordReader reader = getReader();
reader.initialize(split, MapReduceTestUtil.createDummyMapTaskAttemptContext(conf));
for (byte[] column : columns) {
assertTrue(reader.nextKeyValue());
Cell cell = reader.getCurrentValue().getCells().get(0);
if (!Bytes.equals(column, cell.getQualifier())) {
assertTrue("expected [" + Bytes.toString(column) + "], actual ["
+ Bytes.toString(cell.getQualifier()) + "]", false);
}
}
assertFalse(reader.nextKeyValue());
reader.close();
}
示例2: testSplit
import org.apache.hadoop.hbase.mapreduce.WALInputFormat.WALRecordReader; //導入依賴的package包/類
/**
* Create a new reader from the split, and match the edits against the passed columns.
*/
private void testSplit(InputSplit split, byte[]... columns) throws Exception {
WALRecordReader<WALKey> reader = getReader();
reader.initialize(split, MapReduceTestUtil.createDummyMapTaskAttemptContext(conf));
for (byte[] column : columns) {
assertTrue(reader.nextKeyValue());
Cell cell = reader.getCurrentValue().getCells().get(0);
if (!Bytes.equals(column, 0, column.length, cell.getQualifierArray(),
cell.getQualifierOffset(), cell.getQualifierLength())) {
assertTrue(
"expected [" + Bytes.toString(column) + "], actual [" + Bytes.toString(
cell.getQualifierArray(), cell.getQualifierOffset(), cell.getQualifierLength()) + "]",
false);
}
}
assertFalse(reader.nextKeyValue());
reader.close();
}
示例3: getReader
import org.apache.hadoop.hbase.mapreduce.WALInputFormat.WALRecordReader; //導入依賴的package包/類
@Override
protected WALRecordReader getReader() {
return new HLogKeyRecordReader();
}
示例4: getReader
import org.apache.hadoop.hbase.mapreduce.WALInputFormat.WALRecordReader; //導入依賴的package包/類
protected WALRecordReader getReader() {
return new WALKeyRecordReader();
}
示例5: getReader
import org.apache.hadoop.hbase.mapreduce.WALInputFormat.WALRecordReader; //導入依賴的package包/類
private WALRecordReader<WALKey> getReader() {
return new WALKeyRecordReader();
}