Package org.kiji.schema

Examples of org.kiji.schema.KijiDataRequest


   @Test
  public void testDeleteColumn() throws Exception {
    mWriter.put(mEntityId, "family", "column", 0L, "Value at timestamp 0.");
    mWriter.put(mEntityId, "family", "column", 1L, "Value at timestamp 1.");

    final KijiDataRequest dataRequest = KijiDataRequest.builder()
        .addColumns(ColumnsDef.create().withMaxVersions(100).add("family", "column"))
        .build();

    // Try this as a get.
    KijiRowData rowData = mReader.get(mEntityId, dataRequest);
View Full Code Here


        writer.put(david, pets, bird, 0L, "Da Bird");
      } finally {
        writer.close();
      }

      final KijiDataRequest dataRequest = KijiDataRequest.builder()
          .addColumns(
              ColumnsDef
                  .create()
                  .withMaxVersions(100)
                  .add(pets, cat)
View Full Code Here

        writer.put(david, pets, bird, 0L, "Da Bird");
      } finally {
        writer.close();
      }

      final KijiDataRequest dataRequest = KijiDataRequest.builder()
          .addColumns(
              ColumnsDef
                  .create()
                  .withMaxVersions(100)
                  .add(pets, cat)
View Full Code Here

  }

  // Attempt to read a value that is not there.  Should return null, not throw an exception!
  @Test
  public void testReadMissingValue() throws Exception {
    final KijiDataRequest dataRequest = KijiDataRequest.builder()
        .addColumns(ColumnsDef.create().withMaxVersions(100).add("family", "column"))
        .build();

    KijiRowData rowData = mReader.get(mEntityId, dataRequest);
    assertNull(rowData.getValue("family", "column", 0L));
View Full Code Here

  @Test
  public void testDeleteFamily() throws Exception {
    mWriter.put(mEntityId, "family", "column", 0L, "Value at timestamp 0.");
    mWriter.put(mEntityId, "family", "column", 1L, "Value at timestamp 1.");

    final KijiDataRequest dataRequest = KijiDataRequest.builder()
        .addColumns(ColumnsDef.create().withMaxVersions(100).add("family", "column"))
        .build();

    // Try this as a get.
    KijiRowData rowData = mReader.get(mEntityId, dataRequest);
View Full Code Here

  @Test
  public void testDeleteRow() throws Exception {
    mWriter.put(mEntityId, "family", "column", 0L, "Value at timestamp 0.");
    mWriter.put(mEntityId, "family", "column", 1L, "Value at timestamp 1.");

    final KijiDataRequest dataRequest = KijiDataRequest.builder()
        .addColumns(ColumnsDef.create().withMaxVersions(100).add("family", "column"))
        .build();

    // Try this as a get.
    KijiRowData rowData = mReader.get(mEntityId, dataRequest);
View Full Code Here

      EntityId eid = mTable.getEntityId("row#" + rowNum);
      mWriter.put(eid, "family", "column", "This is row " + rowNum + ".");
      entityIds.add(eid);
    }

    KijiDataRequest request = KijiDataRequest.create("family", "column");

    List<KijiRowData> dataList = mReader.bulkGet(entityIds, request);

    assertEquals(numRows, dataList.size());
View Full Code Here

  @Test
  public void testHConstantsLatestTimestamp() throws Exception {
    mWriter.put(mEntityId, "family", "column", HConstants.LATEST_TIMESTAMP, "latest");
    //mWriter.put(mEntityId, "family", "column", "latest");

    final KijiDataRequest dataRequest = KijiDataRequest.create("family", "column");

    // Sanity check that the write succeeded.
    KijiRowData rowData = mReader.get(mEntityId, dataRequest);
    KijiCell cell = rowData.getMostRecentCell("family", "column");
    assertNotNull(cell);
View Full Code Here

        writer.put(david, family, column, 0L, bird);
      } finally {
        writer.close();
      }

      final KijiDataRequest dataRequest = KijiDataRequest.create(family, column);
      final CassandraKijiTableReader reader = table.openTableReader();

      try {
        // Fire up a row scanner!
        final KijiRowScanner scanner = reader.getScanner(dataRequest);
View Full Code Here

  /** {@inheritDoc} */
  @Override
  @SuppressWarnings("unchecked")
  public <U extends T> KijiResult<U> narrowView(final KijiColumnName column) {
    final KijiDataRequest narrowRequest = DefaultKijiResult.narrowRequest(column, mDataRequest);
    if (mDataRequest.equals(narrowRequest)) {
      return (KijiResult<U>) this;
    } else {
      return new EmptyKijiResult<U>(mEntityId, narrowRequest);
    }
View Full Code Here

TOP

Related Classes of org.kiji.schema.KijiDataRequest

Copyright © 2018 www.massapicom. 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.