cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcken...@apache.org
Subject [1/8] cassandra git commit: Make Windows -a startup skip VerifyPorts check entirely
Date Mon, 19 Oct 2015 19:13:27 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.2 3cd750012 -> 728f94e79
  refs/heads/cassandra-3.0 7159a754a -> fa909cc42
  refs/heads/trunk c0c513b64 -> a9060f033


Make Windows -a startup skip VerifyPorts check entirely

Patch by jmckenzie; reviewed by pthompson for CASSANDRA-10524


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/728f94e7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/728f94e7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/728f94e7

Branch: refs/heads/cassandra-2.2
Commit: 728f94e798662bf8e0e4ad0f4d236394868cb7d6
Parents: 3cd7500
Author: Joshua McKenzie <jmckenzie@apache.org>
Authored: Mon Oct 19 15:11:07 2015 -0400
Committer: Joshua McKenzie <jmckenzie@apache.org>
Committed: Mon Oct 19 15:11:07 2015 -0400

----------------------------------------------------------------------
 bin/cassandra.ps1 | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/728f94e7/bin/cassandra.ps1
----------------------------------------------------------------------
diff --git a/bin/cassandra.ps1 b/bin/cassandra.ps1
index 8cdd433..44ba9a4 100644
--- a/bin/cassandra.ps1
+++ b/bin/cassandra.ps1
@@ -27,7 +27,7 @@ usage: cassandra.ps1 [-f] [-h] [-p pidfile] [-H dumpfile] [-D arg] [-E errorfile
     -E              change JVM ErrorFile
     -v              Print cassandra version and exit
     -s              Show detailed jvm environment information during launch
-    -a              Aggressive startup. Ignore ports that are TIME_WAIT for VerifyPorts check.
+    -a              Aggressive startup. Skip VerifyPorts check. For use in dev environments.
     -help           print this message
 
     NOTE: installing cassandra as a service requires Commons Daemon Service Runner
@@ -281,6 +281,10 @@ WARNING! Failed to write pidfile to $pidfile.  stop-server.bat and
 #-----------------------------------------------------------------------------
 Function VerifyPortsAreAvailable
 {
+    if ($a)
+    {
+        return
+    }
     # Need to confirm 5 different ports are available or die if any are currently bound
     # From cassandra.yaml:
     #   storage_port
@@ -308,10 +312,6 @@ Function VerifyPortsAreAvailable
     {
         if ($line -match "TCP" -and $line -match $portRegex)
         {
-            if ($a -and $line -match "TIME_WAIT")
-            {
-               continue
-            }
             Write-Error "Found a port already in use. Aborting startup"
             Write-Error $line
             Exit


Mime
View raw message