Examples of HBaseClient


Examples of com.impetus.client.hbase.HBaseClient

    @Test
    public void testIteratorWithOneFilter()
    {
        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();

        HBaseClient client = (HBaseClient) clients.get("hbaseTest");

        Filter filter = new PrefixFilter(Bytes.toBytes("100" + "_"));

        client.setFilter(new KeyOnlyFilter());
        client.addFilter("city_similarity", filter);

        String query2 = "select u from CitySimilarity u";
        com.impetus.kundera.query.Query queryObject = (com.impetus.kundera.query.Query) em
                .createQuery(query2);
View Full Code Here

Examples of com.impetus.client.hbase.HBaseClient

    @Test
    public void testIteratorWithTwoFilter()
    {
        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();

        HBaseClient client = (HBaseClient) clients.get("hbaseTest");

        Filter filter = new PrefixFilter(Bytes.toBytes("100" + "_"));

        client.addFilter("city_similarity", filter);
        client.addFilter("bookinfo", new KeyOnlyFilter());

        String query2 = "select u from CitySimilarity u";
        com.impetus.kundera.query.Query queryObject = (com.impetus.kundera.query.Query) em
                .createQuery(query2);
View Full Code Here

Examples of org.apache.hadoop.ipc.HBaseClient

      // connection pooling and leak sockets, or (b) use the same timeout for all
      // configurations.  Since the IPC is usually intended globally, not
      // per-job, we choose (a).
      Client client = clients.get(factory);
      if (client == null) {
        client = new HBaseClient(ObjectWritable.class, conf, factory);
        clients.put(factory, client);
      } else {
        ((HBaseClient)client).incCount();
      }
      return client;
View Full Code Here

Examples of org.apache.hadoop.ipc.HBaseClient

      // connection pooling and leak sockets, or (b) use the same timeout for all
      // configurations.  Since the IPC is usually intended globally, not
      // per-job, we choose (a).
      Client client = clients.get(factory);
      if (client == null) {
        client = new HBaseClient(ObjectWritable.class, conf, factory);
        clients.put(factory, client);
      } else {
        ((HBaseClient)client).incCount();
      }
      return client;
View Full Code Here

Examples of org.apache.storm.hbase.common.HBaseClient

            for (String key : conf.keySet()) {
                hbConfig.set(key, String.valueOf(map.get(key)));
            }
        }

        this.hBaseClient = new HBaseClient(conf, hbConfig, options.tableName);
    }
View Full Code Here

Examples of org.apache.storm.hbase.common.HBaseClient

        }
        for(String key : conf.keySet()) {
            hbConfig.set(key, String.valueOf(conf.get(key)));
        }

        this.hBaseClient = new HBaseClient(conf, hbConfig, tableName);
    }
View Full Code Here

Examples of org.hbase.async.HBaseClient

    sinkCounter.start();
    sinkCounter.incrementConnectionCreatedCount();
    String zkQuorum = conf.get(HConstants.ZOOKEEPER_QUORUM);
    String zkBaseDir = conf.get(HConstants.ZOOKEEPER_ZNODE_PARENT);
    if(zkBaseDir != null){
      client = new HBaseClient(zkQuorum, zkBaseDir);
    } else {
      client = new HBaseClient(zkQuorum);
    }
    final CountDownLatch latch = new CountDownLatch(1);
    final AtomicBoolean fail = new AtomicBoolean(false);
    client.ensureTableFamilyExists(
            tableName.getBytes(Charsets.UTF_8), columnFamily).addCallbacks(
View Full Code Here

Examples of org.hbase.async.HBaseClient

    sinkCounter.incrementConnectionCreatedCount();
      sinkCallbackPool = Executors.newCachedThreadPool(new ThreadFactoryBuilder()
        .setNameFormat(this.getName() + " HBase Call Pool").build());
    logger.info("Callback pool created");
    if(!isTimeoutTest) {
      client = new HBaseClient(zkQuorum, zkBaseDir, sinkCallbackPool);
    } else {
      client = new HBaseClient(zkQuorum, zkBaseDir,
        new NioClientSocketChannelFactory(Executors
          .newSingleThreadExecutor(),
          Executors.newSingleThreadExecutor()));
    }
    final CountDownLatch latch = new CountDownLatch(1);
View Full Code Here

Examples of org.hbase.async.HBaseClient

    Preconditions.checkArgument(client == null, "Please call stop " +
        "before calling start on an old instance.");
    String zkQuorum = conf.get(HConstants.ZOOKEEPER_QUORUM);
    String zkBaseDir = conf.get(HConstants.ZOOKEEPER_ZNODE_PARENT);
    if(zkBaseDir != null){
      client = new HBaseClient(zkQuorum, zkBaseDir);
    } else {
      client = new HBaseClient(zkQuorum);
    }
    CountDownLatch latch = new CountDownLatch(1);
    AtomicBoolean fail = new AtomicBoolean(false);
    client.ensureTableFamilyExists(
        tableName.getBytes(Charsets.UTF_8), columnFamily).addCallbacks(
View Full Code Here

Examples of org.hbase.async.HBaseClient

      sinkCallbackPool = Executors.newCachedThreadPool(new ThreadFactoryBuilder()
        .setNameFormat(this.getName() + " HBase Call Pool").build());
    } else {
      sinkCallbackPool = Executors.newSingleThreadExecutor();
    }
    client = new HBaseClient(zkQuorum, zkBaseDir, sinkCallbackPool);
    final CountDownLatch latch = new CountDownLatch(1);
    final AtomicBoolean fail = new AtomicBoolean(false);
    client.ensureTableFamilyExists(
            tableName.getBytes(Charsets.UTF_8), columnFamily).addCallbacks(
            new Callback<Object, Object>() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.