Package org.apache.hadoop.hbase.zookeeper

Examples of org.apache.hadoop.hbase.zookeeper.ZKTable


      conf.getInt("hbase.master.assignment.timeoutmonitor.timeout", 1800000));
    this.timerUpdater = new TimerUpdater(conf.getInt(
        "hbase.master.assignment.timerupdater.period", 10000), master);
    Threads.setDaemonThreadRunning(timerUpdater.getThread(),
        master.getServerName() + ".timerUpdater");
    this.zkTable = new ZKTable(this.master.getZooKeeper());
    this.maximumAssignmentAttempts =
      this.master.getConfiguration().getInt("hbase.assignment.maximum.attempts", 10);
    this.balancer = balancer;
    this.threadPoolExecutorService = Executors.newCachedThreadPool();
  }
View Full Code Here


    List<HRegionInfo> regionsThatShouldBeOffline = new ArrayList<HRegionInfo>();

    log("Beginning to mock scenarios");

    // Disable the disabledTable in ZK
    ZKTable zktable = new ZKTable(zkw);
    zktable.setDisabledTable(Bytes.toString(disabledTable));

    /*
     *  ZK = OFFLINE
     */

 
View Full Code Here

    List<HRegionInfo> regionsThatShouldBeOffline = new ArrayList<HRegionInfo>();

    log("Beginning to mock scenarios");

    // Disable the disabledTable in ZK
    ZKTable zktable = new ZKTable(zkw);
    zktable.setDisabledTable(Bytes.toString(disabledTable));

    assertTrue(" The enabled table should be identified on master fail over.",
        zktable.isEnabledTable("enabledTable"));

    /*
     * ZK = CLOSING
     */

 
View Full Code Here

    Configuration conf = master.getConfiguration();
    this.timeoutMonitor = new TimeoutMonitor(
      conf.getInt("hbase.master.assignment.timeoutmonitor.period", 10000),
      master, serverManager,
      conf.getInt("hbase.master.assignment.timeoutmonitor.timeout", 1800000));
    this.zkTable = new ZKTable(this.master.getZooKeeper());
    this.maximumAssignmentAttempts =
      this.master.getConfiguration().getInt("hbase.assignment.maximum.attempts", 10);
    this.balancer = balancer;
    this.threadPoolExecutorService = Executors.newCachedThreadPool();
  }
View Full Code Here

    } else {
      this.serversInUpdatingTimer =  null;
      this.timeoutMonitor = null;
      this.timerUpdater = null;
    }
    this.zkTable = new ZKTable(this.watcher);
    // This is the max attempts, not retries, so it should be at least 1.
    this.maximumAttempts = Math.max(1,
      this.server.getConfiguration().getInt("hbase.assignment.maximum.attempts", 10));
    this.sleepTimeBeforeRetryingMetaAssignment = this.server.getConfiguration().getLong(
        "hbase.meta.assignment.retry.sleeptime", 1000l);
View Full Code Here

          new RegionState(region.getRegionInfo(), RegionState.State.OPEN,
              System.currentTimeMillis(), server.getServerName()));
      // create a node with OPENED state
      zkw = HBaseTestingUtility.createAndForceNodeToOpenedState(TEST_UTIL,
          region, server.getServerName());
      when(am.getZKTable()).thenReturn(new ZKTable(zkw));
      Stat stat = new Stat();
      String nodeName = ZKAssign.getNodeName(zkw, region.getRegionInfo()
          .getEncodedName());
      ZKUtil.getDataAndWatch(zkw, nodeName, stat);
View Full Code Here

        break;
      }
    }

    // Disable the table in ZK
    ZKTable zkTable = am.getZKTable();
    zkTable.setDisablingTable(table);
    ZKAssign.createNodeClosing(master.getZooKeeper(), closingRegion, serverName);

    // Stop the master
    abortMaster(cluster);
    master = startMasterAndWaitTillMetaRegionAssignment(cluster);
    deadRS.kill();
    deadRS.join();
    waitUntilMasterIsInitialized(master);
    am = cluster.getMaster().getAssignmentManager();
    zkTable = am.getZKTable();
    // wait for no more RIT
    ZKAssign.blockUntilNoRIT(master.getZooKeeper());
    while (!master.getAssignmentManager().getZKTable().isDisabledTable(table)) {
      Thread.sleep(10);
    }
    assertTrue("Table should be disabled state.", zkTable.isDisabledTable(table));
    HBaseAdmin admin = new HBaseAdmin(master.getConfiguration());
    admin.deleteTable(table);
  }
View Full Code Here

      conf.getInt("hbase.master.assignment.timeoutmonitor.timeout", 1800000));
    this.timerUpdater = new TimerUpdater(conf.getInt(
        "hbase.master.assignment.timerupdater.period", 10000), master);
    Threads.setDaemonThreadRunning(timerUpdater.getThread(),
        master.getServerName() + ".timerUpdater");
    this.zkTable = new ZKTable(this.master.getZooKeeper());
    this.maximumAssignmentAttempts =
      this.master.getConfiguration().getInt("hbase.assignment.maximum.attempts", 10);
    this.balancer = balancer;
    this.threadPoolExecutorService = Executors.newCachedThreadPool();
  }
View Full Code Here

    List<HRegionInfo> regionsThatShouldBeOffline = new ArrayList<HRegionInfo>();

    log("Beginning to mock scenarios");

    // Disable the disabledTable in ZK
    ZKTable zktable = new ZKTable(zkw);
    zktable.setDisabledTable(Bytes.toString(disabledTable));

    /*
     *  ZK = OFFLINE
     */

 
View Full Code Here

    List<HRegionInfo> regionsThatShouldBeOffline = new ArrayList<HRegionInfo>();

    log("Beginning to mock scenarios");

    // Disable the disabledTable in ZK
    ZKTable zktable = new ZKTable(zkw);
    zktable.setDisabledTable(Bytes.toString(disabledTable));

    assertTrue(" The enabled table should be identified on master fail over.",
        zktable.isEnabledTable("enabledTable"));

    /*
     * ZK = CLOSING
     */

 
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.zookeeper.ZKTable

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.