Java 类org.apache.hadoop.hbase.HBaseCommonTestingUtility 实例源码

项目:ditb    文件:TestProcedureRecovery.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procEnv = new TestProcEnv();
  procStore = ProcedureTestingUtility.createStore(htu.getConfiguration(), fs, logDir);
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), procEnv, procStore);
  procExecutor.testing = new ProcedureExecutor.Testing();
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
  procSleepInterval = 0;
}
项目:ditb    文件:TestProcedureReplayOrder.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  htu.getConfiguration().setInt("hbase.procedure.store.wal.sync.wait.msec", 25);

  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procEnv = new TestProcedureEnv();
  procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), fs, logDir);
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), procEnv, procStore);
  procStore.start(NUM_THREADS);
  procExecutor.start(1, true);
}
项目:hbase    文件:TestHFile.java   
@Test
public void testNullMetaBlocks() throws Exception {
  if (cacheConf == null) cacheConf = new CacheConfig(conf);
  for (Compression.Algorithm compressAlgo :
      HBaseCommonTestingUtility.COMPRESSION_ALGORITHMS) {
    Path mFile = new Path(ROOT_DIR, "nometa_" + compressAlgo + ".hfile");
    FSDataOutputStream fout = createFSOutput(mFile);
    HFileContext meta = new HFileContextBuilder().withCompression(compressAlgo)
                        .withBlockSize(minBlockSize).build();
    Writer writer = HFile.getWriterFactory(conf, cacheConf)
        .withOutputStream(fout)
        .withFileContext(meta)
        .create();
    KeyValue kv = new KeyValue("foo".getBytes(), "f1".getBytes(), null, "value".getBytes());
    writer.append(kv);
    writer.close();
    fout.close();
    Reader reader = HFile.createReader(fs, mFile, cacheConf, true, conf);
    reader.loadFileInfo();
    assertNull(reader.getMetaBlock("non-existant", false));
  }
}
项目:hbase    文件:TestProcedureRecovery.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procEnv = new TestProcEnv();
  procStore = ProcedureTestingUtility.createStore(htu.getConfiguration(), logDir);
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), procEnv, procStore);
  procExecutor.testing = new ProcedureExecutor.Testing();
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
  procSleepInterval = 0;
}
项目:hbase    文件:TestProcedureReplayOrder.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  htu.getConfiguration().setInt(WALProcedureStore.SYNC_WAIT_MSEC_CONF_KEY, 25);

  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procEnv = new TestProcedureEnv();
  procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), procEnv, procStore);
  procStore.start(NUM_THREADS);
  procExecutor.start(1, true);
}
项目:hbase    文件:TestStressWALProcedureStore.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  setupConfiguration(htu.getConfiguration());

  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
  procStore.start(PROCEDURE_STORE_SLOTS);
  procStore.recoverLease();

  LoadCounter loader = new LoadCounter();
  procStore.load(loader);
  assertEquals(0, loader.getMaxProcId());
  assertEquals(0, loader.getLoadedCount());
  assertEquals(0, loader.getCorruptedCount());
}
项目:ditb    文件:TestYieldProcedures.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), fs, logDir);
  procRunnables = new TestRunQueue();
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), new TestProcEnv(),
      procStore, procRunnables);
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
项目:ditb    文件:TestProcedureExecution.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), fs, logDir);
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), null, procStore);
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
项目:ditb    文件:TestWALProcedureStore.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), fs, logDir);
  procStore.start(PROCEDURE_STORE_SLOTS);
  procStore.recoverLease();
  procStore.load(new LoadCounter());
}
项目:HIndex    文件:IntegrationTestImportTsv.java   
/**
 * Add classes necessary for integration-test jobs.
 */
