Package org.kiji.schema.avro

Examples of org.kiji.schema.avro.TableLayoutDesc


    }
  }

  @Test
  public void badRangeScanIndexRKF() throws InvalidLayoutException {
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(badRangeScanIndexRowKeyFormat())
        .setVersion(TABLE_LAYOUT_VERSION)
        .build();
    try {
View Full Code Here


    }
  }

  @Test
  public void badCompNameRKF() throws InvalidLayoutException {
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(badCompNameRowKeyFormat())
        .setVersion(TABLE_LAYOUT_VERSION)
        .build();
    try {
View Full Code Here

    }
  }

  @Test
  public void badHashSizeRKF() throws InvalidLayoutException {
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(badHashSizeRowKeyFormat())
        .setVersion(TABLE_LAYOUT_VERSION)
        .build();
    try {
View Full Code Here

  }

  @Test
  public void testNullSaltInRowKeyFormat2() throws InvalidLayoutException {
    // This should be replaced with a non-null salt element / HashSpec record.
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(makeDefaultSaltRowKeyFormat())
        .setVersion(TABLE_LAYOUT_VERSION)
        .build();

    final KijiTableLayout ktl = KijiTableLayout.newLayout(desc);
    final TableLayoutDesc descOut = ktl.getDesc();

    Object keysFormatRaw = descOut.getKeysFormat();
    assertNotNull("Unexpected null RowKeyFormat2 field", keysFormatRaw);
    assertTrue("keys_format should be an RKF2", keysFormatRaw instanceof RowKeyFormat2);

    RowKeyFormat2 rkf2 = (RowKeyFormat2) keysFormatRaw;
    HashSpec salt = rkf2.getSalt();
View Full Code Here

  }


  @Test
  public void repeatedNamesRKF() throws InvalidLayoutException {
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(repeatedNamesRowKeyFormat())
        .setVersion(TABLE_LAYOUT_VERSION)
        .build();
    try {
View Full Code Here

    }
  }

  @Test
  public void tooHighRangeScanIndexRKF() throws InvalidLayoutException {
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(tooHighRangeScanIndexRowKeyFormat())
        .setVersion(TABLE_LAYOUT_VERSION)
        .build();
    try {
View Full Code Here

    }
  }

  @Test
  public void zeroNullableIndexRKF() throws InvalidLayoutException {
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(zeroNullableIndexRowKeyFormat())
        .setVersion(TABLE_LAYOUT_VERSION)
        .build();
    try {
View Full Code Here

    }
  }

  @Test
  public void tooHighNullableScanIndexRKF() throws InvalidLayoutException {
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(tooHighNullableIndexRowKeyFormat())
        .setVersion(TABLE_LAYOUT_VERSION)
        .build();
    try {
View Full Code Here

    }
  }

  @Test
  public void emptyCompNameRKF() throws InvalidLayoutException {
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(emptyCompNameRowKeyFormat())
        .setVersion(TABLE_LAYOUT_VERSION)
        .build();
    try {
View Full Code Here

            /** {@inheritDoc} */
            @Override
            public TableLayoutDesc apply(final KijiTableLayout refLayout) {
              Preconditions.checkNotNull(refLayout);
              try {
                final TableLayoutDesc refDesc = refLayout.getDesc();
                return new TableLayoutBuilder(refDesc, kiji)
                    .withLayoutId(nextLayoutId(refDesc.getLayoutId()))
                    .withWriter(column, writerSchema)
                    .withWritten(column, writerSchema)
                    .build();
              } catch (InvalidLayoutException ile) {
                LOG.error("Internal error while updating table layout in DEVELOPER mode: {}", ile);
View Full Code Here

TOP

Related Classes of org.kiji.schema.avro.TableLayoutDesc

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.