Examples of EntityId


Examples of org.kiji.schema.EntityId

        .build();
    final KijiTable table = kiji.openTable("user");
    try {
      final KijiTableReader reader = table.openTableReader();
      try {
        final EntityId eid = table.getEntityId("row");

        // Make sure we have 2 versions in columns info:name and in info:email.
        {
          final KijiDataRequest dataRequest = KijiDataRequest.builder()
              .addColumns(ColumnsDef.create()
View Full Code Here

Examples of org.kiji.schema.EntityId

    final Kiji kiji = getKiji();
    kiji.createTable(KijiTableLayouts.getLayout(KijiTableLayouts.SIMPLE));

    final KijiTable table = kiji.openTable("table");
    try {
      final EntityId eid = table.getEntityId("eid");

      {
        final KijiTableWriter writer = table.openTableWriter();
        try {
          writer.put(eid, "family", "column", 1L, "me");
View Full Code Here

Examples of org.kiji.schema.EntityId

  public void testNoReaderSchema() throws Exception {
    final Kiji kiji = getKiji();
    kiji.createTable(KijiTableLayouts.getLayout(LAYOUT_DEVELOPER));
    final KijiTable table = kiji.openTable("dev");
    try {
      final EntityId eid = table.getEntityId("row");
      final KijiTableWriter writer = table.getWriterFactory().openTableWriter();
      try {
        // Registers writer schema 'long':
        writer.put(eid, "info", "user_id", (Long) 1L);
View Full Code Here

Examples of org.kiji.schema.EntityId

            .build()));

    kiji.createTable(desc);
    final KijiTable table = kiji.openTable("dev");
    try {
      final EntityId eid = table.getEntityId("row");
      final KijiTableWriter writer = table.getWriterFactory().openTableWriter();
      try {
        // Registering 'long' as a writer schema: compatible with 'long' reader schema:
        writer.put(eid, "info", "user_id", (Long) 1L);
View Full Code Here

Examples of org.kiji.schema.EntityId

            .build()));

    kiji.createTable(desc);
    final KijiTable table = kiji.openTable("dev");
    try {
      final EntityId eid = table.getEntityId("row");
      final KijiTableWriter writer = table.getWriterFactory().openTableWriter();
      try {
        // Register writer schema TestRecord1, compatible with reader TestRecord2:
        final GenericData.Record record1 = new GenericData.Record(INT_RECORD1);
        record1.put("integer", 314);
View Full Code Here

Examples of org.kiji.schema.EntityId

              table.getURI().toString() + "info:name,info:email"
          ));
      assertEquals(30, mToolOutputLines.length);

        EntityIdFactory eif = EntityIdFactory.getFactory(layout);
        EntityId startEid = eif.getEntityId("christophe@usermail.example.com"); //second row
        EntityId limitEid = eif.getEntityId("john.doe@gmail.com"); //second to last row
        String startHbaseRowKey = Hex.encodeHexString(startEid.getHBaseRowKey());
        String limitHbaseRowKey = Hex.encodeHexString(limitEid.getHBaseRowKey());
      assertEquals(BaseTool.SUCCESS, runTool(new ScanTool(),
          table.getURI().toString() + "info:name",
          "--start-row=hbase=hex:" + startHbaseRowKey,  // start at the second row.
          "--limit-row=hbase=hex:" + limitHbaseRowKey   // end at the 2nd to last row (exclusive).
      ));
View Full Code Here

Examples of org.kiji.schema.EntityId

  @Test
  public void testRawParserLoop() throws Exception {
    final EntityIdFactory factory =
      EntityIdFactory.getFactory((RowKeyFormat) mRawLayout.getDesc().getKeysFormat());
    final EntityId eid = factory.getEntityIdFromHBaseRowKey(Bytes.toBytes("rawRowKey"));

    assertEquals(eid,
        ToolUtils.createEntityIdFromUserInputs(eid.toShellString(), mRawLayout));
  }
View Full Code Here

Examples of org.kiji.schema.EntityId

  @Test
  public void testHashedParserLoop() throws Exception {
    final EntityIdFactory factory =
       EntityIdFactory.getFactory((RowKeyFormat) mHashedLayout.getDesc().getKeysFormat());
    final EntityId eid = factory.getEntityId("hashedRowKey");

    assertEquals(eid,
        ToolUtils.createEntityIdFromUserInputs(eid.toShellString(), mHashedLayout));
  }
View Full Code Here

Examples of org.sonatype.nexus.component.model.EntityId

public class DefaultEntityIdFactory
    implements EntityIdFactory
{
  @Override
  public EntityId newId() {
    return new EntityId(UUID.randomUUID().toString());
  }
View Full Code Here

Examples of org.sonatype.nexus.component.model.EntityId

{
  @Test
  public void restoredIdsAreEqual() {
    final EntityIdFactory factory = new DefaultEntityIdFactory();

    final EntityId id = factory.newId();

    final EntityId restored = new EntityId(id.asUniqueString());

    assertThat(id, is(equalTo(restored)));
  }
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.