Digant Modha created CASSANDRA-7051:
---------------------------------------
Summary: UnsupportedOperationException
Key: CASSANDRA-7051
URL: https://issues.apache.org/jira/browse/CASSANDRA-7051
Project: Cassandra
Issue Type: Bug
Components: API, Core
Environment: Cassandra 2.0.6
Reporter: Digant Modha
Priority: Critical
UnsupportedOperationException exception thrown when using batchstatement. This
is because in
org.apache.cassandra.cql3.statements.BatchStatement.unzipMutations returns a
collection that does not support add if the size of mutation is 1.
STACK:
throws UnsupportedOperationException.
Daemon Thread [Native-Transport-Requests:1043] (Suspended (entry into method
<init> in UnsupportedOperationException))
UnsupportedOperationException.<init>() line: 42 [local variables
unavailable]
HashMap$Values(AbstractCollection<E>).add(E) line: 260
HashMap$Values(AbstractCollection<E>).addAll(Collection<? extends E>)
line: 342
StorageProxy.mutateWithTriggers(Collection<IMutation>,
ConsistencyLevel, boolean) line: 519
BatchStatement.executeWithoutConditions(Collection<IMutation>,
ConsistencyLevel) line: 210
BatchStatement.execute(BatchStatement$BatchVariables, boolean,
ConsistencyLevel, long) line: 203
BatchStatement.executeWithPerStatementVariables(ConsistencyLevel,
QueryState, List<List<ByteBuffer>>) line: 192
QueryProcessor.processBatch(BatchStatement, ConsistencyLevel,
QueryState, List<List<ByteBuffer>>, List<Object>) line: 373
BatchMessage.execute(QueryState) line: 206
Message$Dispatcher.messageReceived(ChannelHandlerContext, MessageEvent)
line: 304
Message$Dispatcher(SimpleChannelUpstreamHandler).handleUpstream(ChannelHandlerContext,
ChannelEvent) line: 70
DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline$DefaultChannelHandlerContext,
ChannelEvent) line: 564
DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(ChannelEvent)
line: 791
ChannelUpstreamEventRunnable.doRun() line: 43
ChannelUpstreamEventRunnable(ChannelEventRunnable).run() line: 67
RequestThreadPoolExecutor(ThreadPoolExecutor).runWorker(ThreadPoolExecutor$Worker)
line: 1145
ThreadPoolExecutor$Worker.run() line: 615
Thread.run() line: 744
org.apache.cassandra.cql3.statements.BatchStatement:
private Collection<? extends IMutation> unzipMutations(Map<String,
Map<ByteBuffer, IMutation>> mutations)
{
// The case where all statement where on the same keyspace is pretty
common
if (mutations.size() == 1)
return mutations.values().iterator().next().values();
List<IMutation> ms = new ArrayList<>();
for (Map<ByteBuffer, IMutation> ksMap : mutations.values())
ms.addAll(ksMap.values());
return ms;
}
--
This message was sent by Atlassian JIRA
(v6.2#6252)