Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.Result.list()


            theGet.setMaxVersions(versions);

            Result resultAll = this.htable.get(theGet);
           
            if( resultAll != null && (! resultAll.isEmpty())) {
              List<KeyValue> keyValeList = resultAll.list();

              keyValueMap = new HashMap<Long, List<KeyValue>>();
             
              LOG.debug(String.format("+ Key (%s) Versions (%s) Val;ute map <%s>", Bytes.toString(nextKey), versions, keyValueMap));
View Full Code Here


          Field.Store.YES, Field.Index.NOT_ANALYZED);
        keyField.setOmitNorms(true);
        doc.add(keyField);
      }
      // each column (name-value pair) is a field (name-value pair)
      for (KeyValue kv: r.list()) {
        // name is already UTF-8 encoded
        String column = Bytes.toString(kv.getQualifier());
        byte[] columnValue = kv.getValue();
        Field.Store store = indexConf.isStore(column)?
          Field.Store.YES: Field.Store.NO;
View Full Code Here

            scan.addFamily(HRecipientRewriteTable.COLUMN_FAMILY_NAME);
            scan.setCaching(table.getScannerCaching() * 2);
            resultScanner = table.getScanner(scan);
            Result result;
            while ((result = resultScanner.next()) != null) {
                List<KeyValue> keyValues = result.list();
                if (keyValues != null) {
                    for (KeyValue keyValue : keyValues) {
                        String email = Bytes.toString(keyValue.getRow());
                        if (map == null) {
                            map = new HashMap<String, Collection<String>>();
View Full Code Here

    get = new Get(ROW_2);
    get.addFamily(COLUMN_1);
    get.setMaxVersions(2);
    result = remoteTable.get(get);
    int count = 0;
    for (KeyValue kv: result.list()) {
      if (Bytes.equals(COLUMN_1, kv.getFamily()) && TS_1 == kv.getTimestamp()) {
        assertTrue(Bytes.equals(VALUE_1, kv.getValue())); // @TS_1
        count++;
      }
      if (Bytes.equals(COLUMN_1, kv.getFamily()) && TS_2 == kv.getTimestamp()) {
View Full Code Here

                {
                    g.setFilter(filter);
                }
                Result result = hTable.get(g);

                if (result != null && result.list() != null)
                {
                    HBaseData data = null;
                    for (KeyValue value : result.list())
                    {
                        data = new HBaseData(columnFamily != null ? columnFamily : new String(value.getFamily()),
View Full Code Here

                Result result = hTable.get(g);

                if (result != null && result.list() != null)
                {
                    HBaseData data = null;
                    for (KeyValue value : result.list())
                    {
                        data = new HBaseData(columnFamily != null ? columnFamily : new String(value.getFamily()),
                                value.getRow());
                        break;
                    }
View Full Code Here

                        break;
                    }

                    if (data != null)
                    {
                        data.setColumns(result.list());
                        results.add(data);
                    }

                }
                return results;
View Full Code Here

     */
    public HBaseData next()
    {
        HBaseData data = null;
        Result result = resultsIter.next();
        List<KeyValue> values = result.list();
        for (KeyValue value : values)
        {
            data = new HBaseData(new String(value.getFamily()), value.getRow());
            break;
        }
View Full Code Here

            List<Subscription> subscriptionList = new ArrayList<Subscription>();
            Get get = new Get(Bytes.toBytes(user));
            get.addFamily(SUBSCRIPTION_CF);
            Result result = subscriptions.get(get);
            if (!result.isEmpty()) {
                List<KeyValue> columns = result.list();
                for (KeyValue key : columns) {
                    subscriptionList.add(new SimpleSubscription(user, Bytes.toString(key.getQualifier())));
                }
            }
            return subscriptionList;
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.