Examples of Delete


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

  @Test
  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

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

        return null;
      }
    };
    PrivilegedExceptionAction deleteActionAll = new PrivilegedExceptionAction() {
      public Object run() throws Exception {
        Delete d = new Delete(Bytes.toBytes("random_row"));
        d.deleteFamily(family1);
        d.deleteFamily(family2);
        HTable t = new HTable(conf, tableName);
        try {
          t.delete(d);
        } finally {
          t.close();
        }
        return null;
      }
    };
    PrivilegedExceptionAction deleteAction1 = new PrivilegedExceptionAction() {
      public Object run() throws Exception {
        Delete d = new Delete(Bytes.toBytes("random_row"));
        d.deleteFamily(family1);
        HTable t = new HTable(conf, tableName);
        try {
          t.delete(d);
        } finally {
          t.close();
        }
        return null;
      }
    };
    PrivilegedExceptionAction deleteAction2 = new PrivilegedExceptionAction() {
      public Object run() throws Exception {
        Delete d = new Delete(Bytes.toBytes("random_row"));
        d.deleteFamily(family2);
        HTable t = new HTable(conf, tableName);
        try {
          t.delete(d);
        } finally {
          t.close();
View Full Code Here

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

        return null;
      }
    };
    PrivilegedExceptionAction deleteQualifierAction = new PrivilegedExceptionAction() {
      public Object run() throws Exception {
        Delete d = new Delete(Bytes.toBytes("random_row"));
        d.deleteColumn(family1, qualifier);
        // d.deleteFamily(family1);
        HTable t = new HTable(conf, tableName);
        try {
          t.delete(d);
        } finally {
View Full Code Here

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

          HBaseFsck.debugLsr(conf, p);
        }

        if (metaRow) {
          HTable meta = new HTable(conf, HConstants.META_TABLE_NAME);
          Delete delete = new Delete(deleteRow);
          meta.delete(delete);
        }
      }
      LOG.info(hri.toString() + hsa.toString());
    }
View Full Code Here

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

      // Delete daughter regions from meta, but not hdfs, unassign it.
      Map<HRegionInfo, ServerName> hris = tbl.getRegionLocations();
      undeployRegion(admin, hris.get(daughters.getFirst()), daughters.getFirst());
      undeployRegion(admin, hris.get(daughters.getSecond()), daughters.getSecond());

      meta.delete(new Delete(daughters.getFirst().getRegionName()));
      meta.delete(new Delete(daughters.getSecond().getRegionName()));
      meta.flushCommits();

      HBaseFsck hbck = doFsck(conf, false);
      assertErrors(hbck, new ERROR_CODE[] {ERROR_CODE.NOT_IN_META_OR_DEPLOYED,
          ERROR_CODE.NOT_IN_META_OR_DEPLOYED, ERROR_CODE.HOLE_IN_REGION_CHAIN}); //no LINGERING_SPLIT_PARENT
View Full Code Here

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

   * @param writeToWAL
   * @throws IOException
   */
  void delete(Map<byte[], List<KeyValue>> familyMap, UUID clusterId,
      boolean writeToWAL) throws IOException {
    Delete delete = new Delete();
    delete.setFamilyMap(familyMap);
    delete.setClusterId(clusterId);
    delete.setWriteToWAL(writeToWAL);
    internalDelete(delete, clusterId, writeToWAL);
  }
View Full Code Here

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

          // originating cluster. A slave cluster receives the result as a Put
          // or Delete
          if (isPut) {
            internalPut(((Put) w), HConstants.DEFAULT_CLUSTER_ID, writeToWAL);
          } else {
            Delete d = (Delete)w;
            prepareDelete(d);
            internalDelete(d, HConstants.DEFAULT_CLUSTER_ID, writeToWAL);
          }
          return true;
        }
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.GetDeleteTracker.Delete

   
    empty = new byte[0];

    //ts1
    ts1 = System.nanoTime();
    del10 = new Delete(col1, 0, col1Len, del, ts1);
    del11 = new Delete(col2, 0, col2Len, del, ts1);
    delQf10 = new Delete(col1, 0, col1Len, delCol, ts1);
    delQf11 = new Delete(col2, 0, col2Len, delCol, ts1);
    delFam10 = new Delete(empty, 0, 0, delFam, ts1);
   
    //ts2
    ts2 = System.nanoTime();
    del20 = new Delete(col1, 0, col1Len, del, ts2);
    del21 = new Delete(col2, 0, col2Len, del, ts2);
    delQf20 = new Delete(col1, 0, col1Len, delCol, ts2);
    delQf21 = new Delete(col2, 0, col2Len, delCol, ts2);
    delFam20 = new Delete(empty, 0, 0, delFam, ts1);
   
    //ts3
    ts3 = System.nanoTime();
    del30 = new Delete(col1, 0, col1Len, del, ts3);
  }
View Full Code Here

Examples of org.apache.jackrabbit.vault.vlt.actions.Delete

        List<File> localFiles = app.getPlatformFiles(localPaths, false);
        File localDir = app.getPlatformFile("", true);
        VltContext vCtx = app.createVaultContext(localDir);
        vCtx.setVerbose(cl.hasOption(OPT_VERBOSE));
        vCtx.setQuiet(cl.hasOption(OPT_QUIET));
        Delete d = new Delete(localDir, localFiles, false, cl.hasOption(optForce));
        vCtx.execute(d);
    }
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Delete

    zip.setTaskName(getTaskName() + " - zip");
    FileSet fileset = new FileSet();
    fileset.setDir(dir);
    zip.addFileset(fileset);
    zip.execute();
    Delete delete = new Delete();
    delete.setProject(getProject());
    delete.setTaskName(getTaskName() + " - delete");
    delete.setDir(dir);
    delete.execute();
    Mkdir mkdir = new Mkdir();
    mkdir.setProject(getProject());
    mkdir.setTaskName(getTaskName() + " - mkdir");
    mkdir.setDir(dir);
    mkdir.execute();
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.