You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/11/03 13:32:00 UTC
[jira] [Commented] (PHOENIX-6127) Prevent unnecessary HBase admin
API calls in ViewUtil.getSystemTableForChildLinks() and act lazily instead
[ https://issues.apache.org/jira/browse/PHOENIX-6127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17225364#comment-17225364 ]
ASF GitHub Bot commented on PHOENIX-6127:
-----------------------------------------
gjacoby126 commented on a change in pull request #944:
URL: https://github.com/apache/phoenix/pull/944#discussion_r516342109
##########
File path: phoenix-core/src/main/java/org/apache/phoenix/util/ServerUtil.java
##########
@@ -225,6 +227,21 @@ public static Table getHTableForCoprocessorScan (RegionCoprocessorEnvironment en
}
return getTableFromSingletonPool(env, tableName);
}
+
+ public static Table getHTableSystemChildLink (RegionCoprocessorEnvironment env) throws IOException {
+ if (coprocessorScanWorks(env)) {
Review comment:
Looks like coprocessorScanWorks will return true for any HBase version >= 0.98.6, and the earliest version we currently support is 1.3. Can we rid of the getTableFromSingletonPool calls?
----------------------------------------------------------------
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:
users@infra.apache.org
> Prevent unnecessary HBase admin API calls in ViewUtil.getSystemTableForChildLinks() and act lazily instead
> ----------------------------------------------------------------------------------------------------------
>
> Key: PHOENIX-6127
> URL: https://issues.apache.org/jira/browse/PHOENIX-6127
> Project: Phoenix
> Issue Type: Improvement
> Affects Versions: 5.0.0, 4.15.0
> Reporter: Chinmay Kulkarni
> Assignee: Richard Antal
> Priority: Major
> Labels: phoenix-hardening, quality-improvement
> Fix For: 5.1.0, 4.16.0
>
> Attachments: PHOENIX-6127.master.v1.patch
>
>
> In order to handle the case of older clients connecting to a 4.16 cluster that has old metadata (no SYSTEM.CHILD_LINK table yet), we call ViewUtil.getSystemTableForChildLinks() to figure out whether to use SYSTEM.CHILD_LINK or SYSTEM.CATALOG to look up parent->child linking rows.
> Here we do HBase table existence checks using HBase admin APIs (see [this|https://github.com/apache/phoenix/blob/e3c7b4bdce2524eb4fd1e7eb0ccd3454fcca81ce/phoenix-core/src/main/java/org/apache/phoenix/util/ViewUtil.java#L265-L269]) which can be avoided. In almost all cases once we've called this API, we later go on and retrieve the Table object anyhow so we can instead try to always get the SYSTEM.CHILD_LINK table and if that fails, try to get SYSTEM.CATALOG. This will avoid additional admin API calls.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)