Examples of RowKeyFormat


Examples of org.kiji.schema.avro.RowKeyFormat

/** Tests for HashPrefixedEntityId. */
public class TestHashPrefixedEntityId {
  @Test
  public void testHashedEntityIdFromKijiRowKey() {
    final RowKeyFormat format = RowKeyFormat.newBuilder()
        .setEncoding(RowKeyEncoding.HASH_PREFIX)
        .setHashType(HashType.MD5)
        .setHashSize(4)
        .build();
    final byte[] kijiRowKey = new byte[] {0x11, 0x22};
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat

    assertEquals(kijiRowKey, eid.getComponents().get(0));
  }

  @Test
  public void testHashedEntityIdFromHBaseRowKey() throws Exception {
    final RowKeyFormat format = RowKeyFormat.newBuilder()
        .setEncoding(RowKeyEncoding.HASH_PREFIX)
        .setHashType(HashType.MD5)
        .setHashSize(4)
        .build();
    final byte[] hbaseRowKey = ByteArrayFormatter.parseHex("c700ed4f1122");
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat

/** Tests for HashedEntityId. */
public class TestHashedEntityId {
  @Test
  public void testHashedEntityIdFromKijiRowKey() {
    final RowKeyFormat format = RowKeyFormat.newBuilder()
        .setEncoding(RowKeyEncoding.HASH)
        .setHashType(HashType.MD5)
        .setHashSize(16)
        .build();
    final byte[] kijiRowKey = new byte[] {0x11, 0x22};
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat

    assertEquals(kijiRowKey, eid.getComponents().get(0));
  }

  @Test
  public void testHashedEntityIdFromHBaseRowKey() throws Exception {
    final RowKeyFormat format = RowKeyFormat.newBuilder()
        .setEncoding(RowKeyEncoding.HASH)
        .setHashType(HashType.MD5)
        .setHashSize(16)
        .build();
    final byte[] hbaseRowKey = ByteArrayFormatter.parseHex("c700ed4fdb1d27055aa3faa2c2432283");
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat

    return format;
  }

  private RowKeyFormat makeRawRowKeyFormat() {
    final RowKeyFormat format = RowKeyFormat.newBuilder().setEncoding(RowKeyEncoding.RAW).build();
    return format;
  }
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.