Package org.kiji.schema.util

Examples of org.kiji.schema.util.InstanceBuilder$RowBuilder


  private CassandraKijiTable mTable = null;
  private KijiTableAnnotator mAnnotator = null;

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


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

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

    final RowBuilder rowBuilder = tableBuilder.withRow(ROW);
View Full Code Here

  private KijiTable mTable;
  private EntityId mEID;

  @Before
  public void setup() throws IOException {
    new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(KijiTableLayouts.USER_TABLE))
            .withRow("foo")
                .withFamily("info")
                    .withQualifier("name")
                        .withValue(1, FOO_NAME)
View Full Code Here

    }
  }

  @Test
  public void testColumnReaderSpecOptions() throws Exception {
    new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(KijiTableLayouts.READER_SCHEMA_TEST))
            .withRow("row")
                .withFamily("family")
                    .withQualifier("empty")
                        .withValue(5, EmptyRecord.newBuilder().build())
View Full Code Here

      // Table is empty:
      assertEquals(BaseTool.SUCCESS, runTool(new ScanTool(), table.getURI().toString()));
      assertEquals(1, mToolOutputLines.length);
      assertTrue(mToolOutputLines[0].startsWith("Scanning kiji table: "));

      new InstanceBuilder(kiji)
          .withTable(table)
              .withRow("hashed")
                  .withFamily("family").withQualifier("column").withValue(314L, "value")
          .build();
View Full Code Here

  @Test
  public void testFormattedRowKey() throws Exception {
    final Kiji kiji = getKiji();
    final KijiTableLayout layout = KijiTableLayouts.getTableLayout(KijiTableLayouts.FORMATTED_RKF);
    new InstanceBuilder(kiji)
        .withTable(layout.getName(), layout)
            .withRow("dummy", "str1", "str2", 1, 2L)
                .withFamily("family").withQualifier("column")
                    .withValue(1L, "string-value")
                    .withValue(2L, "string-value2")
View Full Code Here

    TableLayoutDesc desc = KijiTableLayouts.getLayout(KijiTableLayouts.FOO_TEST);
    ((RowKeyFormat2)desc.getKeysFormat()).setEncoding(RowKeyEncoding.RAW);

    final KijiTableLayout layout =  KijiTableLayout.newLayout(desc);
    final long timestamp = 10L;
    new InstanceBuilder(kiji)
        .withTable(layout.getName(), layout)
            .withRow("gwu@usermail.example.com")
                .withFamily("info")
                    .withQualifier("email").withValue(timestamp, "gwu@usermail.example.com")
                    .withQualifier("name").withValue(timestamp, "Garrett Wu")
View Full Code Here

  @Test
  public void testRangeScanFormattedRKF() throws Exception {
    final Kiji kiji = getKiji();
    final KijiTableLayout layout = KijiTableLayouts.getTableLayout(KijiTableLayouts.FORMATTED_RKF);
    new InstanceBuilder(kiji)
        .withTable(layout.getName(), layout)
            .withRow("NYC", "Technology", "widget", 1, 2)
                .withFamily("family").withQualifier("column")
                    .withValue("Candaules")
            .withRow("NYC", "Technology", "widget", 1, 20)
View Full Code Here

    }
  }

  @Test
  public void testTableNoFamilies() throws Exception {
    final Kiji kiji = new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(KijiTableLayouts.NOFAMILY))
        .build();
    final KijiTable table = kiji.openTable("nofamily");
    try {
      assertEquals(BaseTool.SUCCESS, runTool(new ScanTool(), table.getURI().toString()));
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

TOP

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

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.