使用表本身的连接查询下表会导致以下异常:
java.lang.IllegalArgumentException: Uncompressed length 222258 must be less than 131072
at org.iq80.snappy.SnappyInternalUtils.checkArgument(SnappyInternalUtils.java:116)
at org.iq80.snappy.SnappyDecompressor.uncompress(SnappyDecompressor.java:72)
at org.iq80.snappy.Snappy.uncompress(Snappy.java:43)
at org.apache.hadoop.hive.ql.io.orc.SnappyCodec.decompress(SnappyCodec.java:71)
at org.apache.hadoop.hive.ql.io.orc.InStream$CompressedStream.readHeader(InStream.java:214)
at org.apache.hadoop.hive.ql.io.orc.InStream$CompressedStream.available(InStream.java:251)
有问题的查询如下:
select a.*
from events a
inner join
(
SELECT asset_id, time, max(hive_insert_ts)
FROM events
GROUP BY asset_id, time
) b on a.time = b.time
and a.asset_id = b.asset_id
limit 10;
该表存储为 ORC 并使用 SNAPPY 进行压缩:
create table events(
asset_id varchar(15),
time timestamp,
hive_insert_ts timestamp)
PARTITIONED BY (
country varchar(4),
site varchar(4),
year int,
month int)
STORED as ORC
TBLPROPERTIES (
'orc.compress'='SNAPPY',
'orc.create.index'='true',
'orc.bloom.filter.columns'='asset_id, time',
'orc.bloom.filter.fpp'='0.05',
'orc.stripe.size'='268435456',
'orc.row.index.stride'='10000');
我搜索了很多,但找不到任何提示。你知道问题可能出在哪里吗?
非常感谢!