[ https://issues.apache.org/jira/browse/CASSANDRA-7768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14267753#comment-14267753 ]
Benjamin Lerer commented on CASSANDRA-7768: ------------------------------------------- The problem come from a conflict between {{Keyspace.open}} and {{Config.setClientMode(true)}}. When {{Config.setClientMode(true)}} is used a minimal configuration is used. That configuration has some missing data which trigger the {{NullPointerException}}. The patch for CASSANDRA-8280 add a {{Keyspace.open}} within {{UpdateStatement}}. Due to that on the latest 2.1 {{CQLSSTableWriter.addRow}} will throw a {{NullPointerException}} even if only one {{CQLSSTableWriter}} is used. To avoid that problem you must not call {{Config.setClientMode(true)}} before using {{CQLSSTableWriter}}. Unfortunatly, you will then face CASSANDRA-8281. > Error when creating multiple CQLSSTableWriters for more than one column > family in the same keyspace > --------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-7768 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7768 > Project: Cassandra > Issue Type: Bug > Components: Hadoop > Reporter: Paul Pak > Assignee: Benjamin Lerer > Priority: Minor > Labels: cql3, hadoop > Attachments: trunk-7768-v1.txt > > > The reason why this occurs is if the keyspace has already been loaded (due to > another column family being previously loaded in the same keyspace), > CQLSSTableWriter builder only loads the column family via > Schema.load(CFMetaData). However, Schema.load(CFMetaData) only adds to the > Schema.cfIdMap without making the proper addition to the CFMetaData map > belonging to the KSMetaData map. -- This message was sent by Atlassian JIRA (v6.3.4#6332)