Package org.kiji.schema.avro

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


    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

/** 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

    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

    return format;
  }

  private RowKeyFormat makeRawRowKeyFormat() {
    final RowKeyFormat format = RowKeyFormat.newBuilder().setEncoding(RowKeyEncoding.RAW).build();
    return format;
  }
View Full Code Here

TOP

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

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.