Examples of toShellString()


Examples of org.kiji.schema.EntityId.toShellString()

      for (byte b2 = 32; b2 < 127; b2++) {
        final EntityId eid = factory.getEntityId(String.format(
            "dumm%sy", new String(new byte[]{b, b2}, "Utf-8")), "str1", "str2", 5, 10L);

        assertEquals(eid,
            ToolUtils.createEntityIdFromUserInputs(eid.toShellString(), mFormattedLayout));
      }
    }
  }

  /** RawEntityId. */
 
View Full Code Here

Examples of org.kiji.schema.EntityId.toShellString()

    final EntityIdFactory factory =
      EntityIdFactory.getFactory((RowKeyFormat) mRawLayout.getDesc().getKeysFormat());
    final EntityId eid = factory.getEntityIdFromHBaseRowKey(Bytes.toBytes("rawRowKey"));

    assertEquals(eid,
        ToolUtils.createEntityIdFromUserInputs(eid.toShellString(), mRawLayout));
  }

  /** HashedEntityId. */

  @Test
View Full Code Here

Examples of org.kiji.schema.EntityId.toShellString()

    final EntityIdFactory factory =
       EntityIdFactory.getFactory((RowKeyFormat) mHashedLayout.getDesc().getKeysFormat());
    final EntityId eid = factory.getEntityId("hashedRowKey");

    assertEquals(eid,
        ToolUtils.createEntityIdFromUserInputs(eid.toShellString(), mHashedLayout));
  }

  /** HashPrefixedEntityId. */

  @Test
View Full Code Here

Examples of org.kiji.schema.EntityId.toShellString()

    final EntityIdFactory factory =
       EntityIdFactory.getFactory((RowKeyFormat) mHashPrefixedLayout.getDesc().getKeysFormat());
    final EntityId eid = factory.getEntityId("hashPrefixedRowKey");

    assertEquals(
        eid, ToolUtils.createEntityIdFromUserInputs(eid.toShellString(), mHashPrefixedLayout));
  }

  /** HBaseEntityId. */

  @Test
View Full Code Here

Examples of org.kiji.schema.EntityId.toShellString()

      EntityIdFactory.getFactory((RowKeyFormat) mRawLayout.getDesc().getKeysFormat());
    final EntityId reid = factory.getEntityId("rawEID");
    final EntityId hbeid = HBaseEntityId.fromHBaseRowKey(reid.getHBaseRowKey());

    assertEquals(reid,
        ToolUtils.createEntityIdFromUserInputs(hbeid.toShellString(), mRawLayout));
  }

  @Test
  public void testHBaseEIDtoHashedEID() throws Exception {
    final EntityIdFactory factory =
View Full Code Here

Examples of org.kiji.schema.EntityId.toShellString()

      EntityIdFactory.getFactory((RowKeyFormat) mHashedLayout.getDesc().getKeysFormat());
    final EntityId heid = factory.getEntityId("hashedEID");
    final EntityId hbeid = HBaseEntityId.fromHBaseRowKey(heid.getHBaseRowKey());

    assertEquals(heid,
        ToolUtils.createEntityIdFromUserInputs(hbeid.toShellString(), mHashedLayout));

  }

  @Test
  public void testHBaseEIDtoHashPrefixedEID() throws Exception {
View Full Code Here

Examples of org.kiji.schema.EntityId.toShellString()

      EntityIdFactory.getFactory((RowKeyFormat) mHashPrefixedLayout.getDesc().getKeysFormat());
    final EntityId hpeid = factory.getEntityId("hashPrefixedEID");
    final EntityId hbeid = HBaseEntityId.fromHBaseRowKey(hpeid.getHBaseRowKey());

    assertEquals(hpeid,
        ToolUtils.createEntityIdFromUserInputs(hbeid.toShellString(), mHashPrefixedLayout));
  }

  @Test
  public void testHBaseEIDtoFormattedEID() throws Exception {
    final EntityIdFactory factory =
View Full Code Here

Examples of org.kiji.schema.EntityId.toShellString()

        EntityIdFactory.getFactory((RowKeyFormat2) mFormattedLayout.getDesc().getKeysFormat());
    final EntityId feid = factory.getEntityId("dummy", "str1", "str2", 5, 10);
    final EntityId hbeid = HBaseEntityId.fromHBaseRowKey(feid.getHBaseRowKey());

    assertEquals(feid,
        ToolUtils.createEntityIdFromUserInputs(hbeid.toShellString(), mFormattedLayout));
  }
}
View Full Code Here

Examples of org.kiji.schema.EntityId.toShellString()

    // Component representation of entities should work.
    final JsonEntityIdParser restEid4 = JsonEntityIdParser.create(SINGLE_COMPONENT_EID, layout);
    final EntityId resolvedEid = restEid4.getEntityId();
    final String recoveredComponent = Bytes.toString(
        Bytes.toBytesBinary(
            resolvedEid.toShellString().substring(
                ToolUtils.KIJI_ROW_KEY_SPEC_PREFIX.length())));
    assertEquals(UNUSUAL_STRING_EID, recoveredComponent);
    assertEquals(resolvedEid, restEid4.getEntityId());
  }
View Full Code Here

Examples of org.kiji.schema.EntityId.toShellString()

    // Component representation of entities should work.
    final JsonEntityIdParser restEid4 = JsonEntityIdParser.create(SINGLE_COMPONENT_EID, layout);
    final EntityId resolvedEid = restEid4.getEntityId();
    final String recoveredComponent = Bytes.toString(
        Bytes.toBytesBinary(
            resolvedEid.toShellString().substring(
                ToolUtils.KIJI_ROW_KEY_SPEC_PREFIX.length())));
    assertEquals(UNUSUAL_STRING_EID, recoveredComponent);
    assertEquals(resolvedEid, restEid4.getEntityId());
  }
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.