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

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

本文整理了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:

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

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

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

代码示例

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

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

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

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

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

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

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

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

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

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

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

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

相关文章

HBaseTestingUtility类方法