コード例 #1
0
 /**
  * Tests translation of HBase qualifiers have multiple separators (the Kiji qualifier contains the
  * separator).
  */
 @Test
 public void testMultipleSeparators() throws Exception {
   KijiColumnName kijiColumnName =
       mTranslator.toKijiColumnName(getHBaseColumnName("inMemory", "purchases:left:right"));
   assertEquals("purchases", kijiColumnName.getFamily());
   assertEquals("left:right", kijiColumnName.getQualifier());
 }
コード例 #2
0
  @Test
  public void testTranslateFromHBaseToKiji() throws Exception {
    KijiColumnName infoName =
        mTranslator.toKijiColumnName(getHBaseColumnName("default", "info:name"));
    assertEquals("info:name", infoName.toString());

    KijiColumnName infoEmail =
        mTranslator.toKijiColumnName(getHBaseColumnName("default", "info:email"));
    assertEquals("info:email", infoEmail.toString());

    KijiColumnName recommendationsProduct =
        mTranslator.toKijiColumnName(getHBaseColumnName("inMemory", "recommendations:product"));
    assertEquals("recommendations:product", recommendationsProduct.toString());

    KijiColumnName purchases =
        mTranslator.toKijiColumnName(getHBaseColumnName("inMemory", "purchases:foo"));
    assertEquals("purchases:foo", purchases.toString());
  }
コード例 #3
0
 /**
  * Tests that an exception is thrown when the first part of the HBase qualifier doesn't match a
  * Kiji family.
  */
 @Test(expected = NoSuchColumnException.class)
 public void testNoSuchKijiFamily() throws Exception {
   mTranslator.toKijiColumnName(getHBaseColumnName("inMemory", "fakeFamily:fakeQualifier"));
 }
コード例 #4
0
 /**
  * Tests that an exception is thrown when the HBase family doesn't match a Kiji locality group.
  */
 @Test(expected = NoSuchColumnException.class)
 public void testNoSuchKijiLocalityGroup() throws Exception {
   mTranslator.toKijiColumnName(
       getHBaseColumnName("fakeLocalityGroup", "fakeFamily:fakeQualifier"));
 }