hive执行了set hive.enforce.bucketing=true;进行分桶失败(未解决)

hive建表,根据remoteIp进行分桶 根据requestmethod进行分区

hive> create table partition_cluster_accsslog 
    > (     remoteIp  string, 
    >       loginRemoteName string,
    >       authrizedName string,
    >       responseCode int,
    >       contentBytes int,
    >       handleTime int,
    >       timestamps bigint,
    >       requesturl string,
    >       requestprotocol string,
    >       refer string,
    >       browsername string)
    > partitioned by (requestmethod string)
    > clustered by (remoteIp) sorted by (handleTime) into 2 buckets
    > row format delimited fields terminated by '\t'
    > LOCATION '/bike/log/partition_cluster_accesslog';
OK
Time taken: 0.332 seconds
hive> set hive.enforce.bucketing;
hive.enforce.bucketing=true
hive> set hive.enforce.bucketing;
hive.enforce.bucketing=true
hive> insert into partition_cluster_accsslog partition(  requestmethod='GET') 
    > select 
    > remoteip,loginremotename,authrizedname,responseCode,contentBytes,handleTime,timestamps,requesturl,requestprotocol,refer,browsername
    > from accesslog where requestmethod='GET';
WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值