[
https://issues.apache.org/jira/browse/HIVE-20342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Zoltan Haindrich resolved HIVE-20342.
-------------------------------------
Resolution: Duplicate
seems like duplicate of HIVE-20399
> Create table from CTAS with location fails for managed tables
> -------------------------------------------------------------
>
> Key: HIVE-20342
> URL: https://issues.apache.org/jira/browse/HIVE-20342
> Project: Hive
> Issue Type: Bug
> Components: Beeline, HiveServer2
> Affects Versions: 3.0.0
> Reporter: Pablo Idiaquez
> Priority: Blocker
>
> When attempting to create table from SELECT with LOCATION (managed tables)
>
> To reproduce CREATE source table CLASS with some data
> then use the code below to CREATE table TABLE42 from select on CLASS and
> LOCATION /tmp/test1
>
> {code:java}
> CREATE TABLE TABLE42 ROW FORMAT SERDE
> 'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe' STORED AS RCFILE
> LOCATION '/tmp/test1'
> AS SELECT * FROM
> CLASS;
> {code}
>
> it fails with ERROR:
> {code:java}
> ERROR : Job Commit failed with exception
> 'org.apache.hadoop.hive.ql.metadata.HiveException(The following files were
> committed but not found: [/tmp/test1/delta_0000001_0000001_0000/000000_0])'
> org.apache.hadoop.hive.ql.metadata.HiveException: The following files were
> committed but not found: [/tmp/test1/delta_0000001_0000001_0000/000000_0]
> at
> org.apache.hadoop.hive.ql.exec.Utilities.handleMmTableFinalPath(Utilities.java:4329)
>
> at
> org.apache.hadoop.hive.ql.exec.FileSinkOperator.jobCloseOp(FileSinkOperator.java:1393)
>
> {code}
>
> If the same is attempted for an EXTERNAL table will work OK
> {code:java}
> CREATE EXTERNAL TABLE test3 ROW FORMAT SERDE
> 'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe' STORED AS RCFILE
> LOCATION '/tmp/test2' AS SELECT * FROM test;
> {code}
> if we CREATE table on statement 1, and INSERT from SELECT on statement 2 ,
> will work OK.
> (Step1 CREATE TABLE)
> {code:java}
> CREATE TABLE `TABLE42`(
> `COL1` double,
> `COL2` varchar(8),
> `COL3` varchar(1),
> `COL4` double,
> `COL5` double)
> ROW FORMAT SERDE
> 'org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe'
> STORED AS INPUTFORMAT
> 'org.apache.hadoop.hive.ql.io.RCFileInputFormat'
> OUTPUTFORMAT
> 'org.apache.hadoop.hive.ql.io.RCFileOutputFormat'
> LOCATION '/tmp/test1';
> {code}
> (Step2 INSERT from SELECT)
> {code:java}
> INSERT into TABLE42 select * FROM CLASS;
> {code}
> will work as expected.
>
> Thanks
> Pablo
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)