Put operation failed for tableName error

I’ve a MapReduce job that’s failing, when I look at JobRunErrorDetail I see the following mesage

errorMsg: Put operation failed for tableName=devadmin_db.mapr_MapInValue,id=260#B-1,casConditionField=version,…
Put operation failed for tableName=devadmin_db.mapr_MapInValue,id=260#B-1,casConditionField=version,casCondValue=0,error=c3.love.exceptions.C3RuntimeException: wrapped com.datastax.driver.core.exceptions.InvalidQueryException: Expected 4 or 0 byte int (8)

    at com.datastax.driver.core.exceptions.InvalidQueryException.copy
    ...
    at c3.engine.database.cassandra.connector.cql.CassandraCQLClient.lambda$executeWithRetry$0 (CassandraCQLClient.java:106)
	at c3.love.exceptions.C3RuntimeException.wrapIt(C3RuntimeException.java:136)
	at c3.love.exceptions.C3RuntimeException.wrapIt(C3RuntimeException.java:85)
	at c3.love.exceptions.C3X.wrap(C3X.java:237)
	at c3.love.util.Retry.now(Retry.java:321)
	at c3.engine.database.cassandra.connector.cql.CassandraCQLClient.executeWithRetry(CassandraCQLClient.java:110)
	at c3.engine.database.cassandra.connector.cql.CassandraCQLClient.executeWithBindings(CassandraCQLClient.java:98)
	at c3.engine.database.kvstore.cassandra.CassandraMethods.executeQuery(CassandraMethods.java:659)
	at c3.type.admin.methods.CassandraMethodsBase$25.accept(CassandraMethodsBase.java:257)
	at c3.type.admin.methods.CassandraMethodsBase$25.accept(CassandraMethodsBase.java:255)
	at c3.server.engine.TypeSysEngine.execute(TypeSysEngine.java:64)
	at c3.server.impl.Task.doFilter(Task.java:264)

What coud be causing this Cassandra error?

This is expected to happen if the PlatformSchemaUpgrade didn’t happen from v7.9.x to v7.9.x. If it is an upgrade from v7.8.x to v7.9.x this should not be happening and please file a ticket.

If this is an internal environment that was upgraded for testing, then you will have to recreate the tables (basically delete existing tables & recreate them).

Note: This will also delete all the data. DO NOT USE this in any customer / production environments.

Cassandra.deleteCollection(Cassandra.tableName(type), true);
Cassandra.upsertCollection(Cassandra.tableName(type));
1 Like