Package org.apache.hadoop.hbase.MultithreadedTestUtil

Examples of org.apache.hadoop.hbase.MultithreadedTestUtil.RepeatingTestThread


      putThread = new PutThread(numRows, families, qualifiers);
      putThread.start();
      putThread.waitForFirstPut();

      // Add a thread that flushes as fast as possible
      ctx.addThread(new RepeatingTestThread(ctx) {
        private int flushesSinceCompact = 0;
        private final int maxFlushesSinceCompact = 20;

        @Override
        public void doAnAction() throws Exception {
View Full Code Here


      putThread = new PutThread(numRows, families, qualifiers);
      putThread.start();
      putThread.waitForFirstPut();

      // Add a thread that flushes as fast as possible
      ctx.addThread(new RepeatingTestThread(ctx) {
      private int flushesSinceCompact = 0;
      private final int maxFlushesSinceCompact = 20;
        public void doAnAction() throws Exception {
          if (region.flushcache()) {
            ++flushesSinceCompact;
View Full Code Here

          ctx, rows, FAMILIES);
      writers.add(writer);
      ctx.addThread(writer);
    }
    // Add a flusher
    ctx.addThread(new RepeatingTestThread(ctx) {
      HBaseAdmin admin = new HBaseAdmin(util.getConfiguration());
      public void doAnAction() throws Exception {
        try {
          admin.flush(TABLE_NAME);
        } catch(IOException ioe) {
View Full Code Here

      putThread = new PutThread(numRows, families, qualifiers);
      putThread.start();
      putThread.waitForFirstPut();

      // Add a thread that flushes as fast as possible
      ctx.addThread(new RepeatingTestThread(ctx) {
        private int flushesSinceCompact = 0;
        private final int maxFlushesSinceCompact = 20;

        @Override
        public void doAnAction() throws Exception {
View Full Code Here

  @Test
  public void testTableDisabledRace() throws Exception {
    final HConnection connection = new HConnectionRaceTester(TEST_UTIL.getConfiguration(), true);
    MultithreadedTestUtil.TestContext ctx =
      new MultithreadedTestUtil.TestContext(TEST_UTIL.getConfiguration());
    RepeatingTestThread disabledChecker = new RepeatingTestThread(ctx) {
      @Override
      public void doAnAction() throws IOException {
        try {
          connection.isTableDisabled(Bytes.toBytes("tableToCheck"));
        } catch (IOException ioe) {
View Full Code Here

  @Test
  public void testGetCurrentNrHRSRace() throws Exception {
    final HConnection connection = new HConnectionRaceTester(TEST_UTIL.getConfiguration(), true);
    MultithreadedTestUtil.TestContext ctx =
      new MultithreadedTestUtil.TestContext(TEST_UTIL.getConfiguration());
    RepeatingTestThread getCurrentNrHRSCaller = new RepeatingTestThread(ctx) {
      @Override
      public void doAnAction() throws IOException {
        try {
          connection.getCurrentNrHRS();
        } catch (IOException ioe) {
View Full Code Here

      putThread = new PutThread(numRows, families, qualifiers);
      putThread.start();
      putThread.waitForFirstPut();

      // Add a thread that flushes as fast as possible
      ctx.addThread(new RepeatingTestThread(ctx) {
      private int flushesSinceCompact = 0;
      private final int maxFlushesSinceCompact = 20;
        public void doAnAction() throws Exception {
          if (region.flushcache().isCompactionNeeded()) {
            ++flushesSinceCompact;
View Full Code Here

      putThread = new PutThread(numRows, families, qualifiers);
      putThread.start();
      putThread.waitForFirstPut();

      // Add a thread that flushes as fast as possible
      ctx.addThread(new RepeatingTestThread(ctx) {
      private int flushesSinceCompact = 0;
      private final int maxFlushesSinceCompact = 20;
        public void doAnAction() throws Exception {
          if (region.flushcache()) {
            ++flushesSinceCompact;
View Full Code Here

          ctx, rows, FAMILIES);
      writers.add(writer);
      ctx.addThread(writer);
    }
    // Add a flusher
    ctx.addThread(new RepeatingTestThread(ctx) {
      HBaseAdmin admin = new HBaseAdmin(util.getConfiguration());
      public void doAnAction() throws Exception {
        admin.flush(TABLE_NAME);
      }
    });
View Full Code Here

      writers.add(writer);
      ctx.addThread(writer);
    }
    // Add a flusher
    if (useFlusher) {
      ctx.addThread(new RepeatingTestThread(ctx) {
        public void doAnAction() throws Exception {
          util.flush();
        }
      });
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.MultithreadedTestUtil.RepeatingTestThread

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.