[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16901655#comment-16901655 ] xiepengjie commented on HIVE-22040: --- Thanks [~jdere] for reviewing the patch. > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Standalone Metastore >Affects Versions: 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Fix For: 4.0.0 > > Attachments: HIVE-22040.01.patch, HIVE-22040.02.patch, > HIVE-22040.03.patch, HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The partition's > metadata in mysql has been deleted, but the exception is still thrown. it > will fail if connecting hiveserver2 with jdbc by java, this problem also > exists in master branch, I think it is very unfriendly and we should fix it. > Example: > – First, create manage table with nulti partition columns, and add partitions: > {code:java} > drop table if exists t1; > create table t1 (c1 int) partitioned by (year string, month string, day > string); > alter table t1 add partition(year='2019', month='07', day='01');{code} > – Second, delete the path of partition 'month=07': > {code:java} > hadoop fs -rm -r > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07{code} > -- Third, when i try to drop partition, the metastore throws exception with > 'Failed to delete parent: File does not exist' . > {code:java} > alter table t1 drop partition(year='2019', month='07', day='01'); > {code} > exception like this: > {code:java} > Error: Error while processing statement: FAILED: Execution Error, return code > 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Failed to delete parent: File > does not exist: > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07 > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummaryInt(FSDirStatAndListingOp.java:493) > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummary(FSDirStatAndListingOp.java:140) > at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getContentSummary(FSNamesystem.java:3995) > at > org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getContentSummary(NameNodeRpcServer.java:1202) > at > org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getContentSummary(ClientNamenodeProtocolServerSideTranslatorPB.java:883) > at > org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java) > at > org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2115) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2111) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1867) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2111) > (state=08S01,code=1) > {code} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16901019#comment-16901019 ] Hive QA commented on HIVE-22040: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12976777/HIVE-22040.03.patch {color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified. {color:green}SUCCESS:{color} +1 due to 16723 tests passed Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/18270/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/18270/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-18270/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.YetusPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase {noformat} This message is automatically generated. ATTACHMENT ID: 12976777 - PreCommit-HIVE-Build > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Standalone Metastore >Affects Versions: 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.02.patch, > HIVE-22040.03.patch, HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The partition's > metadata in mysql has been deleted, but the exception is still thrown. it > will fail if connecting hiveserver2 with jdbc by java, this problem also > exists in master branch, I think it is very unfriendly and we should fix it. > Example: > – First, create manage table with nulti partition columns, and add partitions: > {code:java} > drop table if exists t1; > create table t1 (c1 int) partitioned by (year string, month string, day > string); > alter table t1 add partition(year='2019', month='07', day='01');{code} > – Second, delete the path of partition 'month=07': > {code:java} > hadoop fs -rm -r > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07{code} > -- Third, when i try to drop partition, the metastore throws exception with > 'Failed to delete parent: File does not exist' . > {code:java} > alter table t1 drop partition(year='2019', month='07', day='01'); > {code} > exception like this: > {code:java} > Error: Error while processing statement: FAILED: Execution Error, return code > 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Failed to delete parent: File > does not exist: > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07 > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummaryInt(FSDirStatAndListingOp.java:493) > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummary(FSDirStatAndListingOp.java:140) > at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getContentSummary(FSNamesystem.java:3995) > at > org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getContentSummary(NameNodeRpcServer.java:1202) > at > org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getContentSummary(ClientNamenodeProtocolServerSideTranslatorPB.java:883) > at > org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java) > at > org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2115) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2111) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1867) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2111) > (state=08S01,code=1) > {code} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16900975#comment-16900975 ] Hive QA commented on HIVE-22040: | (/) *{color:green}+1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue} 1m 44s{color} | {color:blue} Maven dependency ordering for branch {color} | | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 7m 6s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 39s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 51s{color} | {color:green} master passed {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 2m 30s{color} | {color:blue} standalone-metastore/metastore-common in master has 31 extant Findbugs warnings. {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 4m 6s{color} | {color:blue} ql in master has 2250 extant Findbugs warnings. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 2m 18s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue} 0m 27s{color} | {color:blue} Maven dependency ordering for patch {color} | | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 2m 0s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 37s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 37s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 49s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 6m 55s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 2m 16s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:green}+1{color} | {color:green} asflicense {color} | {color:green} 0m 14s{color} | {color:green} The patch does not generate ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 35m 20s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | Optional Tests | asflicense javac javadoc findbugs checkstyle compile | | uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux | | Build tool | maven | | Personality | /data/hiveptest/working/yetus_PreCommit-HIVE-Build-18270/dev-support/hive-personality.sh | | git revision | master / 4510efd | | Default Java | 1.8.0_111 | | findbugs | v3.0.0 | | modules | C: standalone-metastore/metastore-common ql U: . | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-18270/yetus.txt | | Powered by | Apache Yetushttp://yetus.apache.org | This message was automatically generated. > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Standalone Metastore >Affects Versions: 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.02.patch, > HIVE-22040.03.patch, HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The partition's > metadata in mysql has been deleted, but the exception is still thrown. it > will fail if connecting hiveserver2 with jdbc by java, this problem also > exists in master branch, I think it is very unfriendly and we should fix it. > Example: > –
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16900081#comment-16900081 ] Hive QA commented on HIVE-22040: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12976692/HIVE-22040.03.patch {color:red}ERROR:{color} -1 due to build exiting with an error Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/18256/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/18256/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-18256/ 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' 2019-08-05 13:26:12.682 + [[ -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-18256/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' 2019-08-05 13:26:12.685 + cd apache-github-source-source + git fetch origin + git reset --hard HEAD HEAD is now at 212b428 HIVE-22054: Avoid recursive listing to check if a directory is empty (Prabhas Kumar Samanta, reviewed by Steve Loughran and Jason Dere) + git clean -f -d Removing ${project.basedir}/ Removing itests/${project.basedir}/ Removing standalone-metastore/metastore-server/src/gen/ + git checkout master Already on 'master' Your branch is up-to-date with 'origin/master'. + git reset --hard origin/master HEAD is now at 212b428 HIVE-22054: Avoid recursive listing to check if a directory is empty (Prabhas Kumar Samanta, reviewed by Steve Loughran and Jason Dere) + git merge --ff-only origin/master Already up-to-date. + date '+%Y-%m-%d %T.%3N' 2019-08-05 13:26:13.999 + rm -rf ../yetus_PreCommit-HIVE-Build-18256 + mkdir ../yetus_PreCommit-HIVE-Build-18256 + git gc + cp -R . ../yetus_PreCommit-HIVE-Build-18256 + mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-18256/yetus + 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/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java:374 Falling back to three-way merge... Applied patch to 'standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java' with conflicts. Going to apply patch with: git apply -p0 error: patch failed: standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java:374 Falling back to three-way merge... Applied patch to 'standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java' with conflicts. U standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java + result=1 + '[' 1 -ne 0 ']' + rm -rf yetus_PreCommit-HIVE-Build-18256 + exit 1 ' {noformat} This message is automatically generated. ATTACHMENT ID: 12976692 - PreCommit-HIVE-Build > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Standalone Metastore >Affects Versions: 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.02.patch, > HIVE-22040.03.patch, HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not >
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16899706#comment-16899706 ] Jason Dere commented on HIVE-22040: --- FYI, the changes in HIVE-22054 will affect your patch since it replaces isEmpty() with isEmptyDir() which has different implementation (replaces getContentSummary() with listStatus()). But it could still use your changes to catch the FileNotFoundException. > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Standalone Metastore >Affects Versions: 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.02.patch, > HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The partition's > metadata in mysql has been deleted, but the exception is still thrown. it > will fail if connecting hiveserver2 with jdbc by java, this problem also > exists in master branch, I think it is very unfriendly and we should fix it. > Example: > – First, create manage table with nulti partition columns, and add partitions: > {code:java} > drop table if exists t1; > create table t1 (c1 int) partitioned by (year string, month string, day > string); > alter table t1 add partition(year='2019', month='07', day='01');{code} > – Second, delete the path of partition 'month=07': > {code:java} > hadoop fs -rm -r > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07{code} > -- Third, when i try to drop partition, the metastore throws exception with > 'Failed to delete parent: File does not exist' . > {code:java} > alter table t1 drop partition(year='2019', month='07', day='01'); > {code} > exception like this: > {code:java} > Error: Error while processing statement: FAILED: Execution Error, return code > 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Failed to delete parent: File > does not exist: > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07 > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummaryInt(FSDirStatAndListingOp.java:493) > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummary(FSDirStatAndListingOp.java:140) > at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getContentSummary(FSNamesystem.java:3995) > at > org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getContentSummary(NameNodeRpcServer.java:1202) > at > org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getContentSummary(ClientNamenodeProtocolServerSideTranslatorPB.java:883) > at > org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java) > at > org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2115) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2111) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1867) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2111) > (state=08S01,code=1) > {code} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16899704#comment-16899704 ] Jason Dere commented on HIVE-22040: --- Sorry for the late response. Your patch does not apply on master branch because this path in your patch {noformat} --- standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java {noformat} is now the following path on master branch: {noformat} --- standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java {noformat} Are you trying to apply this patch and compile against Hive master branch? I would suggest doing that for this patch. > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Standalone Metastore >Affects Versions: 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.02.patch, > HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The partition's > metadata in mysql has been deleted, but the exception is still thrown. it > will fail if connecting hiveserver2 with jdbc by java, this problem also > exists in master branch, I think it is very unfriendly and we should fix it. > Example: > – First, create manage table with nulti partition columns, and add partitions: > {code:java} > drop table if exists t1; > create table t1 (c1 int) partitioned by (year string, month string, day > string); > alter table t1 add partition(year='2019', month='07', day='01');{code} > – Second, delete the path of partition 'month=07': > {code:java} > hadoop fs -rm -r > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07{code} > -- Third, when i try to drop partition, the metastore throws exception with > 'Failed to delete parent: File does not exist' . > {code:java} > alter table t1 drop partition(year='2019', month='07', day='01'); > {code} > exception like this: > {code:java} > Error: Error while processing statement: FAILED: Execution Error, return code > 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Failed to delete parent: File > does not exist: > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07 > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummaryInt(FSDirStatAndListingOp.java:493) > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummary(FSDirStatAndListingOp.java:140) > at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getContentSummary(FSNamesystem.java:3995) > at > org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getContentSummary(NameNodeRpcServer.java:1202) > at > org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getContentSummary(ClientNamenodeProtocolServerSideTranslatorPB.java:883) > at > org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java) > at > org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2115) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2111) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1867) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2111) > (state=08S01,code=1) > {code} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16895188#comment-16895188 ] xiepengjie commented on HIVE-22040: --- Hi [~jdere], could you please help me to review this error which "does not exist in index"? However i checkout a branch from remote branch which named branch-3, and the test is running successed in local environment by command "mvn test -Dtest=TestCliDriver -Dqfile=drop_deleted_partitions.q -Dtest.output.overwrite=true". > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Standalone Metastore >Affects Versions: 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.02.patch, > HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The partition's > metadata in mysql has been deleted, but the exception is still thrown. it > will fail if connecting hiveserver2 with jdbc by java, this problem also > exists in master branch, I think it is very unfriendly and we should fix it. > Example: > – First, create manage table with nulti partition columns, and add partitions: > {code:java} > drop table if exists t1; > create table t1 (c1 int) partitioned by (year string, month string, day > string); > alter table t1 add partition(year='2019', month='07', day='01');{code} > – Second, delete the path of partition 'month=07': > {code:java} > hadoop fs -rm -r > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07{code} > -- Third, when i try to drop partition, the metastore throws exception with > 'Failed to delete parent: File does not exist' . > {code:java} > alter table t1 drop partition(year='2019', month='07', day='01'); > {code} > exception like this: > {code:java} > Error: Error while processing statement: FAILED: Execution Error, return code > 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Failed to delete parent: File > does not exist: > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07 > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummaryInt(FSDirStatAndListingOp.java:493) > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummary(FSDirStatAndListingOp.java:140) > at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getContentSummary(FSNamesystem.java:3995) > at > org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getContentSummary(NameNodeRpcServer.java:1202) > at > org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getContentSummary(ClientNamenodeProtocolServerSideTranslatorPB.java:883) > at > org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java) > at > org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2115) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2111) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1867) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2111) > (state=08S01,code=1) > {code} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16895172#comment-16895172 ] Hive QA commented on HIVE-22040: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12976110/HIVE-22040.02.patch {color:red}ERROR:{color} -1 due to build exiting with an error Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/18192/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/18192/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-18192/ 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' 2019-07-29 11:49:53.343 + [[ -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-18192/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' 2019-07-29 11:49:53.346 + cd apache-github-source-source + git fetch origin >From https://github.com/apache/hive 03aae63..97a80c1 master -> origin/master + git reset --hard HEAD HEAD is now at 03aae63 HIVE-21578: Introduce SQL:2016 formats FM, FX, and nested strings (Karen Coppage via Marta Kuczora) + git clean -f -d Removing standalone-metastore/metastore-server/src/gen/ + git checkout master Already on 'master' Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded. (use "git pull" to update your local branch) + git reset --hard origin/master HEAD is now at 97a80c1 HIVE-21999: Add sensitive ABFS configuration properties to HiveConf hidden list (Aron Hamvas via Marta Kuczora) + git merge --ff-only origin/master Already up-to-date. + date '+%Y-%m-%d %T.%3N' 2019-07-29 11:49:54.225 + rm -rf ../yetus_PreCommit-HIVE-Build-18192 + mkdir ../yetus_PreCommit-HIVE-Build-18192 + git gc + cp -R . ../yetus_PreCommit-HIVE-Build-18192 + mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-18192/yetus + 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: standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index error: src/test/queries/clientpositive/drop_deleted_partitions.q: does not exist in index error: src/test/results/clientpositive/drop_deleted_partitions.q.out: does not exist in index error: src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index error: test/queries/clientpositive/drop_deleted_partitions.q: does not exist in index error: test/results/clientpositive/drop_deleted_partitions.q.out: does not exist in index error: main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index The patch does not appear to apply with p0, p1, or p2 + result=1 + '[' 1 -ne 0 ']' + rm -rf yetus_PreCommit-HIVE-Build-18192 + exit 1 ' {noformat} This message is automatically generated. ATTACHMENT ID: 12976110 - PreCommit-HIVE-Build > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Standalone Metastore >Affects Versions: 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.02.patch, > HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist'
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16895087#comment-16895087 ] Hive QA commented on HIVE-22040: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12976103/HIVE-22040.02.patch {color:red}ERROR:{color} -1 due to build exiting with an error Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/18190/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/18190/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-18190/ 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' 2019-07-29 09:05:18.362 + [[ -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-18190/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' 2019-07-29 09:05:18.365 + cd apache-github-source-source + git fetch origin >From https://github.com/apache/hive 4f7feaa..03aae63 master -> origin/master + git reset --hard HEAD HEAD is now at 4f7feaa HIVE-22043: Make LLAP's Yarn package dir on HDFS configurable (Adam Szita, reviewed by Ashutosh Chauhan) + git clean -f -d + git checkout master Already on 'master' Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded. (use "git pull" to update your local branch) + git reset --hard origin/master HEAD is now at 03aae63 HIVE-21578: Introduce SQL:2016 formats FM, FX, and nested strings (Karen Coppage via Marta Kuczora) + git merge --ff-only origin/master Already up-to-date. + date '+%Y-%m-%d %T.%3N' 2019-07-29 09:05:19.848 + rm -rf ../yetus_PreCommit-HIVE-Build-18190 + mkdir ../yetus_PreCommit-HIVE-Build-18190 + git gc + cp -R . ../yetus_PreCommit-HIVE-Build-18190 + mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-18190/yetus + 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: standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index error: src/test/queries/clientpositive/drop_deleted_partitions.q: does not exist in index error: src/test/results/clientpositive/drop_deleted_partitions.q.out: does not exist in index error: src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index error: test/queries/clientpositive/drop_deleted_partitions.q: does not exist in index error: test/results/clientpositive/drop_deleted_partitions.q.out: does not exist in index error: main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index The patch does not appear to apply with p0, p1, or p2 + result=1 + '[' 1 -ne 0 ']' + rm -rf yetus_PreCommit-HIVE-Build-18190 + exit 1 ' {noformat} This message is automatically generated. ATTACHMENT ID: 12976103 - PreCommit-HIVE-Build > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Metastore >Affects Versions: 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.02.patch, > HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The partition's > metadata
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16895042#comment-16895042 ] Hive QA commented on HIVE-22040: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12976096/HIVE-22040.02.patch {color:red}ERROR:{color} -1 due to build exiting with an error Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/18189/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/18189/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-18189/ 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' 2019-07-29 08:07:54.963 + [[ -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-18189/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' 2019-07-29 08:07:54.966 + cd apache-github-source-source + git fetch origin + git reset --hard HEAD HEAD is now at 4f7feaa HIVE-22043: Make LLAP's Yarn package dir on HDFS configurable (Adam Szita, reviewed by Ashutosh Chauhan) + git clean -f -d Removing ${project.basedir}/ Removing itests/${project.basedir}/ Removing standalone-metastore/metastore-server/src/gen/ + git checkout master Already on 'master' Your branch is up-to-date with 'origin/master'. + git reset --hard origin/master HEAD is now at 4f7feaa HIVE-22043: Make LLAP's Yarn package dir on HDFS configurable (Adam Szita, reviewed by Ashutosh Chauhan) + git merge --ff-only origin/master Already up-to-date. + date '+%Y-%m-%d %T.%3N' 2019-07-29 08:07:56.073 + rm -rf ../yetus_PreCommit-HIVE-Build-18189 + mkdir ../yetus_PreCommit-HIVE-Build-18189 + git gc + cp -R . ../yetus_PreCommit-HIVE-Build-18189 + mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-18189/yetus + 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: standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index error: src/test/queries/clientpositive/drop_deleted_partitions.q: does not exist in index error: src/test/results/clientpositive/drop_deleted_partitions.q.out: does not exist in index error: src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index error: test/queries/clientpositive/drop_deleted_partitions.q: does not exist in index error: test/results/clientpositive/drop_deleted_partitions.q.out: does not exist in index error: main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index The patch does not appear to apply with p0, p1, or p2 + result=1 + '[' 1 -ne 0 ']' + rm -rf yetus_PreCommit-HIVE-Build-18189 + exit 1 ' {noformat} This message is automatically generated. ATTACHMENT ID: 12976096 - PreCommit-HIVE-Build > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Metastore >Affects Versions: 1.2.1, 2.0.0, 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.02.patch, > HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The partition's > metadata in mysql has been
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16895015#comment-16895015 ] xiepengjie commented on HIVE-22040: --- Hi, Jason Dere, Thanks for your replay. HIVE-17472 has fixed the the bug of dropping partition which the data's path do not exist, maybe the case of HIVE-17472 is different from mine, the issue of mine invoked when dropped partition which the data's parent path do not exist. Perhaps this exception throwed because the function org.apache.hadoop.hive.metastore.Warehouse#isEmpty does not catch the exception of FNFE. > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Metastore >Affects Versions: 1.2.1, 2.0.0, 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.02.patch, > HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The partition's > metadata in mysql has been deleted, but the exception is still thrown. it > will fail if connecting hiveserver2 with jdbc by java, this problem also > exists in master branch, I think it is very unfriendly and we should fix it. > Example: > – First, create manage table with nulti partition columns, and add partitions: > {code:java} > drop table if exists t1; > create table t1 (c1 int) partitioned by (year string, month string, day > string); > alter table t1 add partition(year='2019', month='07', day='01');{code} > – Second, delete the path of partition 'month=07': > {code:java} > hadoop fs -rm -r > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07{code} > -- Third, when i try to drop partition, the metastore throws exception with > 'Failed to delete parent: File does not exist' . > {code:java} > alter table t1 drop partition(year='2019', month='07', day='01'); > {code} > exception like this: > {code:java} > Error: Error while processing statement: FAILED: Execution Error, return code > 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Failed to delete parent: File > does not exist: > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07 > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummaryInt(FSDirStatAndListingOp.java:493) > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummary(FSDirStatAndListingOp.java:140) > at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getContentSummary(FSNamesystem.java:3995) > at > org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getContentSummary(NameNodeRpcServer.java:1202) > at > org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getContentSummary(ClientNamenodeProtocolServerSideTranslatorPB.java:883) > at > org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java) > at > org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2115) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2111) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1867) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2111) > (state=08S01,code=1) > {code} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16894833#comment-16894833 ] Jason Dere commented on HIVE-22040: --- Hi [~xiepengjie], thanks for submitting the patch. What version of Hive are you working with? The patch does not apply on Hive master because the source files are now in standalone-metastore/metastore-server and standalone-metastore/metastore-common on master. I also was not able to get TestDropPartitions to run properly on master branch .. it seems like there have been some changes to how this test is run, that I am not aware of. I would recommend adding the following qfile test to TestMiniLlapCliDriver, to simulate the failure scenario you mentioned: {noformat} create table delete_parent_path (c1 int) partitioned by (year string, month string, day string) location 'hdfs:///tmp/delete_parent_path'; alter table delete_parent_path add partition (year='2019', month='07', day='01'); dfs -rm -r hdfs:///tmp/delete_parent_path/year=2019/month=07; alter table delete_parent_path drop partition (year='2019', month='07', day='01'); {noformat} However I noticed that this no longer fails on Hive master. It seems like this has been fixed by HIVE-17472. I do agree with the change that you made in Warehouse.isEmpty(), if you could either remove the existing test case or replace it with the one I suggested. > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Metastore >Affects Versions: 1.2.1, 2.0.0, 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The partition's > metadata in mysql has been deleted, but the exception is still thrown. it > will fail if connecting hiveserver2 with jdbc by java, this problem also > exists in master branch, I think it is very unfriendly and we should fix it. > Example: > – First, create manage table with nulti partition columns, and add partitions: > {code:java} > drop table if exists t1; > create table t1 (c1 int) partitioned by (year string, month string, day > string); > alter table t1 add partition(year='2019', month='07', day='01');{code} > – Second, delete the path of partition 'month=07': > {code:java} > hadoop fs -rm -r > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07{code} > -- Third, when i try to drop partition, the metastore throws exception with > 'Failed to delete parent: File does not exist' . > {code:java} > alter table t1 drop partition partition(year='2019', month='07', day='01'); > {code} > exception like this: > {code:java} > Error: Error while processing statement: FAILED: Execution Error, return code > 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Failed to delete parent: File > does not exist: > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07 > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummaryInt(FSDirStatAndListingOp.java:493) > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummary(FSDirStatAndListingOp.java:140) > at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getContentSummary(FSNamesystem.java:3995) > at > org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getContentSummary(NameNodeRpcServer.java:1202) > at > org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getContentSummary(ClientNamenodeProtocolServerSideTranslatorPB.java:883) > at > org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java) > at > org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2115) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2111) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1867) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2111) > (state=08S01,code=1) > {code} -- This message was sent by Atlassian JIRA
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16894163#comment-16894163 ] Hive QA commented on HIVE-22040: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12975959/HIVE-22040.01.patch {color:red}ERROR:{color} -1 due to build exiting with an error Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/18176/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/18176/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-18176/ 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' 2019-07-26 22:10:55.227 + [[ -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-18176/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' 2019-07-26 22:10:55.230 + cd apache-github-source-source + git fetch origin >From https://github.com/apache/hive f7f7c58..4f7feaa master -> origin/master + git reset --hard HEAD HEAD is now at f7f7c58 HIVE-12971: Hive Support for Kudu (Grant Henke, reviewed by Jesus Camacho Rodriguez) + git clean -f -d Removing standalone-metastore/metastore-server/src/gen/ + git checkout master Already on 'master' Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded. (use "git pull" to update your local branch) + git reset --hard origin/master HEAD is now at 4f7feaa HIVE-22043: Make LLAP's Yarn package dir on HDFS configurable (Adam Szita, reviewed by Ashutosh Chauhan) + git merge --ff-only origin/master Already up-to-date. + date '+%Y-%m-%d %T.%3N' 2019-07-26 22:10:58.361 + rm -rf ../yetus_PreCommit-HIVE-Build-18176 + mkdir ../yetus_PreCommit-HIVE-Build-18176 + git gc + cp -R . ../yetus_PreCommit-HIVE-Build-18176 + mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-18176/yetus + 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: standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index error: standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java: does not exist in index error: src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index error: src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java: does not exist in index error: main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index error: test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java: does not exist in index The patch does not appear to apply with p0, p1, or p2 + result=1 + '[' 1 -ne 0 ']' + rm -rf yetus_PreCommit-HIVE-Build-18176 + exit 1 ' {noformat} This message is automatically generated. ATTACHMENT ID: 12975959 - PreCommit-HIVE-Build > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Metastore >Affects Versions: 1.2.1, 2.0.0, 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16893649#comment-16893649 ] xiepengjie commented on HIVE-22040: --- [~jdere] hi, Could you help me to review this patch? > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Metastore >Affects Versions: 1.2.1, 2.0.0, 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.01.patch, HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The partition's > metadata in mysql has been deleted, but the exception is still thrown. it > will fail if connecting hiveserver2 with jdbc by java, this problem also > exists in master branch, I think it is very unfriendly and we should fix it. > Example: > – First, create manage table with nulti partition columns, and add partitions: > {code:java} > drop table if exists t1; > create table t1 (c1 int) partitioned by (year string, month string, day > string); > alter table t1 add partition(year='2019', month='07', day='01');{code} > – Second, delete the path of partition 'month=07': > {code:java} > hadoop fs -rm -r > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07{code} > -- Third, when i try to drop partition, the metastore throws exception with > 'Failed to delete parent: File does not exist' . > {code:java} > alter table t1 drop partition partition(year='2019', month='07', day='01'); > {code} > exception like this: > {code:java} > Error: Error while processing statement: FAILED: Execution Error, return code > 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Failed to delete parent: File > does not exist: > /user/hadoop/xiepengjietest.db/drop_partition/year=2019/month=07 > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummaryInt(FSDirStatAndListingOp.java:493) > at > org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getContentSummary(FSDirStatAndListingOp.java:140) > at > org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getContentSummary(FSNamesystem.java:3995) > at > org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getContentSummary(NameNodeRpcServer.java:1202) > at > org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getContentSummary(ClientNamenodeProtocolServerSideTranslatorPB.java:883) > at > org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java) > at > org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616) > at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2115) > at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2111) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:422) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1867) > at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2111) > (state=08S01,code=1) > {code} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (HIVE-22040) Drop partition throws exception with 'Failed to delete parent: File does not exist' when the partition's parent path does not exists
[ https://issues.apache.org/jira/browse/HIVE-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16893465#comment-16893465 ] Hive QA commented on HIVE-22040: Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12975804/HIVE-22040.patch {color:red}ERROR:{color} -1 due to build exiting with an error Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/18172/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/18172/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-18172/ 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' 2019-07-26 08:35:16.271 + [[ -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-18172/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' 2019-07-26 08:35:16.274 + cd apache-github-source-source + git fetch origin + git reset --hard HEAD HEAD is now at f7f7c58 HIVE-12971: Hive Support for Kudu (Grant Henke, reviewed by Jesus Camacho Rodriguez) + git clean -f -d Removing standalone-metastore/metastore-server/src/gen/ + git checkout master Already on 'master' Your branch is up-to-date with 'origin/master'. + git reset --hard origin/master HEAD is now at f7f7c58 HIVE-12971: Hive Support for Kudu (Grant Henke, reviewed by Jesus Camacho Rodriguez) + git merge --ff-only origin/master Already up-to-date. + date '+%Y-%m-%d %T.%3N' 2019-07-26 08:35:17.510 + rm -rf ../yetus_PreCommit-HIVE-Build-18172 + mkdir ../yetus_PreCommit-HIVE-Build-18172 + git gc + cp -R . ../yetus_PreCommit-HIVE-Build-18172 + mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-18172/yetus + 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: standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index error: standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java: does not exist in index error: src/main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index error: src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java: does not exist in index error: main/java/org/apache/hadoop/hive/metastore/Warehouse.java: does not exist in index error: test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java: does not exist in index The patch does not appear to apply with p0, p1, or p2 + result=1 + '[' 1 -ne 0 ']' + rm -rf yetus_PreCommit-HIVE-Build-18172 + exit 1 ' {noformat} This message is automatically generated. ATTACHMENT ID: 12975804 - PreCommit-HIVE-Build > Drop partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exists > > > Key: HIVE-22040 > URL: https://issues.apache.org/jira/browse/HIVE-22040 > Project: Hive > Issue Type: Improvement > Components: Metastore >Affects Versions: 1.2.1, 2.0.0, 3.0.0 >Reporter: xiepengjie >Assignee: xiepengjie >Priority: Major > Attachments: HIVE-22040.patch > > > I create a manage table with multi partition columns, when i try to drop > partition throws exception with 'Failed to delete parent: File does not > exist' when the partition's parent path does not exist. The partition's > metadata in mysql has been deleted, but the exception is still thrown. it > will fail if connecting hiveserver2 with jdbc by java, this problem also > exists in master branch, I think it is