Examples of openTableReader()


Examples of org.kiji.schema.KijiTable.openTableReader()

                  .add(pets, rabbit)
                  .add(pets, fish)
                  .add(pets, bird)
          ).build();

      final KijiTableReader myreader = table.openTableReader();
      assert myreader instanceof CassandraKijiTableReader;
      final CassandraKijiTableReader reader = (CassandraKijiTableReader) myreader;

      try {
        // Fire up a row scanner!
View Full Code Here

Examples of org.kiji.schema.KijiTable.openTableReader()

                  .add(pets, rabbit)
                  .add(pets, fish)
                  .add(pets, bird)
          ).build();

      final KijiTableReader reader = table.openTableReader();
      try {
        // Fire up a row scanner!
        final KijiRowScanner scanner = reader.getScanner(dataRequest);
        try {
          // There is a small enough amount of data that we can just put all of the rows into a hash
View Full Code Here

Examples of org.kiji.schema.KijiTable.openTableReader()

        tableWriter.close();
      }

      // ----- Read a row from the table. -----
      // Get a TableReader for our table.
      KijiTableReader tableReader = table.openTableReader();
      // Surround with a try/finally so the tablereader gets closed.
      try {
        // Build a DataRequest for the row we want.
        KijiDataRequest dataRequest = KijiDataRequest.create("info", "name");
        KijiRowData result = tableReader.get(entityId, dataRequest);
View Full Code Here

Examples of org.kiji.schema.KijiTable.openTableReader()

                        .withValue(1L, "email1")
                        .withValue(2L, "email2")
        .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.
        {
View Full Code Here

Examples of org.kiji.schema.KijiTable.openTableReader()

        } finally {
          writer.close();
        }
      }

      final KijiTableReader reader = table.openTableReader();
      try {
        final KijiDataRequest dataRequest = KijiDataRequest.builder()
            .addColumns(ColumnsDef.create().withMaxVersions(2).add("family", "column"))
            .build();
        final KijiRowFilter rowFilter = new StripValueRowFilter();
View Full Code Here

Examples of org.kiji.schema.KijiTable.openTableReader()

                .withFamily("family")
                    .withQualifier("column").withValue(100, "foo3")
        .build();

    final KijiTable table = kiji.openTable("table");
    final KijiTableReader reader = table.openTableReader();

    // Verify the first row.
    final KijiDataRequest req = KijiDataRequest.create("family", "column");
    final KijiRowData row1 = reader.get(table.getEntityId("row1"), req);
    assertEquals("foo2", row1.getValue("family", "column", 2).toString());
View Full Code Here

Examples of org.kiji.schema.KijiTable.openTableReader()

    kiji.createTable(KijiTableLayouts.getLayout(KijiTableLayouts.SIMPLE_FORMATTED_EID));
    KijiTable mTable = kiji.openTable("table");
    try {
      assertNotNull(mTable);
      // Fill local variables.
      KijiTableReader mReader = mTable.openTableReader();
      try {
        KijiTableWriter mWriter = mTable.openTableWriter();
        try {
          EntityId mEntityId = mTable.getEntityId("eid-foo");
View Full Code Here

Examples of org.kiji.schema.KijiTable.openTableReader()

        .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");

        final KijiRowData overrideData = reader.get(table.getEntityId("row"), overrideRequest);
View Full Code Here

Examples of org.kiji.schema.KijiTable.openTableReader()

      final KijiDataRequest dataRequest = KijiDataRequest.builder()
          .addColumns(ColumnsDef.create().addFamily("family"))
          .build();

      final KijiTableReader reader = table.openTableReader();
      try {
        final KijiRowData row1 = reader.get(table.getEntityId("row1"), dataRequest);
        assertTrue(row1.getValues("family", "qual0").isEmpty());
      } finally {
        reader.close();
View Full Code Here

Examples of org.kiji.schema.KijiTable.openTableReader()

      } finally {
        writer.close();
      }

      // Read the record back (should be a generic record):
      final KijiTableReader reader = table.openTableReader();
      try {
        final KijiDataRequest dataRequest = KijiDataRequest.builder()
            .addColumns(ColumnsDef.create().add("family", "qualifier"))
            .build();
        final KijiRowData row = reader.get(table.getEntityId("eid"), dataRequest);
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.