本文整理了Java中org.apache.hadoop.hbase.wal.WALKeyImpl.getClusterIds()
方法的一些代码示例,展示了WALKeyImpl.getClusterIds()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WALKeyImpl.getClusterIds()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.wal.WALKeyImpl
类名称:WALKeyImpl
方法名:getClusterIds
暂无
代码示例来源:origin: apache/hbase
@Override
public Entry filter(Entry entry) {
// don't replicate if the log entries have already been consumed by the cluster
if (replicationEndpoint.canReplicateToSameCluster()
|| !entry.getKey().getClusterIds().contains(peerClusterId)) {
WALEdit edit = entry.getEdit();
WALKeyImpl logKey = (WALKeyImpl)entry.getKey();
if (edit != null && !edit.isEmpty()) {
// Mark that the current cluster has the change
logKey.addClusterId(clusterId);
return entry;
}
}
return null;
}
}
代码示例来源:origin: apache/hbase
private void verifyNoClusterIdInRemoteLog(HBaseTestingUtility utility, Path remoteDir,
String peerId) throws Exception {
FileSystem fs2 = utility.getTestFileSystem();
FileStatus[] files = fs2.listStatus(new Path(remoteDir, peerId));
Assert.assertTrue(files.length > 0);
for (FileStatus file : files) {
try (
Reader reader = WALFactory.createReader(fs2, file.getPath(), utility.getConfiguration())) {
Entry entry = reader.next();
Assert.assertTrue(entry != null);
while (entry != null) {
Assert.assertEquals(entry.getKey().getClusterIds().size(), 0);
entry = reader.next();
}
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!