hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: What is the correct way to get the HBase table using the end point co-processor?
Date Tue, 06 Dec 2016 18:10:49 GMT
Please take a look at:
hbase-endpoint/src/main/java/org/apache/hadoop/hbase/coprocessor/AggregateImplementation.java

Can you tell us more about how the scan object is formed (I assume you have
set start / stop rows) ?

Cheers

On Tue, Dec 6, 2016 at 10:07 AM, Paramesh Nc <parameswarnc@gmail.com> wrote:

> 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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message