elassandra 5.5.018和6.2.3.2发生此错误。 我有这个表结构:
CREATE TYPE applicationinfo (
industry text,
area_of_application text,
product_group text,
sic_code text,
conveyed_product text,
flowability text,
viscosity text,
solids_content text,
size_of_solids text,
concentration text,
composition text,
specific_gravity text,
ph_value text,
product_temperature_min int,
product_temperature_max int
);
CREATE TABLE deviceinfo (
id text,
"applicationinfo" applicationinfo
PRIMARY KEY (id)
);
在我的测试用例中,有一些(插入了大约100个条目)。 当我尝试为deviceinfo表创建弹性索引时,出现以下异常而失败:
2018-07-04 14:49:56,894 ERROR [SecondaryIndexManagement:3] CassandraDaemon.java:231 uncaughtException Exception in thread Thread[SecondaryIndexManagement:3,5,main]
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.nio.BufferUnderflowException
at org.apache.cassandra.utils.Throwables.maybeFail(Throwables.java:51)
at org.apache.cassandra.utils.FBUtilities.waitOnFutures(FBUtilities.java:373)
at org.apache.cassandra.index.SecondaryIndexManager.buildIndexesBlocking(SecondaryIndexManager.java:392)
at org.apache.cassandra.index.SecondaryIndexManager.buildIndexesBlocking(SecondaryIndexManager.java:367)
at org.apache.cassandra.index.SecondaryIndexManager.buildIndexBlocking(SecondaryIndexManager.java:288)
at org.elassandra.index.ElasticSecondaryIndex.lambda$getInitializationTask$5(ElasticSecondaryIndex.java:2266)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.cassandra.concurrent.NamedThreadFactory.lambda$threadLocalDeallocator$0(NamedThreadFactory.java:81)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.nio.BufferUnderflowException
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.cassandra.utils.FBUtilities.waitOnFutures(FBUtilities.java:366)
... 9 common frames omitted
我在做什么错了?
答案 0 :(得分:0)
回答自己的问题。问题已在此处解决:
https://github.com/strapdata/elassandra/issues/210
解决方案是冻结udt字段:
CREATE TABLE deviceinfo (
id text,
"applicationinfo" frozen<applicationinfo>,
baseinfo frozen<baseinfo>,
"product" frozen<product>,
"specification" frozen<specification>,
"technicaldata" frozen<technicaldata>,
"customer" frozen<customer>,
PRIMARY KEY (id)
);