[
https://issues.apache.org/jira/browse/HIVE-22114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vineet Garg updated HIVE-22114:
-------------------------------
Description:
Following insert query fails when all buckets are empty
{code:sql}
create table src_emptybucket_partitioned_1 (name string, age int, gpa
decimal(3,2))
partitioned by(year int)
clustered by (age)
sorted by (age)
into 100 buckets
stored as orc tblproperties
("transactional"="true", "transactional_properties"="insert_only");
create table src1(name string, age int, gpa decimal(3,2));
insert into src1 values("name", 56, 4);
insert into table src_emptybucket_partitioned_1
partition(year=2015)
select * from src1 limit 0;
{code}
Error:
{noformat}
ERROR : Job Commit failed with exception
'org.apache.hadoop.hive.ql.metadata.HiveException(java.io.FileNotFoundException:
No such file or directory:
s3a:/<s3-location>/warehouse/tablespace/managed/hive/src_emptybucket_partitioned/year=2015)'
# org.apache.hadoop.hive.ql.metadata.HiveException:
java.io.FileNotFoundException: No such file or directory:
s3a://<s3-location>/warehouse/tablespace/managed/hive/src_emptybucket_partitioned/year=2015
at
org.apache.hadoop.hive.ql.exec.FileSinkOperator.jobCloseOp(FileSinkOperator.java:1403)
at org.apache.hadoop.hive.ql.exec.Operator.jobClose(Operator.java:798)
at org.apache.hadoop.hive.ql.exec.Operator.jobClose(Operator.java:803)
at org.apache.hadoop.hive.ql.exec.tez.TezTask.close(TezTask.java:590)
at org.apache.hadoop.hive.ql.exec.tez.TezTask.execute(TezTask.java:327)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:212)
at
org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:103)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2335)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2002)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1674)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1372)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1366)
at
org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157)
at
org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:226)
at
org.apache.hive.service.cli.operation.SQLOperation.access$700(SQLOperation.java:87)
at
org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:324)
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:1730)
at
org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:342)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.FileNotFoundException: No such file or directory:
s3a://<s3-location>/warehouse/tablespace/managed/hive/src_emptybucket_partitioned/year=2015
at
org.apache.hadoop.fs.s3a.S3AFileSystem.s3GetFileStatus(S3AFileSystem.java:2805)
at
org.apache.hadoop.fs.s3a.S3AFileSystem.innerGetFileStatus(S3AFileSystem.java:2694)
at
org.apache.hadoop.fs.s3a.S3AFileSystem.getFileStatus(S3AFileSystem.java:2587)
at
org.apache.hadoop.fs.s3a.S3AFileSystem.innerListStatus(S3AFileSystem.java:2388)
at
org.apache.hadoop.fs.s3a.S3AFileSystem.lambda$listStatus$10(S3AFileSystem.java:2367)
at org.apache.hadoop.fs.s3a.Invoker.once(Invoker.java:109)
at
org.apache.hadoop.fs.s3a.S3AFileSystem.listStatus(S3AFileSystem.java:2367)
at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1880)
at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1922)
at
org.apache.hadoop.hive.ql.exec.Utilities.getMmDirectoryCandidates(Utilities.java:4185)
at
org.apache.hadoop.hive.ql.exec.Utilities.handleMmTableFinalPath(Utilities.java:4386)
at
org.apache.hadoop.hive.ql.exec.FileSinkOperator.jobCloseOp(FileSinkOperator.java:1397)
... 26 more
ERROR : FAILED: Execution Error, return code 3 from
org.apache.hadoop.hive.ql.exec.tez.TezTask
{noformat}
was:
Following insert query fails when all buckets are empty
{code:sql}
set hive.create.as.insert.only=true;
create table src_emptybucket_partitioned_1 (name string, age int, gpa
decimal(3,2))
partitioned by(year int)
clustered by (age)
sorted by (age)
into 100 buckets
stored as orc;
insert into table src_emptybucket_partitioned_1
partition(year=2015)
select * from studenttab10k limit 0;
{code}
Error:
{noformat}
ERROR : Job Commit failed with exception
'org.apache.hadoop.hive.ql.metadata.HiveException(java.io.FileNotFoundException:
No such file or directory:
s3a:/<s3-location>/warehouse/tablespace/managed/hive/src_emptybucket_partitioned/year=2015)'
# org.apache.hadoop.hive.ql.metadata.HiveException:
java.io.FileNotFoundException: No such file or directory:
s3a://<s3-location>/warehouse/tablespace/managed/hive/src_emptybucket_partitioned/year=2015
at
org.apache.hadoop.hive.ql.exec.FileSinkOperator.jobCloseOp(FileSinkOperator.java:1403)
at org.apache.hadoop.hive.ql.exec.Operator.jobClose(Operator.java:798)
at org.apache.hadoop.hive.ql.exec.Operator.jobClose(Operator.java:803)
at org.apache.hadoop.hive.ql.exec.tez.TezTask.close(TezTask.java:590)
at org.apache.hadoop.hive.ql.exec.tez.TezTask.execute(TezTask.java:327)
at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:212)
at
org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:103)
at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2335)
at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2002)
at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1674)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1372)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1366)
at
org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157)
at
org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:226)
at
org.apache.hive.service.cli.operation.SQLOperation.access$700(SQLOperation.java:87)
at
org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:324)
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:1730)
at
org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:342)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.FileNotFoundException: No such file or directory:
s3a://<s3-location>/warehouse/tablespace/managed/hive/src_emptybucket_partitioned/year=2015
at
org.apache.hadoop.fs.s3a.S3AFileSystem.s3GetFileStatus(S3AFileSystem.java:2805)
at
org.apache.hadoop.fs.s3a.S3AFileSystem.innerGetFileStatus(S3AFileSystem.java:2694)
at
org.apache.hadoop.fs.s3a.S3AFileSystem.getFileStatus(S3AFileSystem.java:2587)
at
org.apache.hadoop.fs.s3a.S3AFileSystem.innerListStatus(S3AFileSystem.java:2388)
at
org.apache.hadoop.fs.s3a.S3AFileSystem.lambda$listStatus$10(S3AFileSystem.java:2367)
at org.apache.hadoop.fs.s3a.Invoker.once(Invoker.java:109)
at
org.apache.hadoop.fs.s3a.S3AFileSystem.listStatus(S3AFileSystem.java:2367)
at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1880)
at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1922)
at
org.apache.hadoop.hive.ql.exec.Utilities.getMmDirectoryCandidates(Utilities.java:4185)
at
org.apache.hadoop.hive.ql.exec.Utilities.handleMmTableFinalPath(Utilities.java:4386)
at
org.apache.hadoop.hive.ql.exec.FileSinkOperator.jobCloseOp(FileSinkOperator.java:1397)
... 26 more
ERROR : FAILED: Execution Error, return code 3 from
org.apache.hadoop.hive.ql.exec.tez.TezTask
{noformat}
> insert query for partitioned insert only table failing when all buckets are
> empty
> ---------------------------------------------------------------------------------
>
> Key: HIVE-22114
> URL: https://issues.apache.org/jira/browse/HIVE-22114
> Project: Hive
> Issue Type: Bug
> Components: Hive
> Affects Versions: 3.1.0
> Reporter: Aswathy Chellammal Sreekumar
> Assignee: Vineet Garg
> Priority: Major
>
> Following insert query fails when all buckets are empty
> {code:sql}
> create table src_emptybucket_partitioned_1 (name string, age int, gpa
> decimal(3,2))
> partitioned by(year int)
> clustered by (age)
> sorted by (age)
> into 100 buckets
> stored as orc tblproperties
> ("transactional"="true", "transactional_properties"="insert_only");
> create table src1(name string, age int, gpa decimal(3,2));
> insert into src1 values("name", 56, 4);
> insert into table src_emptybucket_partitioned_1
> partition(year=2015)
> select * from src1 limit 0;
> {code}
> Error:
> {noformat}
> ERROR : Job Commit failed with exception
> 'org.apache.hadoop.hive.ql.metadata.HiveException(java.io.FileNotFoundException:
> No such file or directory:
> s3a:/<s3-location>/warehouse/tablespace/managed/hive/src_emptybucket_partitioned/year=2015)'
> # org.apache.hadoop.hive.ql.metadata.HiveException:
> java.io.FileNotFoundException: No such file or directory:
> s3a://<s3-location>/warehouse/tablespace/managed/hive/src_emptybucket_partitioned/year=2015
> at
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.jobCloseOp(FileSinkOperator.java:1403)
> at org.apache.hadoop.hive.ql.exec.Operator.jobClose(Operator.java:798)
> at org.apache.hadoop.hive.ql.exec.Operator.jobClose(Operator.java:803)
> at org.apache.hadoop.hive.ql.exec.tez.TezTask.close(TezTask.java:590)
> at org.apache.hadoop.hive.ql.exec.tez.TezTask.execute(TezTask.java:327)
> at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:212)
> at
> org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:103)
> at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2335)
> at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:2002)
> at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1674)
> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1372)
> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1366)
> at
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:157)
> at
> org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:226)
> at
> org.apache.hive.service.cli.operation.SQLOperation.access$700(SQLOperation.java:87)
> at
> org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:324)
> 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:1730)
> at
> org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:342)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.io.FileNotFoundException: No such file or directory:
> s3a://<s3-location>/warehouse/tablespace/managed/hive/src_emptybucket_partitioned/year=2015
> at
> org.apache.hadoop.fs.s3a.S3AFileSystem.s3GetFileStatus(S3AFileSystem.java:2805)
> at
> org.apache.hadoop.fs.s3a.S3AFileSystem.innerGetFileStatus(S3AFileSystem.java:2694)
> at
> org.apache.hadoop.fs.s3a.S3AFileSystem.getFileStatus(S3AFileSystem.java:2587)
> at
> org.apache.hadoop.fs.s3a.S3AFileSystem.innerListStatus(S3AFileSystem.java:2388)
> at
> org.apache.hadoop.fs.s3a.S3AFileSystem.lambda$listStatus$10(S3AFileSystem.java:2367)
> at org.apache.hadoop.fs.s3a.Invoker.once(Invoker.java:109)
> at
> org.apache.hadoop.fs.s3a.S3AFileSystem.listStatus(S3AFileSystem.java:2367)
> at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1880)
> at org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:1922)
> at
> org.apache.hadoop.hive.ql.exec.Utilities.getMmDirectoryCandidates(Utilities.java:4185)
> at
> org.apache.hadoop.hive.ql.exec.Utilities.handleMmTableFinalPath(Utilities.java:4386)
> at
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.jobCloseOp(FileSinkOperator.java:1397)
> ... 26 more
> ERROR : FAILED: Execution Error, return code 3 from
> org.apache.hadoop.hive.ql.exec.tez.TezTask
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)