Package org.kiji.schema.avro

Examples of org.kiji.schema.avro.RowKeyFormat2


        .setName("NAME").setType(ComponentType.STRING).build());
    components.add(RowKeyComponent.newBuilder()
        .setName("ADDRESS").setType(ComponentType.STRING).build());

    // build the row key format
    RowKeyFormat2 format = RowKeyFormat2.newBuilder().setEncoding(RowKeyEncoding.FORMATTED)
        .setSalt(HashSpec.newBuilder().setSuppressKeyMaterialization(true).build())
        .setRangeScanStartIndex(components.size())
        .setComponents(components)
        .build();
View Full Code Here


        .setName("NAME").setType(ComponentType.STRING).build());
    components.add(RowKeyComponent.newBuilder()
        .setName("ADDRESS").setType(ComponentType.STRING).build());

    // build the row key format
    RowKeyFormat2 format = RowKeyFormat2.newBuilder().setEncoding(RowKeyEncoding.FORMATTED)
        .setSalt(HashSpec.newBuilder().setSuppressKeyMaterialization(true).build())
        .setComponents(components)
        .build();

    return format;
View Full Code Here

  }

  /** Tests for a empty layout with no reference layout. */
  @Test
  public void testEmptyLayoutWithNoReference() throws Exception {
    RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(format)
        .setVersion(TABLE_LAYOUT_VERSION)
        .build();
View Full Code Here

  }

  /** Tests for a layout with a single locality group, and with no reference layout. */
  @Test
  public void testLayoutWithNoReference() throws Exception {
    RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(format)
        .setVersion(TABLE_LAYOUT_VERSION)
        .setLocalityGroups(Lists.newArrayList(
View Full Code Here

  }

  /** Tests for a layout with one map family, and with no reference layout. */
  @Test
  public void testMapFamilyLayoutWithNoReference() throws Exception {
    RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(format)
        .setVersion(TABLE_LAYOUT_VERSION)
        .setLocalityGroups(Lists.newArrayList(
View Full Code Here

  }

  /** Tests for a layout with one column, and with no reference layout. */
  @Test
  public void testGroupFamilyLayoutWithNoReference() throws Exception {
    RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(format)
        .setVersion(TABLE_LAYOUT_VERSION)
        .setLocalityGroups(Lists.newArrayList(
View Full Code Here

  }

  /** Tests for column removal. */
  @Test
  public void testDeleteColumn() throws Exception {
    RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();
    // Reference layout with a single column : "family_name:column_name"
    final TableLayoutDesc refDesc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(format)
        .setVersion(TABLE_LAYOUT_VERSION)
View Full Code Here

    }
  }

  @Test
  public void testNameAliases() throws Exception {
    RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();
    // Reference layout with a single column: "family_name:column_name"
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(format)
        .setVersion(TABLE_LAYOUT_VERSION)
View Full Code Here

  }

  /** Tests the initial assignment of IDs to locality groups, families and columns. */
  @Test
  public void testIdAssignmentWithNoReference() throws Exception {
    RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();
    // Reference layout with a single column: "family_name:column_name"
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(format)
        .setVersion(TABLE_LAYOUT_VERSION)
View Full Code Here

    assertEquals(2, lg2Layout.getId().getId());
  }

  @Test
  public void testDuplicateFamilyName() throws Exception {
    RowKeyFormat2 format = makeHashPrefixedRowKeyFormat();
    // Reference layout with a single column: "family_name:column_name"
    final TableLayoutDesc desc = TableLayoutDesc.newBuilder()
        .setName("table_name")
        .setKeysFormat(format)
        .setVersion(TABLE_LAYOUT_VERSION)
View Full Code Here

TOP

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

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.