Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.HBaseConfiguration


    this.version = version;
  }
 
  public static void main(String[] args) throws Exception {
    Writer out = new OutputStreamWriter(System.out, "UTF-8");
    HBaseConfiguration c = new HBaseConfiguration();
    // For debugging
    TableFormatterFactory tff =
      new TableFormatterFactory(out, c);
    Parser parser = new Parser("select * from 'x' where row='x';", out,  tff.get());
    Command cmd = parser.terminatedCommand();
View Full Code Here


    }
    this.formatter.footer();
  }

  public static void main(String[] args) throws UnsupportedEncodingException {
    HBaseConfiguration conf = new HBaseConfiguration();
    Writer out = new OutputStreamWriter(System.out, "UTF-8");
    TableFormatterFactory tff = new TableFormatterFactory(out, conf);
    HelpCommand cmd = new HelpCommand(out, tff.get());
    cmd.setArgument("");
    cmd.execute(conf);
View Full Code Here

   * @param tableName name of the table
   * @throws IOException
   */
  public HTable(final String tableName)
  throws IOException {
    this(new HBaseConfiguration(), Bytes.toBytes(tableName));
  }
View Full Code Here

   * @param tableName name of the table
   * @throws IOException
   */
  public HTable(final byte [] tableName)
  throws IOException {
    this(new HBaseConfiguration(), tableName);
  }
View Full Code Here

   * @param tableName name of table to check
   * @return true if table is on-line
   * @throws IOException
   */
  public static boolean isTableEnabled(byte[] tableName) throws IOException {
    return isTableEnabled(new HBaseConfiguration(), tableName);
  }
View Full Code Here

    if (args.length < 1) {
      printUsageAndExit();
    }

    HBaseConfiguration conf = new HBaseConfiguration();

    // Process command-line args. TODO: Better cmd-line processing
    // (but hopefully something not as painful as cli options).
    for (String cmd: args) {
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

        printUsageAndExit("ERROR: Unrecognized option <" + args[1] + ">");
      }
      majorCompact = true;
    }
    Path tableDir  = new Path(args[0]);
    HBaseConfiguration c = new HBaseConfiguration();
    FileSystem fs = FileSystem.get(c);
    Path logdir = new Path(c.get("hbase.tmp.dir"),
      "hlog" + tableDir.getName() + System.currentTimeMillis());
    HLog log = new HLog(fs, logdir, c, null);
    try {
      processTable(fs, tableDir, log, c, majorCompact);
     } finally {
View Full Code Here

  private final ZooKeeperWrapper zooKeeperWrapper;
  private final int zooKeeperNumRetries;
  private final int zooKeeperPause;

  RegionManager(HMaster master) {
    HBaseConfiguration conf = master.getConfiguration();

    this.master = master;
    this.maxAssignInOneGo = conf.getInt("hbase.regions.percheckin", 10);
    this.loadBalancer = new LoadBalancer(conf);

    // The root region
    rootScannerThread = new RootScanner(master);

    // Scans the meta table
    metaScannerThread = new MetaScanner(master);

    zooKeeperWrapper = master.getZooKeeperWrapper();
    zooKeeperNumRetries = conf.getInt(ZOOKEEPER_RETRIES, DEFAULT_ZOOKEEPER_RETRIES);
    zooKeeperPause = conf.getInt(ZOOKEEPER_PAUSE, DEFAULT_ZOOKEEPER_PAUSE);

    reassignRootRegion();
  }
View Full Code Here

  public void setConf(final Configuration c) {
    this.conf = c;
  }

  public static void main(String[] args) throws Exception {
    HBaseConfiguration c = new HBaseConfiguration();
    c.set("hbase.master", "durruti.local:60000");
    int errCode = ToolRunner.run(c, new RowCounter(), args);
    System.exit(errCode);
  }
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.