Hi All,
What is the correct way to get the HBase table using the end point
co-processor?
I am using the endpoint coprocessor in HBase for fetching the records .
And here is the code Snippet of how I am getting the internal Scanner
InternalScanner internalScanner =
regionCoprocessorEnv.getRegion().getScanner(scan); List<Cell> results2 =
new ArrayList<Cell>(); boolean hasMore = false; do { if (internalScanner !=
null) hasMore = internalScanner.next(results2); String instance = null; for
(Cell cell : results2) { instance = Bytes
.toString(Bytes.copy(cell.getRowArray(), cell.getRowOffset(),
cell.getRowLength())); } }while (hasMore);
The Question is : Is it the right way to get the Intrnal Scanner ? If so ,
The next Question is why even the simple request to this coprocessor is
loading all regions present on all the Region Servers to process it though
the data I am fetching is not distributed on all over the regions present
as it is the call for the recent data.
And Please suggest me the way to solve this problem . The main issue is it
is simply scanning all the regions so the over all time taken is increasing
.
Thanks in Advance ,
Param.