cassandra-developer
cassandra-developer

Reputation: 71

Cassandra UnavailableException()

Exception in thread "main" UnavailableException()

at org.apache.cassandra.thrift.Cassandra$batch_mutate_result.read(Cassandra.java:16485) at org.apache.cassandra.thrift.Cassandra$Client.recv_batch_mutate(Cassandra.java:916) at org.apache.cassandra.thrift.Cassandra$Client.batch_mutate(Cassandra.java:890) at WordCountSetup.main(Unknown Source)

Hi, I got this error while running a job in cassandra. can anyone help me how to get those class files. thanks in advance..

Upvotes: 7

Views: 4852

Answers (2)

Santanu Dey
Santanu Dey

Reputation: 2978

Usually this error comes when there is some issue with the replication setting of your key space. Few possibilities

  1. You have used network topology replication strategy but you do not have a cluster set up Then change the below: placement_strategy = 'NetworkTopologyStrategy' AND strategy_options={datacenter1:1}; to-> placement_strategy = 'SimpleStrategy' AND strategy_options={replication_factor:1};may
  2. You may have your data center name mismatched in the ring vs in your keyspace definition
  3. May be your ring is down.

For 2 and 3 use nodetool ring command to find out how your ring is set up. Then accordingly update the keyspace definition.

Upvotes: 3

jbellis
jbellis

Reputation: 19377

UnavailableException means "too many replicas are down."

Upvotes: 11

Related Questions