Java Code Examples for org.apache.hadoop.hbase.HBaseTestingUtility#setMaxRecoveryErrorCount()

The following examples show how to use org.apache.hadoop.hbase.HBaseTestingUtility#setMaxRecoveryErrorCount() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WALReplayWithIndexWritesAndCompressedWALIT.java    From phoenix with Apache License 2.0 5 votes vote down vote up
private WAL createWAL(final Configuration c, WALFactory walFactory) throws IOException {
  WAL wal = walFactory.getWAL(new byte[]{});

  // Set down maximum recovery so we dfsclient doesn't linger retrying something
  // long gone.
  HBaseTestingUtility.setMaxRecoveryErrorCount(((FSHLog) wal).getOutputStream(), 1);
  return wal;
}
 
Example 2
Source File: TestWALReplay.java    From hbase with Apache License 2.0 5 votes vote down vote up
@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;
}
 
Example 3
Source File: AbstractTestWALReplay.java    From hbase with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 4
Source File: WALReplayWithIndexWritesAndCompressedWALIT.java    From phoenix with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example 5
Source File: TestWALReplayWithIndexWritesAndCompressedWAL.java    From phoenix with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
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;
}