How to run HBase utility class from Java

Suppose you need to run HBase utility class from Java code. Such a class will have a main() method, which we will use. For demonstrating, we will use RowSplitter class. Firstly, we need to add the hbase-server module (for example, version 1.2.3) to pom.xml: In some our own class, let’s call RegionSplitter’s main(): If you […]

READ MORE

HBase default SCAN parameters

If you are looking for default scan request parameters, here they are: Parameter Default value startRow HConstants.EMPTY_START_ROW stopRow HConstants.EMPTY_END_ROW maxVersions 1 batch -1 allowPartialResults false storeLimit -1 storeOffset 0 caching -1 maxResultSize -1L cacheBlocks true reversed false timeRange TimeRange.allTime() asyncPrefetch null small false mvccReadPoint -1L limit -1 readType Scan.ReadType.DEFAULT needCursorResult false

READ MORE

HBase client 1.x with gRPC

Imagine, that you need to use the HBase client 1.x and gRPC in the same Java application. The code for connecting dependencies to Maven will look something like this: If you run the application and execute the request through the HBase client, there will be an exception: The problem is that hbase-client 1.x uses an earlier […]

READ MORE