Package org.kiji.schema

Examples of org.kiji.schema.EntityId


      // Fill local variables.
      KijiTableReader mReader = mTable.openTableReader();
      try {
        KijiTableWriter mWriter = mTable.openTableWriter();
        try {
          EntityId mEntityId = mTable.getEntityId("eid-foo");

          mWriter.put(mEntityId, "family", "column", 0L, "Value at timestamp 0.");
          mWriter.put(mEntityId, "family", "column", 1L, "Value at timestamp 1.");

          final KijiDataRequest dataRequest = KijiDataRequest.builder()
View Full Code Here


        .addColumns(ColumnsDef.create()
        .add(EMPTY, ColumnReaderSpec.avroReaderSchemaSpecific(TestRecord1.class))).build();

    final KijiTable table = getKiji().openTable("table");
    try {
      final EntityId eid = table.getEntityId("row");
      final KijiTableReader reader = table.openTableReader();
      try {
        final KijiRowData normalData = reader.get(eid, normalRequest);
        final EmptyRecord emptyRecord = normalData.getMostRecentValue("family", "empty");
View Full Code Here

        .addColumns(ColumnsDef.create()
        .add(EMPTY, ColumnReaderSpec.avroReaderSchemaSpecific(TestRecord1.class))).build();

    final KijiTable table = getKiji().openTable("table");
    try {
      final EntityId eid = table.getEntityId("row");
      final KijiTableReader reader = table.getReaderFactory().readerBuilder()
          .withOnDecoderCacheMiss(OnDecoderCacheMiss.FAIL).buildAndOpen();
      try {
        try {
          final KijiRowData data = reader.get(table.getEntityId("row"), request);
View Full Code Here

        .addColumns(ColumnsDef.create()
        .add(EMPTY, ColumnReaderSpec.avroReaderSchemaSpecific(TestRecord1.class))).build();

    final KijiTable table = getKiji().openTable("table");
    try {
      final EntityId eid = table.getEntityId("row");
      final KijiTableReader reader = table.getReaderFactory().readerBuilder()
          .withOnDecoderCacheMiss(OnDecoderCacheMiss.FAIL)
          .withColumnReaderSpecOverrides(ImmutableMap.of(
              EMPTY, ColumnReaderSpec.avroReaderSchemaSpecific(TestRecord1.class)))
          .buildAndOpen();
View Full Code Here

        .addColumns(ColumnsDef.create()
            .add(EMPTY, ColumnReaderSpec.avroReaderSchemaSpecific(TestRecord1.class))).build();

    final KijiTable table = getKiji().openTable("table");
    try {
      final EntityId eid = table.getEntityId("row");
      final Multimap<KijiColumnName, ColumnReaderSpec> alts = ImmutableSetMultimap.of(
          EMPTY, ColumnReaderSpec.avroReaderSchemaSpecific(TestRecord1.class));
      final KijiTableReader reader = table.getReaderFactory().readerBuilder()
          .withOnDecoderCacheMiss(OnDecoderCacheMiss.FAIL)
          .withColumnReaderSpecAlternatives(alts)
View Full Code Here

            mapTypeFamilies, groupTypeColumns, mMaxVersions, mMinTimestamp, mMaxTimestamp);

        final KijiTableReader reader = table.openTableReader();
        try {
            // Return the specified entity.
            final EntityId entityId =
                ToolUtils.createEntityIdFromUserInputs(mEntityIdFlag, tableLayout);
            // TODO: Send this through an alternative stream: something like verbose or debug?
            getPrintStream().println(
                "Looking up entity: " + ToolUtils.formatEntityId(entityId)
                + " from kiji table: " + argURI);
View Full Code Here

              final CellSchema cellSchema = table.getLayout().getCellSchema(column);
              if (cellSchema.getType() != SchemaType.COUNTER) {
                LOG.error("Can't increment non counter-type column '{}'", column);
                return FAILURE;
              }
              final EntityId entityId =
                  ToolUtils.createEntityIdFromUserInputs(mEntityId, table.getLayout());
              writer.increment(entityId, column.getFamily(), column.getQualifier(), mValue);

            } catch (IOException ioe) {
              LOG.error("Error while incrementing column '{}'", column);
View Full Code Here

    try {
      for (int iuser = 0; iuser < mNumUsers; iuser++) {
        final String fullName = fullNameSynth.synthesize();
        final String email =
            EmailSynthesizer.formatEmail(fullName.replace(" ", "."), emailSynth.synthesizeDomain());
        final EntityId entityId = mTable.getEntityId(email);
        tableWriter.put(entityId, "info", "name", fullName);
        tableWriter.put(entityId, "info", "email", email);

        // Print some status so the user knows it's working.
        if (iuser % 1000 == 0) {
View Full Code Here

    assertEquals("new", actual2);
  }

  @Test
  public void testBufferPutWithDelete() throws Exception {
    final EntityId oldEntityId = mTable.getEntityId("foo");
    final EntityId newEntityId = mTable.getEntityId("bar");
    final KijiDataRequest request = KijiDataRequest.create("info", "name");

    // Initialize data for the old entity ID.
    mWriter.put(oldEntityId, "info", "name", "foo-name");
View Full Code Here

        .build();
    final KijiTable table = kiji.openTable("table");
    try {
      final KijiTableReader reader = table.getReaderFactory().openTableReader();
      try {
        final EntityId eid = table.getEntityId("row");
        final KijiDataRequest dataRequest = KijiDataRequest.builder()
            .addColumns(ColumnsDef.create().addFamily("family"))
            .build();
        final KijiRowData row = reader.get(eid, dataRequest);
        assertEquals(
View Full Code Here

TOP

Related Classes of org.kiji.schema.EntityId

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.