本文整理汇总了Java中org.apache.hadoop.hbase.regionserver.wal.WALEdit.isMetaEditFamily方法的典型用法代码示例。如果您正苦于以下问题:Java WALEdit.isMetaEditFamily方法的具体用法?Java WALEdit.isMetaEditFamily怎么用?Java WALEdit.isMetaEditFamily使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hbase.regionserver.wal.WALEdit
的用法示例。
在下文中一共展示了WALEdit.isMetaEditFamily方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: map
import org.apache.hadoop.hbase.regionserver.wal.WALEdit; //导入方法依赖的package包/类
@Override
public void map(WALKey key, WALEdit value,
Context context)
throws IOException {
try {
// skip all other tables
if (Bytes.equals(table, key.getTablename().getName())) {
for (Cell cell : value.getCells()) {
KeyValue kv = KeyValueUtil.ensureKeyValueTypeForMR(cell);
if (WALEdit.isMetaEditFamily(kv.getFamily())) continue;
context.write(new ImmutableBytesWritable(kv.getRow()), kv);
}
}
} catch (InterruptedException e) {
e.printStackTrace();
}
}
示例2: matches
import org.apache.hadoop.hbase.regionserver.wal.WALEdit; //导入方法依赖的package包/类
@Override
public boolean matches(Object edit) {
List<Cell> cells = ((WALEdit)edit).getCells();
if (cells.isEmpty()) {
return false;
}
if (WALEdit.isMetaEditFamily(cells.get(0))) {
FlushDescriptor desc = null;
try {
desc = WALEdit.getFlushDescriptor(cells.get(0));
} catch (IOException e) {
LOG.warn(e);
return false;
}
if (desc != null) {
for (FlushAction action : actions) {
if (desc.getAction() == action) {
return true;
}
}
}
}
return false;
}
示例3: replayEdit
import org.apache.hadoop.hbase.regionserver.wal.WALEdit; //导入方法依赖的package包/类
static int replayEdit(HRegion region, WAL.Entry entry) throws IOException {
if (WALEdit.isMetaEditFamily(entry.getEdit().getCells().get(0))) {
return 0; // handled elsewhere
}
Put put = new Put(entry.getEdit().getCells().get(0).getRow());
for (Cell cell : entry.getEdit().getCells()) put.add(cell);
put.setDurability(Durability.SKIP_WAL);
MutationReplay mutation = new MutationReplay(MutationType.PUT, put, 0, 0);
region.batchReplay(new MutationReplay[] {mutation},
entry.getKey().getLogSeqNum());
return Integer.parseInt(Bytes.toString(put.getRow()));
}