Package org.kiji.schema.util

Examples of org.kiji.schema.util.InstanceBuilder


  @Test
  public void testMultipleArguments() 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


    }
  }

  @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 LsTool(), table.getURI().toString()));
View Full Code Here

  public void testGetFromTable() throws Exception {
    final Kiji kiji = getKiji();
    final KijiTableLayout layout = KijiTableLayouts.getTableLayout(KijiTableLayouts.SIMPLE);
    kiji.createTable(layout.getName(), layout);

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

  @Test
  public void testGetFromTableMore() throws Exception {
    final Kiji kiji = getKiji();
    final KijiTableLayout layout = KijiTableLayouts.getTableLayout(KijiTableLayouts.FOO_TEST);
    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 testGetFormattedRKF() 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

    // 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")
        .withRow("bar")
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

  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

  }

  // Tests for KijiRowData.getReaderSchema() with layout-1.3 tables.
  @Test
  public void testGetReaderSchemaLayout13() throws Exception {
    final Kiji kiji = new InstanceBuilder(mKiji)
        .withTable(KijiTableLayouts.getLayout(TEST_LAYOUT_V1_3))
        .build();
    final KijiTable table = kiji.openTable("table");
    try {
      final KijiTableReader reader = table.getReaderFactory().openTableReader();
View Full Code Here

  public void testReadDeletedColumns() throws Exception {
    // Create a separate Kiji here to avoid stepping on the one used elsewhere.
    mKiji.createTable(KijiTableLayouts.getLayout(TEST_LAYOUT_V1));
    KijiTable table = mKiji.openTable(TABLE_NAME);
    try {
      new InstanceBuilder(mKiji)
          .withTable(table)
          .withRow("row1")
          .withFamily("family")
          .withQualifier("qual0").withValue(1L, "string1")
          .withQualifier("qual0").withValue(2L, "string2")
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.