Examples of modifyTableLayout()


Examples of org.kiji.schema.Kiji.modifyTableLayout()

      final TableLayoutDesc updateWithReader =
          new TableLayoutBuilder(table.getLayout().getDesc(), kiji)
              .withReader(KijiColumnName.create("info""gender"), readerEnum)
              .build();
      LOG.debug("Applying update with enum reader: %s", updateWithReader);
      kiji.modifyTableLayout(updateWithReader);

      final TableLayoutDesc updateWithWriter=
          new TableLayoutBuilder(table.getLayout().getDesc(), kiji)
              .withWriter(KijiColumnName.create("info""gender"), writerEnum)
              .build();
View Full Code Here

Examples of org.kiji.schema.Kiji.modifyTableLayout()

          new TableLayoutBuilder(table.getLayout().getDesc(), kiji)
              .withWriter(KijiColumnName.create("info""gender"), writerEnum)
              .build();
      LOG.debug("Applying update with enum writer: %s", updateWithWriter);
      try {
        kiji.modifyTableLayout(updateWithWriter);
        Assert.fail();
      } catch (InvalidLayoutSchemaException ilse) {
        LOG.debug("Expected error: {}", ilse.getMessage());
        Assert.assertTrue(
            ilse.getMessage(),
View Full Code Here

Examples of org.kiji.schema.Kiji.modifyTableLayout()

    final TableLayoutDesc newDesc = new TableLayoutBuilder(originalDesc, kiji)
        .withWriter(KijiColumnName.create("info:fullname"), optIntRecordSchema)
        .build();

    kiji.modifyTableLayout(newDesc);
  }

  @Test
  public void testStrictValidation() throws IOException {
    final Kiji kiji = getKiji();
View Full Code Here

Examples of org.kiji.schema.Kiji.modifyTableLayout()

    final Kiji kiji = getKiji();

    // Strict validation should fail.
    final TableLayoutDesc strictDesc = prepareNewDesc(kiji, AvroValidationPolicy.STRICT);
    try {
      kiji.modifyTableLayout(strictDesc);
      fail("Should have thrown an InvalidLayoutSchemaException because int and string are "
          + "incompatible.");
    } catch (InvalidLayoutSchemaException ilse) {
      assertTrue(ilse.getReasons().contains(
          "In column: 'info:fullname' Reader schema: \"string\" is incompatible with "
View Full Code Here

Examples of org.kiji.schema.Kiji.modifyTableLayout()

    final Kiji kiji = getKiji();

    // Developer validation should fail.
    final TableLayoutDesc developerDesc = prepareNewDesc(kiji, AvroValidationPolicy.DEVELOPER);
    try {
      kiji.modifyTableLayout(developerDesc);
      fail("Should have thrown an InvalidLayoutSchemaException because int and string are "
          + "incompatible.");
    } catch (InvalidLayoutSchemaException ilse) {
      assertTrue(ilse.getReasons().contains(
          "In column: 'info:fullname' Reader schema: \"string\" is incompatible with "
View Full Code Here

Examples of org.kiji.schema.Kiji.modifyTableLayout()

  public void testNoneValidation() throws IOException {
    final Kiji kiji = getKiji();

    // None validation should pass despite the incompatible change.
    final TableLayoutDesc noneDesc = prepareNewDesc(kiji, AvroValidationPolicy.NONE);
    kiji.modifyTableLayout(noneDesc);
  }

  @Test
  public void testSchema10Validation() throws IOException {
    final Kiji kiji = getKiji();
View Full Code Here

Examples of org.kiji.schema.Kiji.modifyTableLayout()

  public void testSchema10Validation() throws IOException {
    final Kiji kiji = getKiji();

    // Schema-1.0 validation should pass despite incompatible changes.
    final TableLayoutDesc schema10Desc = prepareNewDesc(kiji, AvroValidationPolicy.SCHEMA_1_0);
    kiji.modifyTableLayout(schema10Desc);
  }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.