Package org.apache.hadoop.hbase.client

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


      if (filter != null) {
        get.setFilter(filter);
      }
      Result result = table.get(get);
      if (result != null && !result.isEmpty()) {
        valuesI = result.list().iterator();
      }
    } catch (DoNotRetryIOException e) {
      // Warn here because Stargate will return 404 in the case if multiple
      // column families were specified but one did not exist -- currently
      // HBase will fail the whole Get.
View Full Code Here


          throw new IllegalArgumentException(e);
        } catch (IOException e) {
          LOG.error(StringUtils.stringifyException(e));
        }
        if (result != null && !result.isEmpty()) {
          rowI = result.list().iterator();
          loop = true;
        }
      }
    } while (loop);
    return null;
View Full Code Here

      Result results = scanner.next();
      if (results == null) {
        return false;
      }
      values.clear();
      values.addAll(results.list());
      return true;
    }

    public void close() throws IOException {
      scanner.close();
View Full Code Here

        // increment number of columns read
        numCols.addAndGet(result.getFamilyMap(columnFamily).size());

        if (verify) {
          // verify the result
          List<KeyValue> keyValues = result.list();
          for (KeyValue kv : keyValues) {
            String qual = new String(kv.getQualifier());

            // if something does not look right report it
            if (!LoadTestKVGenerator.verify(rowKey, qual, kv.getValue())) {
View Full Code Here

      if (filter != null) {
        get.setFilter(filter);
      }
      Result result = table.get(get);
      if (result != null && !result.isEmpty()) {
        valuesI = result.list().iterator();
      }
    } catch (NoSuchColumnFamilyException e) {
      // Warn here because Stargate will return 404 in the case if multiple
      // column families were specified but one did not exist -- currently
      // HBase will fail the whole Get.
View Full Code Here

      Result results = scanner.next();
      if (results == null) {
        return false;
      }
      values.clear();
      values.addAll(results.list());
      return true;
    }

    public void close() throws IOException {
      scanner.close();
View Full Code Here

  }

  public static void getColumnNamesHelper(Set<String>columnNames, Iterator<Result> it) {
    Result result = it.next();
    if(result!=null) {
      List<KeyValue> kvList = result.list();
      for(KeyValue kv : kvList) {
        columnNames.add(new String(kv.getQualifier()));
      }
    }
  }
View Full Code Here

    // Series display in y axis
    int y = 0;
    HashMap<String, Integer> keyMap = new HashMap<String, Integer>();
      while(it.hasNext()) {
      Result result = it.next();
      List<KeyValue> kvList = result.list();
        for(KeyValue kv : kvList) {
      String key = parseRowKey(result.getRow());
      StringBuilder tmp = new StringBuilder();
      tmp.append(key);
      tmp.append(":");
View Full Code Here

            while (filteredResult.isEmpty()) {
                Result result = super.next();
                if (result == null) {
                    return null;
                }
                filteredResult = filter(state, result.list(), maxVersions);
            }
            return new Result(filteredResult);
        }

        // In principle no need to override, copied from super.next(int) to make sure it works even if super.next(int)
View Full Code Here

      HTable t = new HTable(hbaseConf, table);
      if (LOG.isTraceEnabled()) {
         ResultScanner rs = t.getScanner(new Scan());
         Result r = rs.next();
         while (r != null) {
            for (KeyValue kv : r.list()) {
               LOG.trace("KV: " + kv.getKeyString().toString() + " value:" + Bytes.toString(kv.getValue()));
            }
            r = rs.next();
         }
      }
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.