Examples of RowKeyFormat2


Examples of org.kiji.schema.avro.RowKeyFormat2

    assertArrayEquals(formattedEntityId.getHBaseRowKey(), testEntityId.getHBaseRowKey());
  }

  @Test
  public void testSuppressMaterialization() {
    final RowKeyFormat2 format = makeSuppressMaterializationTestRKF();

    FormattedEntityId formattedEntityId = makeId(format, "one", 1, 7L);
    byte[] hbaseRowKey = formattedEntityId.getHBaseRowKey();

    FormattedEntityId testEntityId = FormattedEntityId.fromHBaseRowKey(hbaseRowKey, format);
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat2

    }
  }

  @Test
  public void testSuppressMaterializationComponentsException() {
    final RowKeyFormat2 format = makeSuppressMaterializationTestRKF();
    FormattedEntityId formattedEntityId = makeId(format, "one", 1, 7L);
    try {
      formattedEntityId.getComponents();
      fail("Should fail with IllegalStateException");
    } catch (IllegalStateException ise) {
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat2

    }
  }

  @Test
  public void testSuppressMaterializationComponentsByIndexException() {
    final RowKeyFormat2 format = makeSuppressMaterializationTestRKF();
    FormattedEntityId formattedEntityId = makeId(format, "one", 1, 7L);
    try {
      formattedEntityId.getComponentByIndex(0);
      fail("Should fail with IllegalStateException");
    } catch (IllegalStateException ise) {
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat2

    }
  }

  @Test
  public void testSuppressMaterializationComponentsExceptionFromHbaseKey() {
    final RowKeyFormat2 format = makeSuppressMaterializationTestRKF();
    FormattedEntityId formattedEntityId = makeId(format, "one", 1, 7L);
    byte[] hbaseRowKey = formattedEntityId.getHBaseRowKey();
    FormattedEntityId testEntityId = FormattedEntityId.fromHBaseRowKey(hbaseRowKey, format);
    try {
      testEntityId.getComponents();
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat2

    }
  }

  @Test
  public void testSuppressMaterializationComponentsByIndexExceptionFromHbaseKey() {
    final RowKeyFormat2 format = makeSuppressMaterializationTestRKF();
    FormattedEntityId formattedEntityId = makeId(format, "one", 1, 7L);
    byte[] hbaseRowKey = formattedEntityId.getHBaseRowKey();
    FormattedEntityId testEntityId = FormattedEntityId.fromHBaseRowKey(hbaseRowKey, format);

    try {
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat2

    }
  }

  @Test
  public void testBadNullFormattedEntityId() {
    final RowKeyFormat2 format = makeRowKeyFormat();

    // No non-null component is allowed after a null component:
    try {
      makeId(format, "one", null, 7L);
      fail("Should fail with EntityIdException");
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat2

    }
  }

  @Test
  public void testTooManyComponentsFormattedEntityId() {
    final RowKeyFormat2 format = makeRowKeyFormat();
    try {
      makeId(format, "one", 1, 7L, null);
      fail("Should fail with EntityIdException");
    } catch (EntityIdException eie) {
      assertEquals("Too many components in kiji Row Key", eie.getMessage());
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat2

  }

  @Test
  public void testWrongComponentTypeFormattedEntityId() {
    final RowKeyFormat2 format = makeRowKeyFormat();
    try {
      // Second component must be an integer:
      makeId(format, "one", 1L, 7L);
      fail("Should fail with EntityIdException");
    } catch (EntityIdException eie) {
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat2

    }
  }

  @Test
  public void testUnexpectedNullFormattedEntityId() {
    final RowKeyFormat2 format = makeRowKeyFormatNoNulls();
    try {
      makeId(format, "one", null);
      fail("Should fail with EntityIdException");
    } catch (EntityIdException eie) {
      assertEquals("Too few components in kiji Row key", eie.getMessage());
View Full Code Here

Examples of org.kiji.schema.avro.RowKeyFormat2

    }
  }

  @Test
  public void testTooFewComponentsFormattedEntityId() {
    final RowKeyFormat2 format = makeRowKeyFormatNoNulls();
    try {
      makeId(format, "one");
      fail("Should fail with EntityIdException");
    } catch (EntityIdException eie) {
      assertEquals("Too few components in kiji Row key", eie.getMessage());
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.