本文整理汇总了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();
}