新升级后hive3.1.0.3.1.5.0-152 后创建表总是外部表,但是数据又放在内部表路径,导致表数据为空

1.通过前端访问总是报insert-only错误,Your client does not appear to support insert-only tables. To skip capability checks, please set metastore.client.capability.check to false. This setting can be set globally, or on the client for the current metastore session. Note that this may lead to incorrect results, data loss, undefined behavior, etc. if your client is actually incompatible. You can also specify custom client capabilities via get_table_req API.

2.执行脚本也是部分脚本报Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.apache.thrift.transpo
rt.TTransportException (state=08S01,code=1),

4.通过查看网上资料需要设置一些hive参数

ambari去掉默认勾选设置

对应hive-site.xml参数 

 <property>
      <name>metastore.create.as.acid</name>
      <value>false</value>
    </property>
       <property>
      <name>hive.create.as.insert.only</name>
      <value>false</value>
    </property>

但是这样配置后就会出现创建表总是外部表,但是数据又放在内部表路径,导致表数据为空

5.最后需要在加一个参数

  <property>
      <name>metastore.metadata.transformer.class</name>
      <value> </value>
    </property>

注意值为空格,能够解决创建表为外部表的问题,后续都是内部表路径
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值