[
https://issues.apache.org/jira/browse/HIVE-25037?focusedWorklogId=587365&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-587365
]
ASF GitHub Bot logged work on HIVE-25037:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 22/Apr/21 16:40
Start Date: 22/Apr/21 16:40
Worklog Time Spent: 10m
Work Description: klcopp commented on a change in pull request #2199:
URL: https://github.com/apache/hive/pull/2199#discussion_r618535888
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
##########
@@ -3739,34 +3743,34 @@ public GetLatestCommittedCompactionInfoResponse
getLatestCommittedCompactionInfo
public MetricsInfo getMetricsInfo() throws MetaException {
Connection dbConn = null;
- Statement stmt = null;
try {
MetricsInfo metrics = new MetricsInfo();
String s = MessageFormat.format(SELECT_METRICS_INFO_QUERY,
getEpochFn(dbProduct));
Review comment:
Can add getEpochFn(dbProduct) to the preparedstatement instead.
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
##########
@@ -290,7 +290,11 @@
TxnStatus.OPEN + "') \"T\" CROSS JOIN (" +
"SELECT COUNT(*), MIN(\"TXN_ID\"), ({0} - MIN(\"TXN_STARTED\"))/1000
FROM \"TXNS\" WHERE \"TXN_STATE\"='" +
TxnStatus.ABORTED + "') \"A\" CROSS JOIN (" +
- "SELECT COUNT(*), ({0} - MIN(\"HL_ACQUIRED_AT\"))/1000 FROM
\"HIVE_LOCKS\") \"HL\"";
+ "SELECT COUNT(*), ({0} - MIN(\"HL_ACQUIRED_AT\"))/1000 FROM
\"HIVE_LOCKS\") \"HL\" CROSS JOIN (" +
+ "SELECT COUNT(*) FROM (SELECT COUNT(\"TXN_ID\"), \"T2W_DATABASE\",
\"T2W_TABLE\" FROM \"TXN_TO_WRITE_ID\" " +
+ "INNER JOIN \"TXNS\" ON \"T2W_TXNID\" = \"TXN_ID\" WHERE
\"TXN_STATE\"='" + TxnStatus.ABORTED + "' " +
+ "GROUP BY \"T2W_DATABASE\", \"T2W_TABLE\" HAVING COUNT(\"TXN_ID\") >
?) \"L\") \"L\"";
Review comment:
Theoretically mysql, postgresql, mssql, derby, and oracle can handle
HAVING clauses but it might be worth it to try it out on all of them.
(There's one use of HAVING already in CompactionTxnHandler but it's very
new.)
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 587365)
Time Spent: 20m (was: 10m)
> Create metric: Number of tables with > x aborts
> -----------------------------------------------
>
> Key: HIVE-25037
> URL: https://issues.apache.org/jira/browse/HIVE-25037
> Project: Hive
> Issue Type: Sub-task
> Reporter: Antal Sinkovits
> Assignee: Antal Sinkovits
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Create metric about number of tables with > x aborts.
> x should be settable and default to 1500.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)