How can i store and retrieve primitive data types using hbase api.? My task is to save random events on hbase that contains unpredictable data types which are generated randomly. and need to retrieve them after whenever i want? can someone help me out this please. because i'm really new to hbase and this stuff.
相关问题
- Joining two ResultSets from HBase in Java?
- Save CSV file to hbase table using Spark and Phoen
- hbase as database in web application
- thrift hbase client - support filters and coproces
- How to get the region in HBASE which is struck in
相关文章
- hbase-client 2.0.x error
- use protobuf3 with some lib which depends on proto
- Latest compatible version of hadoop and hbase
- Create table in hbase
- Connecting to remote HBase service using Java
- Connecting and Persisting to HBase
- How to configure hbase in spark?
- In Hadoop, where can i change default url ports 50
This is how you put data into a HBase table :
You don't have to worry about the type of the data. However, you need to keep in mind that anything which goes inside HBase goes as an array of bytes. So, while fetching the data back from HBase you need to convert it back into the suitable type because you will be getting a bytearray everytime. This can be done using various overloaded methods provided by the Bytes class. Like this :