我创建了一个重新加密的流
CREATE STREAM details_stream_rekeyed2 as \
select CONCAT(IdSeq,IdTime,'') as root,ServerId,Server,\
IdTime ,IdSeq \
from voip_details_stream \
partition by root;
从此流中选择,我得到 > 100 个项目
然后我尝试创建一个表
create table voip_details_table3 \
(ROOT varchar,ServerId long , Server varchar ,IdTime varchar,IdSeq long ) \
with ( kafka_topic = 'DETAILS_STREAM_REKEYED2', \
value_format = 'json',\
key='ROOT');
当我跑步时
SELECT ROWKEY,ROOT FROM VOIP_DETAILS_TABLE3;
我得到的只有不到 10 个喜欢的物品;
12018-04-04T18:56:35.080-04:00 | 12018-04-04T18:56:35.080-04:00
我运行命令:
kafkacat -C -K: -b "$BROKER_LIST" -f 'Key: %k\nKey Bytes: %K\nValue: %s\nValue Bytes: %S\n\n' -t DETAILS_STREAM_REKEYED2
一切都好。我得到喜欢的数据
Key: 12018-02-05T15:16:07.113-05:00
Key Bytes: 30
Value: {"SERVER":null,"IDSEQ":1,"ROOT":"12018-02-05T15:16:07.113-05:00","SERVERID":null,"SESSIONIDTIME":"2018-02-05T15:16:07.113-05:00"}
值字节:158
问题出在哪里?