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 C582511FB8 for ; Thu, 24 Jul 2014 19:46:39 +0000 (UTC) Received: (qmail 36706 invoked by uid 500); 24 Jul 2014 19:46:39 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 36621 invoked by uid 500); 24 Jul 2014 19:46:39 -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 36281 invoked by uid 99); 24 Jul 2014 19:46:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2014 19:46:38 +0000 Date: Thu, 24 Jul 2014 19:46:38 +0000 (UTC) From: "Russell Alexander Spitzer (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-7608) StressD can't create keyspaces with Write Command 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-7608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Russell Alexander Spitzer updated CASSANDRA-7608: ------------------------------------------------- Attachment: CASSANDRA-7608-2.1.patch > StressD can't create keyspaces with Write Command > ------------------------------------------------- > > Key: CASSANDRA-7608 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7608 > Project: Cassandra > Issue Type: Bug > Components: Tools > Reporter: Russell Alexander Spitzer > Assignee: Russell Alexander Spitzer > Priority: Minor > Fix For: 2.1.1 > > Attachments: CASSANDRA-7608-2.1.patch > > > It is impossible to run the default stress command via the dameon ./stress write > Because the column names are HeapByteBuffers so they get ignored during serilization (no error is thrown) and then when the object is deserialized on the server the settings.columns.names is null. This leads to a null pointer on the dameon for what would have worked had it run locally. > Settings object on the Local machine > {code} > columns = {org.apache.cassandra.stress.settings.SettingsColumn@1465} > maxColumnsPerKey = 5 > names = {java.util.Arrays$ArrayList@1471} size = 5 > [0] = {java.nio.HeapByteBuffer@1478}"java.nio.HeapByteBuffer[pos=0 lim=2 cap=2]" > [1] = {java.nio.HeapByteBuffer@1483}"java.nio.HeapByteBuffer[pos=0 lim=2 cap=2]" > [2] = {java.nio.HeapByteBuffer@1484}"java.nio.HeapByteBuffer[pos=0 lim=2 cap=2]" > [3] = {java.nio.HeapByteBuffer@1485}"java.nio.HeapByteBuffer[pos=0 lim=2 cap=2]" > [4] = {java.nio.HeapByteBuffer@1486}"java.nio.HeapByteBuffer[pos=0 lim=2 cap=2]" > {code} > Setings object on the StressD Machine > {code} > columns = {org.apache.cassandra.stress.settings.SettingsColumn@810} > maxColumnsPerKey = 5 > names = null > {code} > This leads to the null pointer in > {code} > Exception in thread "Thread-1" java.lang.NullPointerException > at org.apache.cassandra.stress.settings.SettingsSchema.createKeySpacesThrift(SettingsSchema.java:94) > at org.apache.cassandra.stress.settings.SettingsSchema.createKeySpaces(SettingsSchema.java:67) > at org.apache.cassandra.stress.settings.StressSettings.maybeCreateKeyspaces(StressSettings.java:193) > at org.apache.cassandra.stress.StressAction.run(StressAction.java:59) > at java.lang.Thread.run(Thread.java:745) > {code} > Which refers to > {code} > for (int i = 0; i < settings.columns.names.size(); i++) > standardCfDef.addToColumn_metadata(new ColumnDef(settings.columns.names.get(i), "BytesType")); > {code} > Possible solution: > Just use the settings.columns.namestr and convert them to byte buffers at this point in the code. -- This message was sent by Atlassian JIRA (v6.2#6252)