org.apache.hadoop.hbase.wal.WALKeyImpl.getClusterIds()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中org.apache.hadoop.hbase.wal.WALKeyImpl.getClusterIds()方法的一些代码示例,展示了WALKeyImpl.getClusterIds()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WALKeyImpl.getClusterIds()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.wal.WALKeyImpl
类名称:WALKeyImpl
方法名:getClusterIds

WALKeyImpl.getClusterIds介绍

暂无

代码示例

代码示例来源:origin: apache/hbase

  1. @Override
  2. public Entry filter(Entry entry) {
  3. // don't replicate if the log entries have already been consumed by the cluster
  4. if (replicationEndpoint.canReplicateToSameCluster()
  5. || !entry.getKey().getClusterIds().contains(peerClusterId)) {
  6. WALEdit edit = entry.getEdit();
  7. WALKeyImpl logKey = (WALKeyImpl)entry.getKey();
  8. if (edit != null && !edit.isEmpty()) {
  9. // Mark that the current cluster has the change
  10. logKey.addClusterId(clusterId);
  11. return entry;
  12. }
  13. }
  14. return null;
  15. }
  16. }

代码示例来源:origin: apache/hbase

  1. private void verifyNoClusterIdInRemoteLog(HBaseTestingUtility utility, Path remoteDir,
  2. String peerId) throws Exception {
  3. FileSystem fs2 = utility.getTestFileSystem();
  4. FileStatus[] files = fs2.listStatus(new Path(remoteDir, peerId));
  5. Assert.assertTrue(files.length > 0);
  6. for (FileStatus file : files) {
  7. try (
  8. Reader reader = WALFactory.createReader(fs2, file.getPath(), utility.getConfiguration())) {
  9. Entry entry = reader.next();
  10. Assert.assertTrue(entry != null);
  11. while (entry != null) {
  12. Assert.assertEquals(entry.getKey().getClusterIds().size(), 0);
  13. entry = reader.next();
  14. }
  15. }
  16. }
  17. }
  18. }

相关文章