public static void addTestDependencyJars(Configuration conf) throws IOException {
  TableMapReduceUtil.addDependencyJars(conf,
    org.apache.hadoop.hbase.BaseConfigurable.class, // hbase-server
    HBaseTestingUtility.class,                      // hbase-server-test
    HBaseCommonTestingUtility.class,                // hbase-common-test
    com.google.common.collect.ListMultimap.class,   // Guava
    org.cloudera.htrace.Trace.class);               // HTrace
}
项目:hbase    文件:TestCacheOnWrite.java   
@Parameters
public static Collection<Object[]> getParameters() throws IOException {
  List<Object[]> params = new ArrayList<>();
  for (BlockCache blockCache : getBlockCaches()) {
    for (CacheOnWriteType cowType : CacheOnWriteType.values()) {
      for (Compression.Algorithm compress : HBaseCommonTestingUtility.COMPRESSION_ALGORITHMS) {
        for (boolean cacheCompressedData : new boolean[] { false, true }) {
          params.add(new Object[] { cowType, compress, cacheCompressedData, blockCache });
        }
      }
    }
  }
  return params;
}
项目:hbase    文件:TestProcedureSuspended.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();

  procStore = new NoopProcedureStore();
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), new TestProcEnv(), procStore);
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
项目:hbase    文件:TestYieldProcedures.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
  procRunnables = new TestScheduler();
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), new TestProcEnv(),
      procStore, procRunnables);
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
项目:hbase    文件:TestStateMachineProcedure.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());

  logDir = new Path(testDir, "proc-logs");
  procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), new TestProcEnv(), procStore);
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
项目:hbase    文件:TestProcedureMetrics.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procEnv = new TestProcEnv();
  procStore = ProcedureTestingUtility.createStore(htu.getConfiguration(), logDir);
  procExecutor = new ProcedureExecutor<TestProcEnv>(htu.getConfiguration(), procEnv, procStore);
  procExecutor.testing = new ProcedureExecutor.Testing();
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
项目:hbase    文件:TestProcedureExecution.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), null, procStore);
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
项目:hbase    文件:TestProcedureEvents.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  Path testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  logDir = new Path(testDir, "proc-logs");

  procEnv = new TestProcEnv();
  procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), procEnv, procStore);
  procStore.start(1);
  procExecutor.start(1, true);
}
项目:hbase    文件:TestProcedureInMemoryChore.java   
@SuppressWarnings("rawtypes")
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();

  procEnv = new TestProcEnv();
  procStore = new NoopProcedureStore();
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), procEnv, procStore);
  procExecutor.testing = new ProcedureExecutor.Testing();
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
项目:hbase    文件:TestProcedureExecutor.java   
@Before
public void setUp() throws Exception {
  htu = new HBaseCommonTestingUtility();

  // NOTE: The executor will be created by each test
  procEnv = new TestProcEnv();
  procStore = new NoopProcedureStore();
  procStore.start(1);
}
项目:hbase    文件:TestChildProcedures.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procEnv = new TestProcEnv();
  procStore = ProcedureTestingUtility.createStore(htu.getConfiguration(), logDir);
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), procEnv, procStore);
  procExecutor.testing = new ProcedureExecutor.Testing();
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
项目:hbase    文件:TestProcedureNonce.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  Path testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  logDir = new Path(testDir, "proc-logs");
  procEnv = new TestProcEnv();
  procStore = ProcedureTestingUtility.createStore(htu.getConfiguration(), logDir);
  procExecutor = new ProcedureExecutor(htu.getConfiguration(), procEnv, procStore);
  procExecutor.testing = new ProcedureExecutor.Testing();
  procStore.start(PROCEDURE_EXECUTOR_SLOTS);
  procExecutor.start(PROCEDURE_EXECUTOR_SLOTS, true);
}
项目:hbase    文件:TestWALProcedureStore.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  testDir = htu.getDataTestDir();
  fs = testDir.getFileSystem(htu.getConfiguration());
  assertTrue(testDir.depth() > 1);

  setupConfig(htu.getConfiguration());
  logDir = new Path(testDir, "proc-logs");
  procStore = ProcedureTestingUtility.createWalStore(htu.getConfiguration(), logDir);
  procStore.start(PROCEDURE_STORE_SLOTS);
  procStore.recoverLease();
  procStore.load(new LoadCounter());
}
项目:PyroDB    文件:IntegrationTestImportTsv.java   
/**
 * Add classes necessary for integration-test jobs.
 */
public static void addTestDependencyJars(Configuration conf) throws IOException {
  TableMapReduceUtil.addDependencyJars(conf,
    org.apache.hadoop.hbase.BaseConfigurable.class, // hbase-server
    HBaseTestingUtility.class,                      // hbase-server-test
    HBaseCommonTestingUtility.class,                // hbase-common-test
    com.google.common.collect.ListMultimap.class,   // Guava
    org.htrace.Trace.class);               // HTrace
}
项目:hbase    文件:TestCoprocessorScanPolicy.java   
@Parameters
public static Collection<Object[]> parameters() {
  return HBaseCommonTestingUtility.BOOLEAN_PARAMETERIZED;
}
项目:hbase    文件:TestHFileBlockIndex.java   
@Parameters
public static Collection<Object[]> compressionAlgorithms() {
  return HBaseCommonTestingUtility.COMPRESSION_ALGORITHMS_PARAMETERIZED;
}
项目:hbase    文件:TestHFileWriterV3.java   
@Parameters
public static Collection<Object[]> parameters() {
  return HBaseCommonTestingUtility.BOOLEAN_PARAMETERIZED;
}
项目:hbase    文件:TestSeekToBlockWithEncoders.java   
@Parameters
public static Collection<Object[]> parameters() {
  return HBaseCommonTestingUtility.BOOLEAN_PARAMETERIZED;
}
项目:hbase    文件:TestKeyOnlyFilter.java   
@Parameters
public static Collection<Object[]> parameters() {
  return HBaseCommonTestingUtility.BOOLEAN_PARAMETERIZED;
}
项目:hbase    文件:TestMultiRowResource.java   
@Parameterized.Parameters
public static Collection<Object[]> data() {
  return HBaseCommonTestingUtility.BOOLEAN_PARAMETERIZED;
}
项目:hbase    文件:TestSchemaResource.java   
@Parameterized.Parameters
public static Collection<Object[]> parameters() {
  return HBaseCommonTestingUtility.BOOLEAN_PARAMETERIZED;
}
项目:hbase    文件:TestCommonFSUtils.java   
@Before
public void setUp() throws IOException {
  htu = new HBaseCommonTestingUtility();
  conf = htu.getConfiguration();
}
项目:hbase    文件:TestByteBufferUtils.java   
@Parameterized.Parameters
public static Collection<Object[]> parameters() {
  return HBaseCommonTestingUtility.BOOLEAN_PARAMETERIZED;
}