Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0251D173CF for ; Thu, 5 Mar 2015 13:39:39 +0000 (UTC) Received: (qmail 91380 invoked by uid 500); 5 Mar 2015 13:39:38 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 91342 invoked by uid 500); 5 Mar 2015 13:39:38 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 91330 invoked by uid 99); 5 Mar 2015 13:39:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Mar 2015 13:39:38 +0000 Date: Thu, 5 Mar 2015 13:39:38 +0000 (UTC) From: "Benjamin Lerer (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-8808) CQLSSTableWriter: close does not work + more than one table throws ex MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-8808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-8808: -------------------------------------- Attachment: CASSANDRA-8808-trunk-V2.txt > CQLSSTableWriter: close does not work + more than one table throws ex > --------------------------------------------------------------------- > > Key: CASSANDRA-8808 > URL: https://issues.apache.org/jira/browse/CASSANDRA-8808 > Project: Cassandra > Issue Type: Bug > Components: Core > Reporter: Sebastian YEPES FERNANDEZ > Assignee: Benjamin Lerer > Labels: cql > Fix For: 2.0.13, 2.1.4 > > Attachments: CASSANDRA-8808-2.0-V2.txt, CASSANDRA-8808-2.0.txt, CASSANDRA-8808-2.1-V2.txt, CASSANDRA-8808-2.1.txt, CASSANDRA-8808-trunk-V2.txt, CASSANDRA-8808-trunk.txt > > > I have encountered the following two issues: > - When closing the CQLSSTableWriter it just hangs the process and does nothing. (https://issues.apache.org/jira/browse/CASSANDRA-8281) > - When writing more than one table throws ex. (https://issues.apache.org/jira/browse/CASSANDRA-8251) > These issue can be reproduced with the following code: > {code:title=test.java|borderStyle=solid} > import org.apache.cassandra.config.Config; > import org.apache.cassandra.io.sstable.CQLSSTableWriter; > public static void main(String[] args) { > Config.setClientMode(true); > CQLSSTableWriter w1 = CQLSSTableWriter.builder() > .inDirectory("/tmp/kspc/t1") > .forTable("CREATE TABLE kspc.t1 ( id int, PRIMARY KEY (id));") > .using("INSERT INTO kspc.t1 (id) VALUES ( ? );") > .build(); > CQLSSTableWriter w2 = CQLSSTableWriter.builder() > .inDirectory("/tmp/kspc/t2") > .forTable("CREATE TABLE kspc.t2 ( id int, PRIMARY KEY (id));") > .using("INSERT INTO kspc.t2 (id) VALUES ( ? );") > .build(); > try { > w1.addRow(1); > w2.addRow(1); > w1.close(); > w2.close(); > } catch (Exception e) { > System.out.println(e); > } > } > {code} > {code:title=The error|borderStyle=solid} > Exception in thread "main" java.lang.ExceptionInInitializerError > at org.apache.cassandra.db.Keyspace.initCf(Keyspace.java:324) > at org.apache.cassandra.db.Keyspace.(Keyspace.java:277) > at org.apache.cassandra.db.Keyspace.open(Keyspace.java:119) > at org.apache.cassandra.db.Keyspace.open(Keyspace.java:96) > at org.apache.cassandra.cql3.statements.UpdateStatement.addUpdateForKey(UpdateStatement.java:101) > at org.apache.cassandra.io.sstable.CQLSSTableWriter.rawAddRow(CQLSSTableWriter.java:226) > at org.apache.cassandra.io.sstable.CQLSSTableWriter.addRow(CQLSSTableWriter.java:145) > at org.apache.cassandra.io.sstable.CQLSSTableWriter.addRow(CQLSSTableWriter.java:120) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSite.invoke(PojoMetaMethodSite.java:189) > at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) > at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120) > at com.allthingsmonitoring.utils.BulkDataLoader.main(BulkDataLoader.groovy:415) > Caused by: java.lang.NullPointerException > at org.apache.cassandra.config.DatabaseDescriptor.getFlushWriters(DatabaseDescriptor.java:1053) > at org.apache.cassandra.db.ColumnFamilyStore.(ColumnFamilyStore.java:85) > ... 18 more > {code} > I have just tested the in the cassandra-2.1 branch and the issue still persists. -- This message was sent by Atlassian JIRA (v6.3.4#6332)