Support Cassandra message 'unconfigured columnfamily'. Fixes
@@ -50,6 +50,9 @@ public class CassandraHelper {
/** Cassandra error message if specified table doesn't exist. */
private static final String TABLE_EXIST_ERROR2 = "Error preparing query, got ERROR INVALID: unconfigured table";
+ /** Cassandra error message if specified table doesn't exist. */
+ private static final Pattern TABLE_EXIST_ERROR3 = Pattern.compile("unconfigured columnfamily [0-9a-zA-Z_]+");
+
/** Cassandra error message if trying to use prepared statement created from another session. */
private static final String PREP_STATEMENT_CLUSTER_INSTANCE_ERROR = "You may have used a PreparedStatement that " +
"was created with another Cluster instance";
@@ -97,6 +100,7 @@ public class CassandraHelper {
while (e != null) {
if (e instanceof InvalidQueryException &&
(TABLE_EXIST_ERROR1.matcher(e.getMessage()).matches() ||
+ TABLE_EXIST_ERROR3.matcher(e.getMessage()).matches() ||
KEYSPACE_EXIST_ERROR1.matcher(e.getMessage()).matches() ||
KEYSPACE_EXIST_ERROR2.matcher(e.getMessage()).matches()))
return true;
