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 907559841 for ; Fri, 6 Apr 2012 20:38:47 +0000 (UTC) Received: (qmail 37405 invoked by uid 500); 6 Apr 2012 20:38:46 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 37345 invoked by uid 500); 6 Apr 2012 20:38:46 -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 37111 invoked by uid 99); 6 Apr 2012 20:38:46 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2012 20:38:46 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 73E8CB846; Fri, 6 Apr 2012 20:38:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: xedin@apache.org To: commits@cassandra.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [3/6] git commit: fix terminination of the stress.java when errors were encountered patch by Pavel Yaskevich; reviewed by Brandon Williams for CASSANDRA-4128 Message-Id: <20120406203846.73E8CB846@tyr.zones.apache.org> Date: Fri, 6 Apr 2012 20:38:46 +0000 (UTC) fix terminination of the stress.java when errors were encountered patch by Pavel Yaskevich; reviewed by Brandon Williams for CASSANDRA-4128 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/25da034f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/25da034f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/25da034f Branch: refs/heads/trunk Commit: 25da034fb3bb8edb393ae7908ee0d292efbb4ed9 Parents: 8df0cea Author: Pavel Yaskevich Authored: Fri Apr 6 22:32:12 2012 +0300 Committer: Pavel Yaskevich Committed: Fri Apr 6 23:33:26 2012 +0300 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ .../src/org/apache/cassandra/stress/Stress.java | 2 +- .../org/apache/cassandra/stress/StressAction.java | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/25da034f/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index ceccc71..1d1b4fd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,8 @@ (CASSANDRA-4088) * relax path length requirement for sstable files when upgrading on non-Windows platforms (CASSANDRA-4110) + * fix terminination of the stress.java when errors were encountered + (CASSANDRA-4128) 1.1-beta2 http://git-wip-us.apache.org/repos/asf/cassandra/blob/25da034f/tools/stress/src/org/apache/cassandra/stress/Stress.java ---------------------------------------------------------------------- diff --git a/tools/stress/src/org/apache/cassandra/stress/Stress.java b/tools/stress/src/org/apache/cassandra/stress/Stress.java index 36f0410..c5e65f8 100644 --- a/tools/stress/src/org/apache/cassandra/stress/Stress.java +++ b/tools/stress/src/org/apache/cassandra/stress/Stress.java @@ -88,7 +88,7 @@ public final class Stress } else { - new StressAction(session, outStream).run(); + new StressAction(session, outStream).start(); } } http://git-wip-us.apache.org/repos/asf/cassandra/blob/25da034f/tools/stress/src/org/apache/cassandra/stress/StressAction.java ---------------------------------------------------------------------- diff --git a/tools/stress/src/org/apache/cassandra/stress/StressAction.java b/tools/stress/src/org/apache/cassandra/stress/StressAction.java index 8d6a0f5..d175170 100644 --- a/tools/stress/src/org/apache/cassandra/stress/StressAction.java +++ b/tools/stress/src/org/apache/cassandra/stress/StressAction.java @@ -137,6 +137,9 @@ public class StressAction extends Thread } } + if (producer.isAlive()) + producer.interrupt(); // if producer is still alive it means that we had errors in the consumers + // marking an end of the output to the client output.println("END"); } @@ -161,7 +164,8 @@ public class StressAction extends Thread } catch (InterruptedException e) { - System.err.println("Producer error - " + e.getMessage()); + if (e.getMessage() != null) + System.err.println("Producer error - " + e.getMessage()); return; } }