Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.HTableFactory


  public HBaseDataModel(String zkConnect, String tableName) throws IOException {
    log.info("Using HBase table {}", tableName);
    Configuration conf = HBaseConfiguration.create();
    conf.set("hbase.zookeeper.quorum", zkConnect);
    HTableFactory tableFactory = new HTableFactory();
    this.pool = new HTablePool(conf, 8, tableFactory);
    this.tableName = tableName;

    bootstrap(conf);
    // Warm the cache
View Full Code Here


      final UserProvider userProvider) throws IOException {
    int cleanInterval = conf.getInt(CLEANUP_INTERVAL, 10 * 1000);
    int maxIdleTime = conf.getInt(MAX_IDLETIME, 10 * 60 * 1000);
    connectionCache = new ConnectionCache(
      conf, userProvider, cleanInterval, maxIdleTime);
    tableFactory = new HTableFactory() {
      @Override
      public HTableInterface createHTableInterface(Configuration config,
          byte[] tableName) {
        try {
          return connectionCache.getTable(Bytes.toString(tableName));
View Full Code Here

      final UserProvider userProvider) throws IOException {
    int cleanInterval = conf.getInt(CLEANUP_INTERVAL, 10 * 1000);
    int maxIdleTime = conf.getInt(MAX_IDLETIME, 10 * 60 * 1000);
    connectionCache = new ConnectionCache(
      conf, userProvider, cleanInterval, maxIdleTime);
    tableFactory = new HTableFactory() {
      @Override
      public HTableInterface createHTableInterface(Configuration config,
          byte[] tableName) {
        try {
          return connectionCache.getTable(Bytes.toString(tableName));
View Full Code Here

            final HaeinsaTableIfaceFactory tableFactory, PoolType poolType) {
        // Make a new configuration instance so I can safely cleanup when
        // done with the pool.
        this.config = config == null ? new Configuration() : config;
        this.maxSize = maxSize;
        this.tableFactory = tableFactory == null ? new DefaultHaeinsaTableIfaceFactory(new HTableFactory()) : tableFactory;
        if (poolType == null) {
            this.poolType = PoolType.Reusable;
        } else {
            switch (poolType) {
            case Reusable:
View Full Code Here

      final UserProvider userProvider) throws IOException {
    int cleanInterval = conf.getInt(CLEANUP_INTERVAL, 10 * 1000);
    int maxIdleTime = conf.getInt(MAX_IDLETIME, 10 * 60 * 1000);
    connectionCache = new ConnectionCache(
      conf, userProvider, cleanInterval, maxIdleTime);
    tableFactory = new HTableFactory() {
      @Override
      public HTableInterface createHTableInterface(Configuration config,
          byte[] tableName) {
        try {
          return connectionCache.getTable(Bytes.toString(tableName));
View Full Code Here

  public HBaseDataModel(String zkConnect, String tableName) throws IOException {
    log.info("Using HBase table {}", tableName);
    Configuration conf = HBaseConfiguration.create();
    conf.set("hbase.zookeeper.quorum", zkConnect);
    HTableFactory tableFactory = new HTableFactory();
    this.pool = new HTablePool(conf, 8, tableFactory);
    this.tableName = tableName;

    bootstrap(conf);
    // Warm the cache
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.client.HTableFactory

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.