Package org.kiji.schema.util

Examples of org.kiji.schema.util.InstanceBuilder


  // -----------------------------------------------------------------------------------------------

  @Before
  public final void setupTestDeleteTool() throws Exception {
    mLayout = KijiTableLayouts.getTableLayout(KijiTableLayouts.SIMPLE);
    new InstanceBuilder(getKiji())
        .withTable(mLayout.getName(), mLayout)
            .withRow("row-1")
                .withFamily("family").withQualifier("column")
                    .withValue(313L, "value1")
                    .withValue(314L, "value2")
View Full Code Here


  @Before
  public void setupInstance() throws Exception {
   final KijiTableLayout layout =
      KijiTableLayout.newLayout(KijiTableLayouts.getLayout(
          KijiTableLayouts.TWO_COLUMN_DIFFERENT_TYPES));
   new InstanceBuilder(getKiji())
        .withTable("table", layout)
            .withRow("row1")
               .withFamily("family")
                  .withQualifier("column1")
                    .withValue(1L, "I am a String")
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

/** Tests the StripValueRowFilter. */
public class TestCellByteSizeAsValueFilter extends KijiClientTest {
  /** Tests that the CellByteSizeAsValueFilter replaces the value by its size, in bytes. */
  @Test
  public void testCellByteSizeAsValueFilter() throws Exception {
    final Kiji kiji = new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(KijiTableLayouts.SIMPLE))
            .withRow("row")
                .withFamily("family")
                    .withQualifier("column")
                        .withValue("0123456789")
View Full Code Here

  private static final KijiColumnName EMPTY = KijiColumnName.create("family", "empty");

  @Before
  public void setup() throws IOException {
    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

    // 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

   * Validate the behavior of the FirstKeyOnly column filter: in particular, applying
   * this filter to one column should not affect other columns.
   */
  @Test
  public void testFirstKeyOnlyColumnFilter() throws Exception {
    final Kiji kiji = new InstanceBuilder(getKiji())
        .withTable(KijiTableLayouts.getLayout(KijiTableLayouts.FULL_FEATURED))
            .withRow("row")
                .withFamily("info")
                    .withQualifier("name")
                        .withValue(1L, "name1")
View Full Code Here

    final Kiji kiji = Kiji.Factory.open(kijiURI, getConf());
    try {
      final KijiTableLayout layout = KijiTableLayouts.getTableLayout(KijiTableLayouts.FOO_TEST);
      final long timestamp = System.currentTimeMillis();

      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 testTableExists() throws IOException {
    final TableLayoutDesc layoutDesc = KijiTableLayouts.getLayout(KijiTableLayouts.SIMPLE);
    final String tableName = layoutDesc.getName();
    final Kiji kiji = new InstanceBuilder(getKiji())
        .withTable(layoutDesc)
        .build();
    assertTrue(kiji.getMetaTable().tableExists(tableName));
    assertFalse(kiji.getMetaTable().tableExists("faketablename"));
  }
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

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.