HIve - 在现有表格中创建镶木地板表时创建表格 - 错误

时间:2017-11-06 05:14:04

标签: hadoop hive

我使用CTAS从现有表(订单)创建了一个Parquet表(orders_parquet),如下所示:

CREATE TABLE orders_parquet
ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
AS SELECT * FROM orders;

正在下面加载

Query ID = jonnavithulasivakrishna_20171105234912_e608ac1f-a10b-435e-8307-92747fb5c37d
Total jobs = 3
Launching Job 1 out of 3
Number of reduce tasks is set to 0 since there's no reduce operator
Can't load log handler "java.util.logging.FileHandler"
java.io.FileNotFoundException: /tmp/parquet-3.log (Permission denied)
java.io.FileNotFoundException: /tmp/parquet-3.log (Permission denied)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
        at java.util.logging.FileHandler.open(FileHandler.java:210)
        at java.util.logging.FileHandler.rotate(FileHandler.java:661)
        at java.util.logging.FileHandler.openFiles(FileHandler.java:538)
        at java.util.logging.FileHandler.<init>(FileHandler.java:263)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 

但是这个表加载了数据。请你帮忙解决错误的原因?

1 个答案:

答案 0 :(得分:0)

Hive需要在/ tmp位置写入权限才能记录信息。在你的情况下,hive没有/tmp/parquet-3.log的写权限。以 chmod 777 /tmp/parquet-3.log

为给定文件授予写入权限