Package org.kiji.schema

Examples of org.kiji.schema.KijiDataRequest


    final KijiTable table = kiji.openTable("row_data_test_table");
    try {
      final KijiTableReader reader = table.openTableReader();
      try {
        final KijiDataRequest dataRequest = KijiDataRequest.builder()
            .addColumns(ColumnsDef.create()
                .withPageSize(1)
                .addFamily("map"))
            .build();
        final KijiRowScanner scanner = reader.getScanner(dataRequest);
View Full Code Here


        writer.close();
      }

      final KijiTableReader reader = table.openTableReader();
      try {
        final KijiDataRequest dataRequest = KijiDataRequest.builder()
            .addColumns(ColumnsDef.create().withMaxVersions(100).add("family", "column"))
            .build();

        // Try this as a get.
        final KijiRowData rowData = reader.get(table.getEntityId("row1"), dataRequest);
View Full Code Here

    CLIENT_TEST_DELEGATE.tearDownKijiTest();
  }

  @Test
  public void testBasicPut() throws Exception {
    final KijiDataRequest request = KijiDataRequest.create(INFO, NAME);

    mWriter.put(mEntityId, INFO, NAME, MR_BONKERS);
    assertEquals(
        MR_BONKERS,
        mReader.get(mEntityId, request).getMostRecentValue(INFO, NAME).toString()
View Full Code Here

    );
  }

  @Test
  public void testBasicPutWithTimestamp() throws Exception {
    final KijiDataRequest request = KijiDataRequest.builder().addColumns(
        KijiDataRequestBuilder.ColumnsDef.create().withMaxVersions(100).add(INFO, NAME)).build();

    mWriter.put(mEntityId, INFO, NAME, 5L, MR_BONKERS);
    assertEquals(MR_BONKERS, mReader.get(mEntityId, request).getValue(INFO, NAME, 5L).toString());
View Full Code Here

            ToolUtils.getMapTypeFamilies(argURI.getColumns(), tableLayout);

        final Map<FamilyLayout, List<ColumnLayout>> groupTypeColumns =
            ToolUtils.getGroupTypeColumns(argURI.getColumns(), tableLayout);

        final KijiDataRequest request = ToolUtils.getDataRequest(
            mapTypeFamilies, groupTypeColumns, mMaxVersions, mMinTimestamp, mMaxTimestamp);

        final KijiTableReader reader = table.openTableReader();
        try {
          // Scan from startRow to limitRow.
View Full Code Here

    }

    final int maxVersions = Math.min(mTotalVersions - mVersionsCount, pageSize);

    // Clone the column data request template, but adjust the max-timestamp and the max-versions:
    final KijiDataRequest nextPageDataRequest = KijiDataRequest.builder()
        .withTimeRange(mDataRequest.getMinTimestamp(), mPageMaxTimestamp)
        .addColumns(ColumnsDef.create()
            .withFilter(mColumnRequest.getFilter())
            .withMaxVersions(maxVersions)
            .add(mColumnName))
View Full Code Here

  /** {@inheritDoc} */
  @Override
  @SuppressWarnings("unchecked")
  public <U extends T> HBaseMaterializedKijiResult<U> narrowView(final KijiColumnName column) {
    final KijiDataRequest narrowRequest = DefaultKijiResult.narrowRequest(column, mDataRequest);
    if (narrowRequest.equals(mDataRequest)) {
      return (HBaseMaterializedKijiResult<U>) this;
    }

    final ImmutableSortedMap.Builder<KijiColumnName, List<KeyValue>> narrowedResults =
        ImmutableSortedMap.naturalOrder();

    for (Column columnRequest : narrowRequest.getColumns()) {
      final KijiColumnName requestColumnName = columnRequest.getColumnName();

      // We get here IF

      // `column` is a family, and `mDataRequest` contains a column request for the entire family.
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.