Permalink
Browse files

check for null when a host dies

  • Loading branch information...
1 parent ba650e1 commit 7a53f8d247dde5057854632d7fffe155787c6dd9 zznate committed Apr 14, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/main/java/com/riptano/cassandra/stress/InsertCommand.java
@@ -52,7 +52,8 @@ public Void call() throws Exception {
try {
MutationResult mr = mutator.execute();
LatencyTracker writeCount = commandRunner.latencies.get(mr.getHostUsed());
- writeCount.addMicro(mr.getExecutionTimeMicro());
+ if ( writeCount != null )
+ writeCount.addMicro(mr.getExecutionTimeMicro());
mutator.discardPendingMutations();
log.info("executed batch of {}. {} of {} complete", new Object[]{commandArgs.batchSize, rows, commandArgs.getKeysPerThread()});

0 comments on commit 7a53f8d

Please sign in to comment.