Examples of TRowResult


Examples of org.apache.hadoop.hbase.thrift.generated.TRowResult

    handler.mutateRow(tableAname, rowAname, getMutations());

    // Assert that the changes were made
    assertTrue(Bytes.equals(valueAname,
      handler.get(tableAname, rowAname, columnAname).get(0).value));
    TRowResult rowResult1 = handler.getRow(tableAname, rowAname).get(0);
    assertTrue(Bytes.equals(rowAname, rowResult1.row));
    assertTrue(Bytes.equals(valueBname,
      rowResult1.columns.get(columnBname).value));

    // Apply a few BatchMutations for rowA and rowB
    // rowAmutations.add(new Mutation(true, columnAname, null));
    // rowAmutations.add(new Mutation(false, columnBname, valueCname));
    // batchMutations.add(new BatchMutation(rowAname, rowAmutations));
    // Mutations to rowB
    // rowBmutations.add(new Mutation(false, columnAname, valueCname));
    // rowBmutations.add(new Mutation(false, columnBname, valueDname));
    // batchMutations.add(new BatchMutation(rowBname, rowBmutations));
    handler.mutateRows(tableAname, getBatchMutations());

    // Assert that changes were made to rowA
    List<TCell> cells = handler.get(tableAname, rowAname, columnAname);
    assertFalse(cells.size() > 0);
    assertTrue(Bytes.equals(valueCname, handler.get(tableAname, rowAname, columnBname).get(0).value));
    List<TCell> versions = handler.getVer(tableAname, rowAname, columnBname, MAXVERSIONS);
    assertTrue(Bytes.equals(valueCname, versions.get(0).value));
    assertTrue(Bytes.equals(valueBname, versions.get(1).value));

    // Assert that changes were made to rowB
    TRowResult rowResult2 = handler.getRow(tableAname, rowBname).get(0);
    assertTrue(Bytes.equals(rowBname, rowResult2.row));
    assertTrue(Bytes.equals(valueCname, rowResult2.columns.get(columnAname).value));
    assertTrue(Bytes.equals(valueDname, rowResult2.columns.get(columnBname).value));

    // Apply some deletes
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.