org.apache.hadoop.hbase.HBaseTestingUtility.setMaxRecoveryErrorCount()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(93)

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

HBaseTestingUtility.setMaxRecoveryErrorCount介绍

[英]Set maxRecoveryErrorCount in DFSClient. In 0.20 pre-append its hard-coded to 5 and makes tests linger. Here is the exception you'll see:

2010-06-15 11:52:28,511 WARN  [DataStreamer for file /hbase/.logs/wal.1276627923013 block 
blk_928005470262850423_1021] hdfs.DFSClient$DFSOutputStream(2657): Error Recovery for block 
blk_928005470262850423_1021 failed  because recovery from primary datanode 127.0.0.1:53683 
failed 4 times.  Pipeline was 127.0.0.1:53687, 127.0.0.1:53683. Will retry...

[中]在DFSClient中设置maxRecoveryErrorCount。在0.20中,预先将其硬编码附加到5,并使测试延迟。以下是您将看到的例外情况:

2010-06-15 11:52:28,511 WARN  [DataStreamer for file /hbase/.logs/wal.1276627923013 block 
blk_928005470262850423_1021] hdfs.DFSClient$DFSOutputStream(2657): Error Recovery for block 
blk_928005470262850423_1021 failed  because recovery from primary datanode 127.0.0.1:53683 
failed 4 times.  Pipeline was 127.0.0.1:53687, 127.0.0.1:53683. Will retry...

代码示例

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

@Override
 protected WAL createWAL(Configuration c, Path hbaseRootDir, String logName) throws IOException {
  FSHLog wal = new FSHLog(FileSystem.get(c), hbaseRootDir, logName, c);
  wal.init();
  // Set down maximum recovery so we dfsclient doesn't linger retrying something
  // long gone.
  HBaseTestingUtility.setMaxRecoveryErrorCount(wal.getOutputStream(), 1);
  return wal;
 }
}

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

private MockWAL createMockWAL() throws IOException {
 MockWAL wal = new MockWAL(fs, hbaseRootDir, logName, conf);
 wal.init();
 // Set down maximum recovery so we dfsclient doesn't linger retrying something
 // long gone.
 HBaseTestingUtility.setMaxRecoveryErrorCount(wal.getOutputStream(), 1);
 return wal;
}

代码示例来源:origin: forcedotcom/phoenix

private HLog createWAL(final Configuration c) throws IOException {
 HLog wal = new HLog(FileSystem.get(c), logDir, oldLogDir, c);
 // Set down maximum recovery so we dfsclient doesn't linger retrying something
 // long gone.
 HBaseTestingUtility.setMaxRecoveryErrorCount(wal.getOutputStream(), 1);
 return wal;
}

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

private WAL createWAL(final Configuration c, WALFactory walFactory) throws IOException {
 WAL wal = walFactory.getWAL(null);
 // Set down maximum recovery so we dfsclient doesn't linger retrying something
 // long gone.
 HBaseTestingUtility.setMaxRecoveryErrorCount(((FSHLog) wal).getOutputStream(), 1);
 return wal;
}

代码示例来源:origin: org.apache.hbase/hbase-server

@Override
 protected WAL createWAL(Configuration c, Path hbaseRootDir, String logName) throws IOException {
  FSHLog wal = new FSHLog(FileSystem.get(c), hbaseRootDir, logName, c);
  // Set down maximum recovery so we dfsclient doesn't linger retrying something
  // long gone.
  HBaseTestingUtility.setMaxRecoveryErrorCount(wal.getOutputStream(), 1);
  return wal;
 }
}

代码示例来源:origin: org.apache.hbase/hbase-server

private MockWAL createMockWAL() throws IOException {
 MockWAL wal = new MockWAL(fs, hbaseRootDir, logName, conf);
 // Set down maximum recovery so we dfsclient doesn't linger retrying something
 // long gone.
 HBaseTestingUtility.setMaxRecoveryErrorCount(wal.getOutputStream(), 1);
 return wal;
}

相关文章

HBaseTestingUtility类方法