Package org.apache.hadoop.hbase.client

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


    get = new Get(Bytes.toBytes("anotherrow"));
    r = table.get(get);
    assertNull(
      "Got an unexpected number of rows - no data should be returned with the NoDataFromScan coprocessor Found: "
          + r, r.list());

    table.close();
    UTIL.shutdownMiniCluster();
  }
View Full Code Here


      LOG.info("scan column range: " + s.toString());
      long timeBeforeScan = System.currentTimeMillis();

      Result result;
      while ((result = scanner.next()) != null) {
        for (KeyValue kv : result.list()) {
          results.add(kv);
        }
      }
      long scanTime = System.currentTimeMillis() - timeBeforeScan;
      scanner.close();
View Full Code Here

        Get get = new Get(rows[i]);
        get.addFamily(HConstants.CATALOG_FAMILY);
        get.setTimeStamp(timestamp[j]);
        Result result = table.get(get);
        int cellCount = 0;
        for(@SuppressWarnings("unused")KeyValue kv : result.list()) {
          cellCount++;
        }
        assertTrue(cellCount == 1);
      }
      table.close();
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

    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

        Get get = new Get(rows[i]);
        get.addFamily(HConstants.CATALOG_FAMILY);
        get.setTimeStamp(timestamp[j]);
        Result result = table.get(get);
        int cellCount = 0;
        for(@SuppressWarnings("unused")KeyValue kv : result.list()) {
          cellCount++;
        }
        assertTrue(cellCount == 1);
      }
      table.close();
View Full Code Here

    Get get = new Get(ROW);
    Result r = region.get(get);
    assertNull(
      "Got an unexpected number of rows - no data should be returned with the NoDataFromScan coprocessor. Found: "
          + r, r.list());
  }

  @Test
  public void testRegionObserverFlushTimeStacking() throws Exception {
    byte[] ROW = Bytes.toBytes("testRow");
View Full Code Here

    region.flushcache();
    Get get = new Get(ROW);
    Result r = region.get(get);
    assertNull(
      "Got an unexpected number of rows - no data should be returned with the NoDataFromScan coprocessor. Found: "
          + r, r.list());
  }

  /**
   * Unfortunately, the easiest way to test this is to spin up a mini-cluster since we want to do
   * the usual compaction mechanism on the region, rather than going through the backdoor to the
View Full Code Here

    // check both rows to ensure that they aren't there
    Get get = new Get(ROW);
    Result r = table.get(get);
    assertNull(
      "Got an unexpected number of rows - no data should be returned with the NoDataFromScan coprocessor. Found: "
          + r, r.list());

    get = new Get(Bytes.toBytes("anotherrow"));
    r = table.get(get);
    assertNull(
      "Got an unexpected number of rows - no data should be returned with the NoDataFromScan coprocessor Found: "
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.