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

ASF GitHub Bot commented on PHOENIX-6907:
-----------------------------------------

jpisaac commented on code in PR #1598:
URL: https://github.com/apache/phoenix/pull/1598#discussion_r1245728781


##########
phoenix-core/src/main/java/org/apache/phoenix/iterate/ExplainTable.java:
##########
@@ -46,27 +61,37 @@
 import org.apache.phoenix.parse.HintNode.Hint;
 import org.apache.phoenix.query.KeyRange;
 import org.apache.phoenix.query.KeyRange.Bound;
+import org.apache.phoenix.query.QueryServices;
+import org.apache.phoenix.query.QueryServicesOptions;
 import org.apache.phoenix.schema.PColumn;
 import org.apache.phoenix.schema.RowKeySchema;
 import org.apache.phoenix.schema.SortOrder;
 import org.apache.phoenix.schema.TableRef;
 import org.apache.phoenix.schema.types.PDataType;
 import org.apache.phoenix.schema.types.PInteger;
+import 
org.apache.phoenix.thirdparty.com.google.common.util.concurrent.ThreadFactoryBuilder;
 import org.apache.phoenix.util.MetaDataUtil;
 import org.apache.phoenix.util.ScanUtil;
 import org.apache.phoenix.util.StringUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 public abstract class ExplainTable {
+
+    private static final Logger LOGGER = 
LoggerFactory.getLogger(ExplainTable.class);
     private static final List<KeyRange> EVERYTHING = 
Collections.singletonList(KeyRange.EVERYTHING_RANGE);
     public static final String POINT_LOOKUP_ON_STRING = "POINT LOOKUP ON ";
+    public static final String REGION_LOCATIONS = " (region locations = ";
+
     protected final StatementContext context;
     protected final TableRef tableRef;
     protected final GroupBy groupBy;
     protected final OrderBy orderBy;
     protected final HintNode hint;
     protected final Integer limit;
     protected final Integer offset;
+    private final ExecutorService executorService;

Review Comment:
   Why do we need an executor and async processing?





> Explain Plan should output region locations with servers
> --------------------------------------------------------
>
>                 Key: PHOENIX-6907
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6907
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Viraj Jasani
>            Assignee: Viraj Jasani
>            Priority: Major
>             Fix For: 5.2.0, 5.1.4
>
>
> As of today, explain plan provides details related to scan key range size, 
> size of the scan lists (for parallel scans), hints, client/server sorted by, 
> order by, server filter etc. It provides as much close details to the 
> physical plans as possible.
> If we could also make explain plan output to include region locations that 
> also contains regionserver details on which the region is currently residing, 
> this might turn out to be really good insights. For full table scans, this 
> also means that we would end up including very higher number of region 
> locations and it would not be ideal to print all of them in the output. We 
> can enforce a limit on the num of region locations to print (default value 
> could be 10 or so). For point lookup and range scans, we can find the region 
> locations with regionserver as quite useful for the real time analysis of 
> slowness experienced by the given query.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to