[
https://issues.apache.org/jira/browse/PHOENIX-6211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17260130#comment-17260130
]
ASF GitHub Bot commented on PHOENIX-6211:
-----------------------------------------
gjacoby126 commented on a change in pull request #973:
URL: https://github.com/apache/phoenix/pull/973#discussion_r553021396
##########
File path:
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/PagedRegionScanner.java
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.coprocessor;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.hadoop.hbase.Cell;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.regionserver.Region;
+import org.apache.hadoop.hbase.regionserver.RegionScanner;
+import org.apache.phoenix.filter.PagedFilter;
+
+import static org.apache.phoenix.util.ScanUtil.getDummyResult;
+import static org.apache.phoenix.util.ScanUtil.getPhoenixPagedFilter;
+
+public class PagedRegionScanner extends BaseRegionScanner {
+ protected Region region;
+ protected Scan scan;
+ protected PagedFilter pageFilter;
+ public PagedRegionScanner(Region region, RegionScanner scanner, Scan
scan) {
+ super(scanner);
+ this.region = region;
+ this.scan = scan;
+ pageFilter = getPhoenixPagedFilter(scan);
+ if (pageFilter != null) {
+ pageFilter.init();
+ }
+ }
+
+ private boolean next(List<Cell> results, boolean raw) throws IOException {
+ try {
+ boolean hasMore = raw ? delegate.nextRaw(results) :
delegate.next(results);
+ if (pageFilter == null) {
+ return hasMore;
+ }
+ if (!hasMore) {
Review comment:
@kadirozde - A little confused here: shouldn't we just be resetting the
page filter start time if we DON'T have more to read and setting up the scan to
resume later if we DO have more to read? the hasMore check is backwards from
what I'd expect.
##########
File path: phoenix-core/src/it/java/org/apache/phoenix/end2end/ViewTTLIT.java
##########
@@ -2596,4 +2606,119 @@ private void deleteIndexData(boolean
useGlobalConnection,
return testCases;
}
+
+ @Test
+ public void testPR() throws Exception {
Review comment:
From speaking with @kadirozde and @jpisaac offline it appears this test
was included by mistake and should be removed.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Paged scan filters
> ------------------
>
> Key: PHOENIX-6211
> URL: https://issues.apache.org/jira/browse/PHOENIX-6211
> Project: Phoenix
> Issue Type: Improvement
> Affects Versions: 5.0.0, 4.14.3
> Reporter: Kadir OZDEMIR
> Assignee: Kadir OZDEMIR
> Priority: Critical
> Fix For: 4.16.0
>
> Attachments: PHOENIX-6211.4.x.001.patch, PHOENIX-6211.4.x.002.patch,
> PHOENIX-6211.master.001.patch, PHOENIX-6211.master.002.patch,
> PHOENIX-6211.master.003.patch, PHOENIX-6211.master.004.patch,
> PHOENIX-6211.master.005.patch, PHOENIX-6211.master.006.patch,
> PHOENIX-6211.master.007.patch, PHOENIX-6211.master.008.patch,
> PHOENIX-6211.master.009.patch
>
>
> Phoenix performs two main operations on the server side: aggregation and
> filtering. However, currently there is no internal Phoenix paging capability,
> and thus server side operations can take long enough to lead to HBase client
> timeouts. PHOENIX-5998 and PHOENIX-6207 are for providing the paging
> capability for ungrouped and grouped aggregate operations. This improvement
> Jira is for adding the paging capability for scan filters.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)