Package org.kiji.schema.util

Examples of org.kiji.schema.util.InstanceBuilder


        cells.put(cellEntry.getKey(), cellEntry.getValue());
      }
    }

    final TableBuilder tableBuilder =
        new InstanceBuilder(getKiji())
            .withTable(KijiTableLayouts.getLayout("org/kiji/schema/layout/all-types-schema.json"));

    final RowBuilder rowBuilder = tableBuilder.withRow(ROW);

    for (Entry<String, NavigableMap<String, NavigableMap<Long, Object>>> familyEntry
View Full Code Here


  private HBaseKijiTable mTable = null;
  private KijiTableAnnotator mAnnotator = null;

  @Before
  public void setup() throws IOException {
    new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(KijiTableLayouts.USER_TABLE))
        .build();
    mTable = HBaseKijiTable.downcast(getKiji().openTable("user"));
    mAnnotator = mTable.openTableAnnotator();
  }
View Full Code Here

    // Get the test table layouts.
    final KijiTableLayout layout = KijiTableLayout.newLayout(
        KijiTableLayouts.getLayout(KijiTableLayouts.COUNTER_TEST));

    // Populate the environment.
    mKiji = new InstanceBuilder(getKiji())
        .withTable("user", layout)
            .withRow("foo")
                .withFamily("info")
                    .withQualifier("name").withValue(1L, "foo-val")
                    .withQualifier("visits").withValue(1L, 42L)
View Full Code Here

   *
   * No paging involved in this test.
   */
  @Test
  public void testMaxVersionsEqualsOne() throws Exception {
    final Kiji kiji = new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(KijiTableLayouts.ROW_DATA_TEST))
            .withRow("row0")
                .withFamily("family")
                    .withQualifier("qual0")
                        .withValue(1L, "value-1")
View Full Code Here

  /**
   * Tests that requesting an entire group-type family properly expands to all declared columns.
   */
  @Test
  public void testExpandGroupTypeFamily() throws Exception {
    final Kiji kiji = new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(KijiTableLayouts.ROW_DATA_TEST))
            .withRow("row0")
                .withFamily("family")
                    .withQualifier("qual0")
                        .withValue(1L, "value")
View Full Code Here

   * Here we test that enabling paging on a column X:Y doesn't affect cells from other columns,
   * ie. we can still read the cells from non-paged columns.
   */
  @Test
  public void testScanPartiallyPaged() throws Exception {
    final Kiji kiji = new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(KijiTableLayouts.ROW_DATA_TEST))
            .withRow("row0")
                .withFamily("family")
                    .withQualifier("qual0")
                        .withValue(1L, "value1")
View Full Code Here

   * Here we test that paging on a column X:Y will not short-circuit the KeyValue scanner
   * and still return the requested KeyValues in columns > X:Y.
   */
  @Test
  public void testScanPartiallyPagedWithFirstKeyOnlyFilter() throws Exception {
    final Kiji kiji = new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(KijiTableLayouts.ROW_DATA_TEST))
            .withRow("row0")
                .withFamily("family")
                    .withQualifier("qual0")
                        .withValue(1L, "value1")
View Full Code Here

   * Scanning through rows with paging enabled returns rows where the only cells are visible
   * through paging (ie. the Result returned by the scanner would theoretically be empty).
   */
  @Test
  public void testScanCompletelyPaged() throws Exception {
    final Kiji kiji = new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(KijiTableLayouts.ROW_DATA_TEST))
            .withRow("row0")
                .withFamily("family")
                    .withQualifier("qual0")
                        .withValue("value0")
View Full Code Here

   * Scanning through rows with paging enabled returns rows where the only cells are visible
   * through paging (ie. the Result returned by the scanner would theoretically be empty).
   */
  @Test
  public void testScanCompletelyPagedMapFamily() throws Exception {
    final Kiji kiji = new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(KijiTableLayouts.ROW_DATA_TEST))
            .withRow("row0")
                .withFamily("map")
                    .withQualifier("qual")
                        .withValue(314)
View Full Code Here

  private HBaseKijiTable mTable;
  private HBaseKijiTableReader mReader;

  @Before
  public void setupTestHBaseKijiResultScanner() throws IOException {
    new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(LAYOUT_PATH))
            .withRow(1)
                .withFamily("primitive")
                    .withQualifier("string_column")
                        .withValue(10, "ten")
View Full Code Here

TOP

Related Classes of org.kiji.schema.util.InstanceBuilder

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.