Package org.apache.hadoop.hbase.client

Examples of org.apache.hadoop.hbase.client.HTable.checkAndDelete()


      public Object run() throws Exception {
        Delete d = new Delete(TEST_ROW);
        d.deleteFamily(TEST_FAMILY);
        Table t = new HTable(conf, TEST_TABLE.getTableName());
        try {
          t.checkAndDelete(TEST_ROW, TEST_FAMILY, TEST_QUALIFIER,
            Bytes.toBytes("test_value"), d);
        } finally {
          t.close();
        }
        return null;
View Full Code Here


      public Object run() throws Exception {
        Delete d = new Delete(TEST_ROW);
        d.deleteFamily(TEST_FAMILY);
        HTable t = new HTable(conf, TEST_TABLE.getTableName());
        try {
          t.checkAndDelete(TEST_ROW, TEST_FAMILY, TEST_QUALIFIER,
            Bytes.toBytes("test_value"), d);
        } finally {
          t.close();
        }
        return null;
View Full Code Here

          new String[] {"hadPreCheckAndDelete",
              "hadPreCheckAndDeleteAfterRowLock", "hadPostCheckAndDelete"},
          tableName,
          new Boolean[] {false, false, false}
          );
      table.checkAndDelete(Bytes.toBytes(0), A, A, A, d);
      verifyMethodResult(SimpleRegionObserver.class,
          new String[] {"hadPreCheckAndDelete",
              "hadPreCheckAndDeleteAfterRowLock", "hadPostCheckAndDelete"},
          tableName,
          new Boolean[] {true, true, true}
View Full Code Here

      public Object run() throws Exception {
        Delete d = new Delete(TEST_ROW);
        d.deleteFamily(TEST_FAMILY);
        HTable t = new HTable(conf, TEST_TABLE.getTableName());
        try {
          t.checkAndDelete(TEST_ROW, TEST_FAMILY, TEST_QUALIFIER,
            Bytes.toBytes("test_value"), d);
        } finally {
          t.close();
        }
        return null;
View Full Code Here

      public Void run() throws Exception {
        HTable t = new HTable(conf, TEST_TABLE.getTableName());
        try {
          Delete d = new Delete(TEST_ROW1);
          d.deleteColumns(TEST_FAMILY1, TEST_Q1, 120);
          t.checkAndDelete(TEST_ROW1, TEST_FAMILY1, TEST_Q1, ZERO, d);
        } finally {
          t.close();
        }
        return null;
      }
View Full Code Here

      public Void run() throws Exception {
        HTable t = new HTable(conf, TEST_TABLE.getTableName());
        try {
          Delete d = new Delete(TEST_ROW1);
          d.deleteColumns(TEST_FAMILY1, TEST_Q1);
          t.checkAndDelete(TEST_ROW1, TEST_FAMILY1, TEST_Q1, ZERO, d);
          fail("user2 should not be allowed to do checkAndDelete");
        } catch (Exception e) {
        } finally {
          t.close();
        }
View Full Code Here

      public Void run() throws Exception {
        HTable t = new HTable(conf, TEST_TABLE.getTableName());
        try {
          Delete d = new Delete(TEST_ROW1);
          d.deleteColumn(TEST_FAMILY1, TEST_Q2, 120);
          t.checkAndDelete(TEST_ROW1, TEST_FAMILY1, TEST_Q2, ZERO, d);
        } finally {
          t.close();
        }
        return null;
      }
View Full Code Here

      public Object run() throws Exception {
        Delete d = new Delete(Bytes.toBytes("random_row"));
        d.deleteFamily(TEST_FAMILY);

        HTable t = new HTable(conf, TEST_TABLE);
        t.checkAndDelete(Bytes.toBytes("random_row"), TEST_FAMILY, Bytes.toBytes("q"),
          Bytes.toBytes("test_value"), d);
        return null;
      }
    };
    verifyReadWrite(checkAndDeleteAction);
View Full Code Here

      public Void run() throws Exception {
        Table t = new HTable(conf, TEST_TABLE.getTableName());
        try {
          Delete d = new Delete(TEST_ROW1);
          d.deleteColumns(TEST_FAMILY1, TEST_Q1, 120);
          t.checkAndDelete(TEST_ROW1, TEST_FAMILY1, TEST_Q1, ZERO, d);
        } finally {
          t.close();
        }
        return null;
      }
View Full Code Here

      public Void run() throws Exception {
        Table t = new HTable(conf, TEST_TABLE.getTableName());
        try {
          Delete d = new Delete(TEST_ROW1);
          d.deleteColumns(TEST_FAMILY1, TEST_Q1);
          t.checkAndDelete(TEST_ROW1, TEST_FAMILY1, TEST_Q1, ZERO, d);
          fail("user2 should not be allowed to do checkAndDelete");
        } catch (Exception e) {
        } finally {
          t.close();
        }
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.