Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/hadoop/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hadoop 配置单元在创建表中返回太多行作为选择_Hadoop_Duplicates_Hive_Create Table - Fatal编程技术网

Hadoop 配置单元在创建表中返回太多行作为选择

Hadoop 配置单元在创建表中返回太多行作为选择,hadoop,duplicates,hive,create-table,Hadoop,Duplicates,Hive,Create Table,在简单查询中配置单元不需要的重复项 我们的数据: 表xx包含唯一的UUID1 结果包含(在某些情况下)重复的UUID1 我们有256个uuid1碎片 将表xx创建为( uuid1硬字符(2), uuid1字符(36) 时间戳时间戳, UUID2硬字符(2), uuid2(char(36), col001..col190 int/bigint/char, 有效载荷varchar(100) ) 我们的发现: 工作正常: select row_number() over (partition by

在简单查询中配置单元不需要的重复项

我们的数据:

  • 表xx包含唯一的UUID1
  • 结果包含(在某些情况下)重复的UUID1
  • 我们有256个uuid1碎片

    将表xx创建为( uuid1硬字符(2), uuid1字符(36) 时间戳时间戳, UUID2硬字符(2), uuid2(char(36), col001..col190 int/bigint/char, 有效载荷varchar(100) )

我们的发现:

工作正常:

select
row_number() over (partition by uuid2shard, uuid2 order by (timestamp, uuid2shard, uuid2))
,*
from (select * from xx where uuidshard2 < 192)
再次工作:--忽略剩余的190列

select
row_number() over (partition by uuid2shard, uuid2 order by (timestamp, uuid2shard, uuid2))
, partition by uuid1shard, uuid1, timestamp, uuid2shard, uuid2, smallpayload
from xx 
根本原因将其锁定(所有DUP来自何处?)

看起来这是“大小”问题,或者必须设置一些东西才能使其正常工作

我们的环境:

小的;)
16个节点、384个vCore等。

您能否进一步澄清重复的含义?指定的表创建查询将创建表
yy
,其行数与
xx
中的行数完全相同。如果这是您的意图,这里不会进行任何聚合。创建的表比原始表(800M中约8k行)的行数多一些,不是吗?;)检查了100次,重复的行数增加了一倍(完全相同)-创建的表中没有1行8000次,但有8000行两次。我的第一个猜测是它是数据格式的,但是无论我们使用ORC还是文本(对于源和目标),它都会发生
select count(*), count(distinct uuid2) from 
(
select
row_number() over (partition by uuid2shard, uuid2 order by (timestamp, uuid2shard, uuid2))
,*
from xx
)
select
row_number() over (partition by uuid2shard, uuid2 order by (timestamp, uuid2shard, uuid2))
, partition by uuid1shard, uuid1, timestamp, uuid2shard, uuid2, smallpayload
from xx 
create table yy as --the CREATE, yes, the problem is probably in the create statement
select
row_number() over (partition by uuid2shard, uuid2 order by (timestamp, uuid2shard, uuid2))
,*
from xx