cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Jirsa (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-14426) cassandra-stress throws NPE if insert section isn't specified in user profile
Date Sat, 28 Apr 2018 18:22:00 GMT


Jeff Jirsa commented on CASSANDRA-14426:

Appreciate the debugging and the fix. I think your fix is fine, but I'd like to change it
a bit to move the:

        if (insert == null)
            insert = new HashMap<>();

>From below the {{if (!isKeyOnlyTable)}} if/else block to above, making your check irrelevant.
 Are you OK with that change? 

> cassandra-stress throws NPE if insert section isn't specified in user profile
> -----------------------------------------------------------------------------
>                 Key: CASSANDRA-14426
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Stress
>            Reporter: Alex Ott
>            Assignee: Alex Ott
>            Priority: Trivial
>             Fix For: 4.x
> When user profile file is used, and insert section isn't specified, then cassandra-stress
is using default values instead.
> Since support for LWTs was added, absence of the insert section lead to throwing of NullPointerException
when generating inserts:
> {noformat}
> java.lang.NullPointerException
> 	at org.apache.cassandra.stress.StressProfile.getInsert(
> 	at org.apache.cassandra.stress.StressProfile.printSettings(
> 	at org.apache.cassandra.stress.settings.StressSettings.lambda$printSettings$1(
> 	at java.util.LinkedHashMap.forEach(
> 	at org.apache.cassandra.stress.settings.StressSettings.printSettings(
> 	at
> 	at org.apache.cassandra.stress.Stress.main(
> {noformat}
> Fix is trivial, and will be provided as PR

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message