[ 
https://issues.apache.org/jira/browse/HBASE-13984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14736159#comment-14736159
 ] 

stack commented on HBASE-13984:
-------------------------------

bq. What is the expected behavior if the user want peek next and also accept 
partial? Since the kvs in the store heap and the joint heap are not in sort 
order, so what should the next be if the time limit is reached between scanning 
two heaps? Looks like next cell is applicable only for non-partial results.

Pardon. Missed this. I don't follow... 'not in sort order'.... why when we pull 
the Cells off are we not in sort order. When you say two heaps, you mean two 
Stores?

I think you need to change the names of these methods:

+  /**
+   * @return Return the next cell when the most recent RPC response was a 
heartbeat message and
+   *         the server is only allowed break at row boundary. If the next 
cell is beyond the
+   *         scan range, null will be returned.
+   */
+  protected Cell getNextCell() {
+    return nextCell;
+  }
+
+  protected void setNextCell(Cell nextCell) {
+    this.nextCell = nextCell;
+  }

They are only in effect when heartbeating is going on... so 
getHeartbeatNextCell ...

and ditto here:

+  optional Cell next = 11;

should be hearbeatNext.... so stuff is tied together.

Is this peeking going to mess up the Scan in HRegion or I suppose it will be 
expensive... will slow scan (but only when this feature is enabled)?

+          Cell nextKv = this.storeHeap.peek();

Otherwise patch is good. Needs a nice release note so folks know how to use it.

Let me rerun the patch build. Was hung....(infra, not your patch)

> Add option to allow caller to know the heartbeat and scanner position when 
> scanner timeout
> ------------------------------------------------------------------------------------------
>
>                 Key: HBASE-13984
>                 URL: https://issues.apache.org/jira/browse/HBASE-13984
>             Project: HBase
>          Issue Type: Improvement
>          Components: Scanners
>            Reporter: He Liangliang
>            Assignee: He Liangliang
>         Attachments: HBASE-13984-V1.diff, HBASE-13984-V2.diff, 
> HBASE-13984-V3.diff, HBASE-13984-V3.patch
>
>
> HBASE-13090 introduced scanner heartbeat. However, there are still some 
> limitations (see HBASE-13215). In some application, for example, an operation 
> access hbase to scan table data, and there is strict limit that this call 
> must return in a fixed interval. At the same time, this call is stateless, so 
> the call must return the next position to continue the scan. This is typical 
> use case for online applications.
> Based on this requirement, some improvements are proposed:
> 1. Allow client set a flag whether pass the heartbeat (a result contains the 
> scanner position) to the caller (via ResultScanner next)
> 2. Allow the client pass a timeout to the server, which can override the 
> server side default value
> 3. When requested by the client, the server peek the next cell and return to 
> the client in the heartbeat message



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to