hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-9447) Metastore: inefficient Oracle query for removing unused column descriptors when add/drop table/partition
Date Wed, 25 Oct 2017 13:05:00 GMT

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

Hive QA commented on HIVE-9447:
-------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12893047/HIVE-9447.3.patch

{color:red}ERROR:{color} -1 due to build exiting with an error

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/7483/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/7483/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-7483/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Tests exited with: NonZeroExitCodeException
Command 'bash /data/hiveptest/working/scratch/source-prep.sh' failed with exit status 1 and
output '+ date '+%Y-%m-%d %T.%3N'
2017-10-25 13:04:39.782
+ [[ -n /usr/lib/jvm/java-8-openjdk-amd64 ]]
+ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+ JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+ export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
+ export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m '
+ ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m '
+ export 'MAVEN_OPTS=-Xmx1g '
+ MAVEN_OPTS='-Xmx1g '
+ cd /data/hiveptest/working/
+ tee /data/hiveptest/logs/PreCommit-HIVE-Build-7483/source-prep.txt
+ [[ false == \t\r\u\e ]]
+ mkdir -p maven ivy
+ [[ git = \s\v\n ]]
+ [[ git = \g\i\t ]]
+ [[ -z master ]]
+ [[ -d apache-github-source-source ]]
+ [[ ! -d apache-github-source-source/.git ]]
+ [[ ! -d apache-github-source-source ]]
+ date '+%Y-%m-%d %T.%3N'
2017-10-25 13:04:39.785
+ cd apache-github-source-source
+ git fetch origin
+ git reset --hard HEAD
HEAD is now at 954f832 HIVE-15104: Hive on Spark generate more shuffle data than hive on mr
(Rui reviewed by Xuefu)
+ git clean -f -d
Removing ql/src/java/org/apache/hadoop/hive/ql/exec/repl/bootstrap/DependencyCollectionFunction.java
Removing ql/src/java/org/apache/hadoop/hive/ql/exec/util/
Removing standalone-metastore/src/gen/org/
+ git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
+ git reset --hard origin/master
HEAD is now at 954f832 HIVE-15104: Hive on Spark generate more shuffle data than hive on mr
(Rui reviewed by Xuefu)
+ git merge --ff-only origin/master
Already up-to-date.
+ date '+%Y-%m-%d %T.%3N'
2017-10-25 13:04:44.573
+ patchCommandPath=/data/hiveptest/working/scratch/smart-apply-patch.sh
+ patchFilePath=/data/hiveptest/working/scratch/build.patch
+ [[ -f /data/hiveptest/working/scratch/build.patch ]]
+ chmod +x /data/hiveptest/working/scratch/smart-apply-patch.sh
+ /data/hiveptest/working/scratch/smart-apply-patch.sh /data/hiveptest/working/scratch/build.patch
error: patch failed: standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:3771
error: standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:
patch does not apply
The patch does not appear to apply with p0, p1, or p2
+ exit 1
'
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12893047 - PreCommit-HIVE-Build

> Metastore: inefficient Oracle query for removing unused column descriptors when add/drop
table/partition
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-9447
>                 URL: https://issues.apache.org/jira/browse/HIVE-9447
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>    Affects Versions: 0.14.0, 1.0.0, 1.2.0, 1.1.0
>            Reporter: Selina Zhang
>            Assignee: Adam Szita
>         Attachments: HIVE-9447.1.patch, HIVE-9447.2.patch, HIVE-9447.3.patch
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> Metastore needs removing unused column descriptors when drop/add partitions or tables.
For query the unused column descriptor, the current implementation utilizes datanuleus' range
function, which basically equals LIMIT syntax. However, Oracle does not support LIMIT, the
query is converted as  
> {quote}
> SQL> SELECT * FROM (SELECT subq.*,ROWNUM rn FROM (SELECT
> 'org.apache.hadoop.hive.metastore.model.MStorageDescriptor' AS
> NUCLEUS_TYPE,A0.INPUT_FORMAT,A0.IS_COMPRESSED,A0.IS_STOREDASSUBDIRECTORIES,A0.LOCATION,
> A0.NUM_BUCKETS,A0.OUTPUT_FORMAT,A0.SD_ID FROM drhcat.SDS A0 
> WHERE A0.CD_ID = ? ) subq ) WHERE  rn <= 1;
> {quote}
> Given that CD_ID is not very selective, this query may have to access large amount of
rows (depends how many partitions the table has, millions of rows in our case). Metastore
may become unresponsive because of this. 
> Since Metastore only needs to know if the specific CD_ID is referenced in SDS table and
does not need access the whole row. We can use 
> {quote}
> select count(1) from SDS where SDS.CD_ID=?
> {quote}
> CD_ID is index column, the above query will do range scan for index, which is faster.

> For other DBs support LIMIT syntax such as MySQL, this problem does not exist. However,
the new query does not hurt.  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message