Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.Delete


    byte [] rowA = Bytes.toBytes("rowA");
    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


  }

  public void testDeleteColumns_PostInsert() throws IOException,
      InterruptedException {
    Delete delete = new Delete(row);
    delete.deleteColumns(fam1, qual1);
    doTestDelete_AndPostInsert(delete);
  }
View Full Code Here

    delete.deleteColumns(fam1, qual1);
    doTestDelete_AndPostInsert(delete);
  }

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

    put.add(family, qual1, 1L, Bytes.toBytes(1L));
    region.put(put);

    region.flushcache();

    Delete delete = new Delete(Bytes.toBytes(1L), 1L, null);
    //delete.deleteColumn(family, qual1);
    region.delete(delete, null, true);

    put = new Put(Bytes.toBytes(2L));
    put.add(family, qual1, 2L, Bytes.toBytes(2L));
View Full Code Here

    if (LOG.isDebugEnabled()) {
      LOG.debug(split.getRegionNameAsString() + "/" + split.getEncodedName()
          + " no longer has references to " + Bytes.toStringBinary(parent));
    }
   
    Delete delete = new Delete(parent);
    delete.deleteColumns(splitFamily, splitQualifier);
    srvr.delete(metaRegionName, delete);
   
    return result;
  }
View Full Code Here

   * @throws IOException
   */
  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);
  }
View Full Code Here

   * @throws IOException
   */
  public static void cleanRegionInMETA(final HRegionInterface srvr,
    final byte [] metaRegionName, final HRegionInfo info)
  throws IOException {
    Delete del = new Delete(info.getRegionName());
    del.deleteColumns(CATALOG_FAMILY, SERVER_QUALIFIER);
    del.deleteColumns(CATALOG_FAMILY, STARTCODE_QUALIFIER);
    srvr.delete(metaRegionName, del);
  }
View Full Code Here


      // Update meta table
      Put put = updateRegionInfo(i);
      server.put(m.getRegionName(), put);
      Delete delete = new Delete(i.getRegionName());
      delete.deleteColumns(CATALOG_FAMILY, SERVER_QUALIFIER);
      delete.deleteColumns(CATALOG_FAMILY, STARTCODE_QUALIFIER);
      server.delete(m.getRegionName(), delete);
      if (LOG.isDebugEnabled()) {
        LOG.debug("Removed server and startcode from row and set online=" +
          this.online + ": " + i.getRegionNameAsString());
      }
View Full Code Here

      this.region.put(p);
    }
   
    // Delete the second qualifier from all rows and families
    for(byte [] ROW : ROWS_ONE) {
      Delete d = new Delete(ROW);
      d.deleteColumns(FAMILIES[0], QUALIFIERS_ONE[1]);
      d.deleteColumns(FAMILIES[1], QUALIFIERS_ONE[1]);
      this.region.delete(d, null, false);
    }   
    for(byte [] ROW : ROWS_TWO) {
      Delete d = new Delete(ROW);
      d.deleteColumns(FAMILIES[0], QUALIFIERS_TWO[1]);
      d.deleteColumns(FAMILIES[1], QUALIFIERS_TWO[1]);
      this.region.delete(d, null, false);
    }
    colsPerRow -= 2;
   
    // Delete the second rows from both groups, one column at a time
    for(byte [] QUALIFIER : QUALIFIERS_ONE) {
      Delete d = new Delete(ROWS_ONE[1]);
      d.deleteColumns(FAMILIES[0], QUALIFIER);
      d.deleteColumns(FAMILIES[1], QUALIFIER);
      this.region.delete(d, null, false);
    }
    for(byte [] QUALIFIER : QUALIFIERS_TWO) {
      Delete d = new Delete(ROWS_TWO[1]);
      d.deleteColumns(FAMILIES[0], QUALIFIER);
      d.deleteColumns(FAMILIES[1], QUALIFIER);
      this.region.delete(d, null, false);
    }
    numRows -= 2;
  }
View Full Code Here

              }
            }
            region.put(put);
            if (val > 0 && val % 47 == 0){
              //System.out.println("put iteration = " + val);
              Delete delete = new Delete(row, (long)val-30, null);
              region.delete(delete, null, true);
            }
            val++;
          }
        } catch (IOException e) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.client.Delete

Copyright © 2018 www.massapicom. 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.