Package org.kiji.schema

Examples of org.kiji.schema.KijiRowData.containsCell()


    // Delete the cell and make sure that this value is missing.
    mWriter.deleteCell(mEntityId, "family", "column", 0L);

    rowData = mReader.get(mEntityId, dataRequest);
    assertFalse(rowData.containsCell("family", "column", 0L));
  }

  /**
   * Test that exposes bug in timestamp ordering of KijiRowData.
   */
 
View Full Code Here


    // Write a second value, with a more-recent timestamp.
    mWriter.put(mEntityId, "family", "column", 1L, "Value at timestamp 1.");

    // Do a get and verify that both values are present.
    rowData = mReader.get(mEntityId, dataRequest);
    assertTrue(rowData.containsCell("family", "column", 0L));
    assertTrue(rowData.containsCell("family", "column", 1L));

    // The most-recent value should be the one with the highest timestamp!
    assertEquals(
        "Value at timestamp 1.", rowData.getMostRecentValue("family", "column").toString());
View Full Code Here

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

    // Do a get and verify that both values are present.
    rowData = mReader.get(mEntityId, dataRequest);
    assertTrue(rowData.containsCell("family", "column", 0L));
    assertTrue(rowData.containsCell("family", "column", 1L));

    // The most-recent value should be the one with the highest timestamp!
    assertEquals(
        "Value at timestamp 1.", rowData.getMostRecentValue("family", "column").toString());
  }
View Full Code Here

          // Delete the cell and make sure that this value is missing.
          mWriter.deleteCell(mEntityId, "family", "column", 0L);

          rowData = mReader.get(mEntityId, dataRequest);
          assertFalse(rowData.containsCell("family", "column", 0L));
        } finally {
          mWriter.close();
        }
      } finally {
        mReader.close();
View Full Code Here

    // Wait for ten seconds.
    Thread.sleep(10 * 1000);

    rowData = mReader.get(mEntityId, dataRequest);
    assertFalse(rowData.containsCell(FAMILY, QUALIFIER, TIMESTAMP));
  }

}

View Full Code Here

  public void testContainsColumn() throws Exception {
    final long myTime = 1L;
    mWriter.put(mEntityId, FAMILY, QUAL0, myTime, "foo");

    KijiRowData row1 = mReader.get(mEntityId, KijiDataRequest.create(FAMILY, QUAL0));
    assertTrue(row1.containsCell(FAMILY, QUAL0, myTime));
    assertFalse(row1.containsCell(FAMILY, QUAL0, myTime + 1L));
    assertFalse(row1.containsCell("fake", QUAL0, myTime));
    assertFalse(row1.containsCell(FAMILY, "fake", myTime));
  }
View Full Code Here

    final long myTime = 1L;
    mWriter.put(mEntityId, FAMILY, QUAL0, myTime, "foo");

    KijiRowData row1 = mReader.get(mEntityId, KijiDataRequest.create(FAMILY, QUAL0));
    assertTrue(row1.containsCell(FAMILY, QUAL0, myTime));
    assertFalse(row1.containsCell(FAMILY, QUAL0, myTime + 1L));
    assertFalse(row1.containsCell("fake", QUAL0, myTime));
    assertFalse(row1.containsCell(FAMILY, "fake", myTime));
  }

  @Test
View Full Code Here

    mWriter.put(mEntityId, FAMILY, QUAL0, myTime, "foo");

    KijiRowData row1 = mReader.get(mEntityId, KijiDataRequest.create(FAMILY, QUAL0));
    assertTrue(row1.containsCell(FAMILY, QUAL0, myTime));
    assertFalse(row1.containsCell(FAMILY, QUAL0, myTime + 1L));
    assertFalse(row1.containsCell("fake", QUAL0, myTime));
    assertFalse(row1.containsCell(FAMILY, "fake", myTime));
  }

  @Test
  public void testIteratorMapFamilyTypes() throws IOException {
View Full Code Here

    KijiRowData row1 = mReader.get(mEntityId, KijiDataRequest.create(FAMILY, QUAL0));
    assertTrue(row1.containsCell(FAMILY, QUAL0, myTime));
    assertFalse(row1.containsCell(FAMILY, QUAL0, myTime + 1L));
    assertFalse(row1.containsCell("fake", QUAL0, myTime));
    assertFalse(row1.containsCell(FAMILY, "fake", myTime));
  }

  @Test
  public void testIteratorMapFamilyTypes() throws IOException {
    mWriter.put(mEntityId, MAP, KEY0, 1L, 0);
View Full Code Here

        .addColumns(ColumnsDef.create().withMaxVersions(10).add("info", "name"))
        .build();

    KijiRowData rowData;
    rowData = mReader.get(mEntityId, dataRequest);
    assertFalse(rowData.containsCell("info", "name", 0L));

    // Now do a flush.
    mBufferedWriter.flush();

    // If you read again, the data should be present.
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.