You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "archon gum (JIRA)" <ji...@apache.org> on 2019/03/13 05:54:00 UTC

[jira] [Created] (HIVE-21436) "Malformed ORC file" when only one data-file in external table directory

archon gum created HIVE-21436:
---------------------------------

             Summary: "Malformed ORC file" when only one data-file in external table directory
                 Key: HIVE-21436
                 URL: https://issues.apache.org/jira/browse/HIVE-21436
             Project: Hive
          Issue Type: Bug
    Affects Versions: 3.1.0
            Reporter: archon gum


# env
* Presto 305
* Hive 3.1.0
![Snipaste_2019-03-12_13-45-06](https://user-images.githubusercontent.com/20929338/54177654-f6233e00-44cd-11e9-9bd5-fa78e36522fe.jpg)


# step
```sql
-- create external table using presto
create table hive.dw.dim_date2 (
 d date
) with (
 format = 'ORC',
 external_location = '/user/hive/warehouse/dw.db/dim_date2/'
);

-- insert one row using presto
insert into dim_date2 values (current_date);
```

when using `hiveserver2` to query, it works only at the first query and error after then
![Snipaste_2019-03-12_12-14-34](https://user-images.githubusercontent.com/20929338/54177539-88771200-44cd-11e9-9683-f61f19cbfec0.jpg)

If I insert another row, it works
```sql
-- insert one row using presto
insert into dim_date2 values (current_date);
```

![Snipaste_2019-03-12_13-50-12](https://user-images.githubusercontent.com/20929338/54177606-c5430900-44cd-11e9-82a8-a5c06a4a7ddf.jpg)


In HDFS (BTY, how to change the replica factor to HDFS default)
![Snipaste_2019-03-12_12-16-22](https://user-images.githubusercontent.com/20929338/54177833-92e5db80-44ce-11e9-9216-3662208c6c5e.jpg)

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)