Using the HTable Class

Abstract

The checkAndPut() method in the HTable class is used to put data in a table if a row/column family/column qualifier > value matches an expected value. If it does, a new value specified with a Put is put in the table. If not, the new value is not put. The method returns true if the new value is put and returns false if the new value is not put. Before discussing the checkAndPut() method, however, let’s discuss the put(Put put) method, which puts data without first performing a check.