无法创建UDA

时间:2019-02-25 08:27:52

标签: cassandra

我是Cassandra的新手,我正在使用Cassandra 3.10,当我要创建UDA时出现以下错误

OperationTimedOut: errors={'x.x.x.x'}: 'Request timed out while waiting for schema agreement. See session.execute[_async](timeout) and Cluster.max_schema_agree ent_wait.'},last_host=x.x.x.x

Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers

我正在创建的UDA是

CREATE FUNCTION state_group_and_total( state map<text, int>, type text, amount int )
CALLED ON NULL INPUT
RETURNS map<text, int>
LANGUAGE java AS '
Integer count = (Integer) state.get(type);  if (count == null) count = amount; else count = count + amount; state.put(type, count); return state; ' ;

CREATE OR REPLACE AGGREGATE group_and_total(text, int) 
SFUNC state_group_and_total 
STYPE map<text, int> 
INITCOND {};

0 个答案:

没有答案