[
https://issues.apache.org/jira/browse/CASSANDRA-7608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Shuler updated CASSANDRA-7608:
--------------------------------------
Fix Version/s: 2.1.1
> 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
> Priority: Minor
> Fix For: 2.1.1
>
>
> 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)