Examples of deleteFamily()


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()

   */
  public static void removeRegionFromMETA(final HRegionInterface srvr,
    final byte [] metaRegionName, final byte [] regionName)
  throws IOException {
    Delete delete = new Delete(regionName);
    delete.deleteFamily(HConstants.CATALOG_FAMILY);
    srvr.delete(metaRegionName, delete);
  }

  /**
   * Utility method used by HMaster marking regions offlined.
View Full Code Here

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

          val2), put, 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, true);
      assertEquals(false, res);
    } finally {
      HRegion.closeHRegion(this.region);
View Full Code Here

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

      assertArrayEquals(val1, r.getValue(fam1, qf1));
      assertArrayEquals(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, 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);

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

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

  }

  @Test
  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 {
    TableName tableName = TableName.valueOf(name.getMethodName());
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()

      byte[][] split = KeyValue.parseColumn(column);
      if (rowspec.hasTimestamp()) {
        if (split.length == 2 && split[1].length != 0) {
          delete.deleteColumns(split[0], split[1], rowspec.getTimestamp());
        } else {
          delete.deleteFamily(split[0], rowspec.getTimestamp());
        }
      } else {
        if (split.length == 2 && split[1].length != 0) {
          delete.deleteColumns(split[0], split[1]);
        } else {
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.