Package org.kiji.schema

Examples of org.kiji.schema.KijiRowData.asIterable()


    final KijiDataRequest dataRequest = KijiDataRequest.builder()
        .addColumns(ColumnsDef.create().withMaxVersions(3).addFamily("map"))
        .build();

    final KijiRowData row1 = mReader.get(mEntityId, dataRequest);
    final List<KijiCell<Integer>> cells = Lists.newArrayList(row1.<Integer>asIterable(MAP));
    final int cellCount = cells.size();
    assertEquals("Wrong number of cells returned by asIterable.", 3, cellCount);
  }
}
View Full Code Here


      final KijiTable table,
      final HBaseKijiTableReader reader,
      final KijiDataRequest request
  ) throws IOException {
    final KijiRowData warmupRowData = reader.get(table.getEntityId("foo"), request);
    for (KijiCell<Integer> cell : warmupRowData.<Integer>asIterable("map")) {
      cell.getData();
    }
    final KijiResult<Object> warmupResult = reader.getResult(table.getEntityId("foo"), request);
    try {
      final KijiResult<Integer> columnResult =
View Full Code Here

      final KijiRowData testRowData = reader.get(table.getEntityId("foo"), request);
      testRowData.containsCell("family", "qualifier", 1);
      LOG.info("built row data in {} milliseconds",
          (double) (System.nanoTime() - rowDataStartTime) / 1000000);
      int seen = 0;
      for (KijiCell<Integer> cell : testRowData.<Integer>asIterable("map")) {
        Object v = cell.getData();
        seen++;
      }
      LOG.info("row data all map family time (saw {} cells) = {} milliseconds",
          seen, (double) (System.nanoTime() - rowDataStartTime) / 1000000);
View Full Code Here

  ) throws IOException {
    final KijiDataRequest pagedRequest = KijiDataRequest.builder().addColumns(
        ColumnsDef.create().withPageSize(10).withMaxVersions(10000).add("map", null)).build();
    {
      final KijiRowData warmupRowData = reader.get(eid, pagedRequest);
      for (KijiCell<Integer> cell : warmupRowData.<Integer>asIterable("map")) {
        cell.getData();
      }
      final KijiResult<Object> warmupResult = reader.getResult(eid, pagedRequest);
      try {
        for (KijiCell<Object> cell : warmupResult) {
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.