记录一下使用Hive的Bug
Connection to node1.itcast.cn failed. [ 08S01] Could not open client transport with JDBC Uri: jdbc:hive2://192.168.88.10:10000: java.net.ConnectException: Connection refused: connect 结论:查网上资料说是jdbc驱动不匹配
然而也没找到相应的驱动 是通过换虚拟机解决的
mr执行太慢问题
代码语言:javascript复制set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;
create table student(
s_id string
,s_name string
,s_birth string
,s_sex string
)
partitioned by(dt string)
row format delimited fields terminated by 't';
create table score(
s_id string
,s_score int
)
partitioned by(dt string)
row format delimited fields terminated by 't';
insert overwrite table student partition(dt = '2021-07-24')
select '02' as s_id, '钱电' as s_name, '1990-12-21' as s_birth, '男' as s_sex union all
select '01' as s_id, '赵雷' as s_name, '1990-01-01' as s_birth, '男' as s_sex union all
select '03' as s_id, '孙风' as s_name, '1990-05-20' as s_birth, '男' as s_sex union all
select '04' as s_id, '李云' as s_name, '1990-08-06' as s_birth, '男' as s_sex union all
select '05' as s_id, '周梅' as s_name, '1991-12-01' as s_birth, '女' as s_sex union all
select '06' as s_id, '吴兰' as s_name, '1992-03-01' as s_birth, '女' as s_sex union all
select '07' as s_id, '郑竹' as s_name, '1989-07-01' as s_birth, '女' as s_sex union all
select '08' as s_id, '王菊' as s_name, '1990-01-20' as s_birth, '女' as s_sex ;
insert的时候执行了一个小时都没执行完… 是分区问题??