Examples of deleteFamily()


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

        }
      } else {
        if (split.length == 2 && split[1].length != 0) {
          delete.deleteColumns(split[0], split[1]);
        } else {
          delete.deleteFamily(split[0]);
        }
      }
    }
    HTablePool pool = servlet.getTablePool();
    HTable table = null;
View Full Code Here

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

          new BinaryComparator(val2), put, lockId, true);
      assertEquals(false, res);

      //checkAndDelete with wrong value
      Delete delete = new Delete(row1);
      delete.deleteFamily(fam1);
      res = region.checkAndMutate(row1, fam1, qf1, CompareOp.EQUAL,
          new BinaryComparator(val2), delete, lockId, true);
      assertEquals(false, res);
    } finally {
      HRegion.closeHRegion(this.region);
View Full Code Here

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

      assertEquals(val1, r.getValue(fam1, qf1));
      assertEquals(val2, r.getValue(fam2, qf2));

      //Family delete
      delete = new Delete(row1);
      delete.deleteFamily(fam2);
      res = region.checkAndMutate(row1, fam2, qf1, CompareOp.EQUAL,
          new BinaryComparator(emptyVal), delete, lockId, true);
      assertEquals(true, res);

      get = new Get(row1);
View Full Code Here

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

      byte [] rowB = Bytes.toBytes("rowB");

      byte [] value = Bytes.toBytes("value");

      Delete delete = new Delete(rowA);
      delete.deleteFamily(fam1);

      region.delete(delete, null, true);

      // now create data.
      Put put = new Put(rowA);
View Full Code Here

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

    doTestDelete_AndPostInsert(delete);
  }

  public void testDeleteFamily_PostInsert() throws IOException, InterruptedException {
    Delete delete = new Delete(row);
    delete.deleteFamily(fam1);
    doTestDelete_AndPostInsert(delete);
  }

  public void doTestDelete_AndPostInsert(Delete delete)
      throws IOException, InterruptedException {
View Full Code Here

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

        HTable table = getTable(tableName);
        Delete delete  = new Delete(getBytes(row));
        addAttributes(delete, attributes);
        byte [][] famAndQf = KeyValue.parseColumn(getBytes(column));
        if (famAndQf.length == 1) {
          delete.deleteFamily(famAndQf[0], timestamp);
        } else {
          delete.deleteColumns(famAndQf[0], famAndQf[1], timestamp);
        }
        table.delete(delete);
View Full Code Here

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

        // I apologize for all this mess :)
        for (Mutation m : mutations) {
          byte[][] famAndQf = KeyValue.parseColumn(getBytes(m.column));
          if (m.isDelete) {
            if (famAndQf.length == 1) {
              delete.deleteFamily(famAndQf[0], timestamp);
            } else {
              delete.deleteColumns(famAndQf[0], famAndQf[1], timestamp);
            }
            delete.setWriteToWAL(m.writeToWAL);
          } else {
View Full Code Here

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

        for (Mutation m : mutations) {
          byte[][] famAndQf = KeyValue.parseColumn(getBytes(m.column));
          if (m.isDelete) {
            // no qualifier, family only.
            if (famAndQf.length == 1) {
              delete.deleteFamily(famAndQf[0], timestamp);
            } else {
              delete.deleteColumns(famAndQf[0], famAndQf[1], timestamp);
            }
            delete.setWriteToWAL(m.writeToWAL);
          } else {
View Full Code Here

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

    // delete action
    PrivilegedExceptionAction deleteAction = new PrivilegedExceptionAction() {
      public Object run() throws Exception {
        Delete d = new Delete(Bytes.toBytes("random_row"));
        d.deleteFamily(TEST_FAMILY);
        HTable t = new HTable(conf, TEST_TABLE);
        try {
          t.delete(d);
        } finally {
          t.close();
View Full Code Here

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

  public void testReadWrite() throws Exception {
    // action for checkAndDelete
    PrivilegedExceptionAction checkAndDeleteAction = new PrivilegedExceptionAction() {
      public Object run() throws Exception {
        Delete d = new Delete(Bytes.toBytes("random_row"));
        d.deleteFamily(TEST_FAMILY);
        HTable t = new HTable(conf, TEST_TABLE);
        try {
          t.checkAndDelete(Bytes.toBytes("random_row"), TEST_FAMILY, Bytes.toBytes("q"),
            Bytes.toBytes("test_value"), d);
        } finally {
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.