Database Reference
In-Depth Information
Here, List can be deined as follows:
List<Delete> deletes = new ArrayList<Delete>();
Delete delete1 = new Delete(Bytes.toBytes("row-1"));
delete1.deleteColumn(Bytes.toBytes("cf1"), Bytes.toBytes("greet"));
deletes.add(delete1);
Another important method deined in the Get class is given as follows:
Methods name
Description
setTimestamp(long timestamp)
This sets the timestamp of delete
As discussed earlier, HBase maintains versions of data for each cell; this principle is
applicable to all the CRUD operations. That is, deleteColumn(…) deletes the speciic
version based on parameters, and deleteColumns(…) deletes all the versions for
a speciied cell. Similarly, the data reading process reads the version of data based
on the parameter values provided.
Summary
In this chapter, we learned the basics of modeling data and some strategies to
consider when designing a table in HBase. We also learned how to perform basic
CRUD operations on the table created using various APIs provided by HBase.
In the next chapter, we will look into HBase table keys, table scan, and some
other advanced features such as ilters.
Search WWH ::




Custom Search