FAILED: SemanticException Please load into an intermediate table and use ‘insert... select‘ to allow

# 创建分桶表
hive (mydb)> create table if not exists course(
           > id int,
           > name string,
           > score int
           > )
           > clustered by (id) into 3 buckets
           > row format delimited 
           > fields terminated by '\t';

# 加载数据
hive (mydb)> load data local inpath '/root/data/hive_data/course.dat' into table course;
FAILED: SemanticException Please load into an intermediate table and use 'insert... select' to allow Hive to enforce bucketing. Load into bucketed tables are disabled for safety reasons. If you know what you are doing, please sethive.strict.checks.bucketing to false and that hive.mapred.mode is not set to 'strict' to proceed. Note that if you may get errors or incorrect results if you make a mistake while using some of the unsafe features.
# 说明不能使用给普通表加载数据的方式给分桶表加载数据,方法如下:
# 先创建结构相同的普通表
hive (mydb)> create table if not exists course_common(
           > id int,
           > name string,
           > score int
           > )
           > row format delimited 
           > fields terminated by '\t';

# 给普通表加载数据
hive (mydb)> load data local inpath '/root/data/hive_data/course.dat' into table course_common;
# 使用insert ... into ...select
hive (mydb)> insert into table course select * from course_common;
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. This error occurs when the SSL certificate of the target server cannot be validated by the Java Virtual Machine (JVM). The JVM is unable to establish a trusted connection because it cannot find a valid certification path. To resolve this issue, you can try the following steps: 1. Update the Java Runtime Environment (JRE) or Java Development Kit (JDK) to the latest version available. This ensures that you have the latest trusted root certificates. 2. Import the SSL certificate of the target server into the Java keystore. You can use the keytool command-line tool to import the certificate. Here's an example command: ``` keytool -importcert -alias server -keystore cacerts -file server.crt ``` Replace "server" with an alias of your choice, "cacerts" with the path to the Java keystore file (usually located in the JRE installation directory), and "server.crt" with the path to the SSL certificate file. 3. If you are using a custom truststore, ensure that it contains all necessary certificates, including any intermediate or root certificates required to establish trust with the target server. 4. If you are running your application behind a proxy server, make sure that the proxy server's SSL certificate is valid and trusted by your JVM. By following these steps, you should be able to resolve the PKIX path building failed error and establish a successful SSL connection.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值