Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.HBaseConfiguration


    return hbaseConf;
  }

  @Override
  public void setConf(Configuration conf) {
    hbaseConf = new HBaseConfiguration(conf);
  }
View Full Code Here


    private HBaseAdmin hbaseAdmin;

    private ArrayList<Table> tableList;

    public Connection(Configuration configuration) {
        hbaseConfiguration = new HBaseConfiguration(configuration);
        tableList = new ArrayList<Table>();
    }
View Full Code Here

    zooKeeperCluster = new MiniZooKeeperCluster();
    zooKeeperPort = zooKeeperCluster.startup(
      new File(tmpdir, "zookeeper"));
    conf.set("hbase.zookeeper.property.clientPort",
      Integer.toString(zooKeeperPort));
    HBaseConfiguration hbaseConf = new HBaseConfiguration(conf);
    hbaseCluster = new MiniHBaseCluster(hbaseConf, NUM_REGIONSERVERS);
    conf.set("hbase.master", hbaseCluster.getHMasterAddress().toString());
    // opening the META table ensures that cluster is running
    new HTable(new HBaseConfiguration(conf), HConstants.META_TABLE_NAME);
  }
View Full Code Here

    @Before
    @Override
    protected void setUp() throws Exception {
        super.setUp();
       
        conf = new HBaseConfiguration(ConfigurationUtil.
             toConfiguration(cluster.getProperties()));
        conf.set("fs.default.name", cluster.getFileSystem().getUri().toString());
        Path parentdir = cluster.getFileSystem().getHomeDirectory();
        conf.set(HConstants.HBASE_DIR, parentdir.toString());
       
View Full Code Here

    job.setOutputFormatClass(MultiTableOutputFormat.class);
    return job;
  }

  public static void main(String[] args) throws Exception {
    HBaseConfiguration conf = new HBaseConfiguration();
    String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs();
    if(otherArgs.length < 3) {
      System.err.println("Only " + otherArgs.length + " arguments supplied, required: 3");
      System.err.println("Usage: IndexBuilder <TABLE_NAME> <COLUMN_FAMILY> <ATTR> [<ATTR> ...]");
      System.exit(-1);
View Full Code Here

   *
   * @param args  The command line parameters.
   * @throws Exception When running the job fails.
   */
  public static void main(String[] args) throws Exception {
    HBaseConfiguration conf = new HBaseConfiguration();
    String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs();
    if(otherArgs.length != 2) {
      System.err.println("Wrong number of arguments: " + otherArgs.length);
      System.err.println("Usage: " + NAME + " <input> <tablename>");
      System.exit(-1);
View Full Code Here

    super.tearDown();
  }

  @SuppressWarnings("boxing")
  public void testReadObjectDataInputConfiguration() throws IOException {
    HBaseConfiguration conf = new HBaseConfiguration();
    // Do primitive type
    final int COUNT = 101;
    assertTrue(doType(conf, COUNT, int.class).equals(COUNT));
    // Do array
    final byte [] testing = "testing".getBytes();
View Full Code Here

 
  private final Set<String> references = new HashSet<String>();
 
  /** default constructor */
  public Migrate() {
    this(new HBaseConfiguration());
  }
View Full Code Here

      out.write("\n  <p>");
      out.print( cmd.getCommandType() );
      out.write("-type commands are disabled in this interface.</p>\n ");

    } else {
      ReturnMsg rm = cmd.execute(new HBaseConfiguration());
      String summary = rm == null? "": rm.toString();
      out.write("\n  <p>");
      out.print( summary );
      out.write("</p>\n ");
View Full Code Here

      out = pageContext.getOut();
      _jspx_out = out;


  HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER);
  HBaseConfiguration conf = new HBaseConfiguration();
  TableFormatter formatter = new HtmlTableFormatter(out);
  ShowCommand show = new ShowCommand(out, formatter, "tables");
  HServerAddress rootLocation = master.getRootRegionLocation();
  Map<Text, MetaRegion> onlineRegions = master.getOnlineMetaRegions();
  Map<String, HServerInfo> serverToServerInfos =
    master.getServersToServerInfo();

      out.write("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \n  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> \n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\"/>\n<title>Hbase Master: ");
      out.print( master.getMasterAddress());
      out.write("</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/hbase.css\" />\n</head>\n\n<body>\n\n<a id=\"logo\" href=\"http://wiki.apache.org/lucene-hadoop/Hbase\"><img src=\"/static/hbase_logo_med.gif\" alt=\"Hbase Logo\" title=\"Hbase Logo\" /></a>\n<h1 id=\"page_title\">Master: ");
      out.print(master.getMasterAddress());
      out.write("</h1>\n<p id=\"links_menu\"><a href=\"/hql.jsp\">HQL</a>, <a href=\"/logs/\">Local logs</a>, <a href=\"/stacks\">Thread Dump</a></p>\n<hr id=\"head_rule\" />\n\n<h2>Master Attributes</h2>\n<table>\n<tr><th>Attribute Name</th><th>Value</th></tr>\n<tr><td>Filesystem</td><td>");
      out.print( conf.get("fs.default.name") );
      out.write("</td></tr>\n<tr><td>Hbase Root Directory</td><td>");
      out.print( master.getRootDir().toString() );
      out.write("</td></tr>\n</table>\n\n<h2>Online META Regions</h2>\n");
if (rootLocation != null) {
      out.write("\n<table>\n<tr><th>Name</th><th>Server</th></tr>\n<tr><td>");
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.