Code example for ScheduledThreadPoolExecutor

0
import org.apache.hadoop.hbase.TableName; 
import org.apache.hadoop.hbase.util.HBaseFsck; 
import org.apache.hadoop.hbase.util.HBaseFsck.ErrorReporter.ERROR_CODE; 
 
public class HbckTestingUtil { 
  private static ExecutorService exec = new ScheduledThreadPoolExecutor(10);
  public static HBaseFsck doFsck( 
      Configuration conf, boolean fix) throws Exception {
    return doFsck(conf, fix, null);
  } 
 
  public static HBaseFsck doFsck( 
      Configuration conf, boolean fix, TableName table) throws Exception {
    return doFsck(conf, fix, fix, fix, fix,fix, fix, fix, fix, fix, fix, table);
  } 
 
  public static HBaseFsck doFsck(Configuration conf, boolean fixAssignments,
      boolean fixMeta, boolean fixHdfsHoles, boolean fixHdfsOverlaps,
      boolean fixHdfsOrphans, boolean fixTableOrphans, boolean fixVersionFile,
      boolean fixReferenceFiles, boolean fixEmptyMetaRegionInfo, boolean fixTableLocks,