Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.IntegrationTestingUtility


  @BeforeClass
  public static void setUp() throws Exception {
    // Set up the integration test util
    if (util == null) {
      util = new IntegrationTestingUtility();
    }

    // Make sure there are three servers.
    util.initializeCluster(3);
View Full Code Here


  }

  private IntegrationTestingUtility createUtil() throws Exception {
    Configuration conf = getConf();
    if (this.util == null) {
      IntegrationTestingUtility u;
      if (conf == null) {
        u = new IntegrationTestingUtility();
      } else {
        u = new IntegrationTestingUtility(conf);
      }
      util = u;
      util.initializeCluster(1);

    }
View Full Code Here

    private Configuration setupServer(Configuration config) throws Exception {
        // The HBaseTestingUtility has some kind of memory leak in HBase 0.94.15+ on the Mac
        // so the pom will use 0.94.14 until this gets fixed.
        if(isDistributedCluster(config)){
            IntegrationTestingUtility util =  new IntegrationTestingUtility(config);
            util.initializeCluster(this.NUM_SLAVES_BASE);
            this.util = util;
            // remove all hbase tables
            HBaseAdmin admin = util.getHBaseAdmin();
            HTableDescriptor[] tables = admin.listTables();
            for(HTableDescriptor table : tables){
                util.deleteTable(table.getName());
            }
        } else {
            util = new HBaseTestingUtility(config);
            util.startMiniCluster();
        }
        return util.getConfiguration();
    }
View Full Code Here

  @BeforeClass
  public static void setUp() throws Exception {
    // Set up the integration test util
    if (util == null) {
      util = new IntegrationTestingUtility();
    }

    // Make sure there are three servers.
    util.initializeCluster(3);
View Full Code Here

  private static IntegrationTestingUtility util;

  @BeforeClass
  public static void provisionCluster() throws Exception {
    if (null == util) {
      util = new IntegrationTestingUtility();
    }
  }
View Full Code Here

  public void setConf(Configuration conf) {
    if (util != null) {
      throw new IllegalArgumentException(
          "setConf not supported after the test has been initialized.");
    }
    util = new IntegrationTestingUtility(conf);
  }
View Full Code Here

  }

  @BeforeClass
  public static void provisionCluster() throws Exception {
    if (null == util) {
      util = new IntegrationTestingUtility();
    }
    util.initializeCluster(1);
    if (!util.isDistributedCluster()) {
      // also need MR when running without a real cluster
      util.startMiniMapReduceCluster();
View Full Code Here

  }

  public static void main(String[] args) throws Exception {
    Configuration conf = HBaseConfiguration.create();
    IntegrationTestingUtility.setUseDistributedCluster(conf);
    util = new IntegrationTestingUtility(conf);
    // not using ToolRunner to avoid unnecessary call to setConf()
    args = new GenericOptionsParser(conf, args).getRemainingArgs();
    int status = new IntegrationTestImportTsv().run(args);
    System.exit(status);
  }
View Full Code Here

  }

  private IntegrationTestingUtility createUtil() throws Exception {
    Configuration conf = getConf();
    if (this.util == null) {
      IntegrationTestingUtility u;
      if (conf == null) {
        u = new IntegrationTestingUtility();
      } else {
        u = new IntegrationTestingUtility(conf);
      }
      util = u;
      util.initializeCluster(1);

    }
View Full Code Here

     * @return url to be used by clients to connect to the mini cluster.
     */
    private static String initClusterDistributedMode(Configuration conf) {
        setTestConfigForDistribuedCluster(conf);
        try {
            IntegrationTestingUtility util =  new IntegrationTestingUtility(conf);
            utility = util;
            util.initializeCluster(NUM_SLAVES_BASE);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return JDBC_PROTOCOL + JDBC_PROTOCOL_TERMINATOR + PHOENIX_TEST_DRIVER_URL_PARAM;
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.IntegrationTestingUtility

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.