Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.Delete.deleteColumns()


    Put put = new Put(ROWS[1]);
    put.add(TEST_FAMILY, TEST_QUALIFIER, Bytes.toBytes(2 * 1));
    mutations.add(put);
    Delete del = new Delete(ROWS[3]);
    del.deleteColumns(TEST_FAMILY, TEST_QUALIFIER);
    mutations.add(del);
   
    MultiRowMutationProtocol p =
        table.coprocessorProxy(MultiRowMutationProtocol.class, mutations.get(0).getRow());
    try {
View Full Code Here


    Put put = new Put(ROWS[1]);
    put.add(TEST_FAMILY, TEST_QUALIFIER, Bytes.toBytes(2 * 1));
    mutations.add(put);
    Delete del = new Delete(ROWS[7]);
    del.deleteColumns(TEST_FAMILY, TEST_QUALIFIER);
    mutations.add(del);
   
    MultiRowMutationProtocol p =
        table.coprocessorProxy(MultiRowMutationProtocol.class, mutations.get(0).getRow());
    try {
View Full Code Here

    d = new Delete(T1, ts+2);
    d.deleteColumn(c0, c0, ts+2);
    region.delete(d, true);

    d = new Delete(T1, ts+3);
    d.deleteColumns(c0, c0, ts+3);
    region.delete(d, true);

    Scan s = new Scan();
    s.setRaw(true);
    s.setMaxVersions();
View Full Code Here

    HRegion region = createNewHRegion(htd, null, null);

    long ts = System.currentTimeMillis();

    Delete d = new Delete(T1, ts, null);
    d.deleteColumns(c0, c0, ts);
    region.delete(d, null, true);

    d = new Delete(T1, ts, null);
    d.deleteFamily(c0);
    region.delete(d, null, true);
View Full Code Here

    p.add(c1, c0, T1);
    region.put(p);

    // all the following deletes affect the put
    Delete d = new Delete(T1, ts, null);
    d.deleteColumns(c0, c0, ts);
    region.delete(d, null, true);

    d = new Delete(T1, ts, null);
    d.deleteFamily(c0, ts);
    region.delete(d, null, true);
View Full Code Here

    p.add(c1, c0, T2);
    p.add(c1, c1, T2);
    region.put(p);

    Delete d = new Delete(T1, ts+2, null);
    d.deleteColumns(c0, c0, ts+2);
    region.delete(d, null, true);

    d = new Delete(T1, ts+2, null);
    d.deleteFamily(c1, ts+2);
    region.delete(d, null, true);
View Full Code Here

    p.add(c0, c1, T1);
    region.put(p);
   
    Delete d = new Delete(T1, ts, null);
    // test corner case (Put and Delete have same TS)
    d.deleteColumns(c0, c0, ts);
    region.delete(d, null, true);

    d = new Delete(T1, ts+1, null);
    d.deleteColumn(c0, c0, ts+1);
    region.delete(d, null, true);
View Full Code Here

    // place a family delete marker
    Delete d = new Delete(T1, ts-1, null);
    region.delete(d, null, true);
    // and a column delete marker
    d = new Delete(T1, ts-2, null);
    d.deleteColumns(c0, c0, ts-1);
    region.delete(d, null, true);

    Get g = new Get(T1);
    g.setMaxVersions();
    g.setTimeRange(0L, ts-2);
View Full Code Here

            ts = qv.getTimestamp();
          }
          if (deleteType == DeleteType.DELETE_ONE_VERSION) {
            delete.deleteColumn(family, qualifier, ts);
          } else if (deleteType == DeleteType.DELETE_MULTIPLE_VERSIONS) {
            delete.deleteColumns(family, qualifier, ts);
          } else if (deleteType == DeleteType.DELETE_FAMILY_VERSION) {
            delete.deleteFamilyVersion(family, ts);
          } else {
            delete.deleteFamily(family, ts);
          }
View Full Code Here

                ts + "_random_" + rand.nextLong());
            put.add(cf, qual, ts, value);
          } else if (rand.nextDouble() < 0.8) {
            del.deleteColumn(cf, qual, ts);
          } else {
            del.deleteColumns(cf, qual, ts);
          }
        }

        if (!put.isEmpty()) {
          table.put(put);
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.