Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.HBaseConfiguration


  //////////////////////////////////////////////////////////////////////////////
  public void testLocks() throws IOException{
    byte [] tableName = Bytes.toBytes("testtable");
    byte [][] families = {fam1, fam2, fam3};
   
    HBaseConfiguration hc = initSplit();
    //Setting up region
    String method = this.getName();
    initHRegion(tableName, method, hc, families);
   
    final int threadCount = 10;
View Full Code Here


  //////////////////////////////////////////////////////////////////////////////
  public void testMerge() throws IOException {
    byte [] tableName = Bytes.toBytes("testtable");
    byte [][] families = {fam1, fam2, fam3};
   
    HBaseConfiguration hc = initSplit();
    //Setting up region
    String method = this.getName();
    initHRegion(tableName, method, hc, families);
   
    try {
View Full Code Here

   */
  public void testBasicSplit() throws Exception {
    byte [] tableName = Bytes.toBytes("testtable");
    byte [][] families = {fam1, fam2, fam3};
   
    HBaseConfiguration hc = initSplit();
    //Setting up region
    String method = this.getName();
    initHRegion(tableName, method, hc, families);
   
    try {
View Full Code Here

  }
 
  public void testSplitRegion() throws IOException {
    byte [] tableName = Bytes.toBytes("testtable");
    byte [] qualifier = Bytes.toBytes("qualifier");
    HBaseConfiguration hc = initSplit();
    int numRows = 10;
    byte [][] families = {fam1, fam3};
   
    //Setting up region
    String method = this.getName();
View Full Code Here

    byte[] tableName = Bytes.toBytes("testIndexesScanWithOneDeletedRow");
    byte[] family = Bytes.toBytes("family");

    //Setting up region
    String method = "testIndexesScanWithOneDeletedRow";
    initHRegion(tableName, method, new HBaseConfiguration(), family);

    Put put = new Put(Bytes.toBytes(1L));
    put.add(family, qual1, 1L, Bytes.toBytes(1L));
    region.put(put);
View Full Code Here

    assertEquals(regions.length, 2);
    return regions;
  }
 
  private HBaseConfiguration initSplit() {
    HBaseConfiguration conf = new HBaseConfiguration();
    // Always compact if there is more than one store file.
    conf.setInt("hbase.hstore.compactionThreshold", 2);
   
    // Make lease timeout longer, lease checks less frequent
    conf.setInt("hbase.master.lease.period", 10 * 1000);
    conf.setInt("hbase.master.lease.thread.wakefrequency", 5 * 1000);
   
    conf.setInt("hbase.regionserver.lease.period", 10 * 1000);
   
    // Increase the amount of time between client retries
    conf.setLong("hbase.client.pause", 15 * 1000);

    // This size should make it so we always split using the addContent
    // below.  After adding all data, the first region is 1.3M
    conf.setLong("hbase.hregion.max.filesize", 1024 * 128);
    return conf;
 
View Full Code Here

 

  private void initHRegion (byte [] tableName, String callingMethod,
    byte[] ... families)
  throws IOException {
    initHRegion(tableName, callingMethod, new HBaseConfiguration(), families);
  }
View Full Code Here

  /**
   * @param master
   */
  public ServerManager(HMaster master) {
    this.master = master;
    HBaseConfiguration c = master.getConfiguration();
    this.nobalancingCount = c.getInt("hbase.regions.nobalancing.count", 4);
    this.minimumServerCount = c.getInt("hbase.regions.server.count.min", 0);
    this.serverMonitorThread = new ServerMonitor(master.metaRescanInterval,
      master.shutdownRequested);
    this.serverMonitorThread.start();
  }
View Full Code Here

      } else {
        usage();
        System.exit(-1);
      }
    }
    HBaseConfiguration conf = new HBaseConfiguration();
    FileSystem fs = FileSystem.get(conf);
    Path baseDir = new Path(conf.get(HBASE_DIR));
    for (int i = 1; i < args.length; i++) {
      Path logPath = new Path(args[i]);
      if (!fs.exists(logPath)) {
        throw new FileNotFoundException(args[i] + " does not exist");
      }
View Full Code Here

    if (LOG.isDebugEnabled()) {
      LOG.debug("Files for region: " + b);
      listPaths(fs, b.getRegionDir());
    }
   
    HBaseConfiguration conf = a.getConf();
    HTableDescriptor tabledesc = a.getTableDesc();
    HLog log = a.getLog();
    Path basedir = a.getBaseDir();
    // Presume both are of same region type -- i.e. both user or catalog
    // table regions.  This way can use comparator.
View Full Code Here

TOP

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

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.