This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko.git


The following commit(s) were added to refs/heads/main by this push:
     new 56f71cdde5 Remove jar from source repo (#340)
56f71cdde5 is described below

commit 56f71cdde5c06be2637dbe0a0918f3372cdb56c7
Author: PJ Fanning <[email protected]>
AuthorDate: Wed May 24 23:10:06 2023 +0100

    Remove jar from source repo (#340)
    
    * remove jar
    
    * update shell script to download jar
    
    * Update pekko-cluster
---
 .gitignore                       |   4 ++++
 cluster/jmx-client/LICENSES      |   1 -
 cluster/jmx-client/jmxsh-R5.jar  | Bin 1072606 -> 0 bytes
 cluster/jmx-client/pekko-cluster |  22 ++++++++++++++++++++--
 4 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index d76f538aa6..1561267507 100644
--- a/.gitignore
+++ b/.gitignore
@@ -84,6 +84,9 @@ worker*.log
 *-shim.sbt
 test-output
 
+# omit jar downloaded by shell script
+cluster/jmx-client/jmxsh-R5.jar
+
 # test output of QuickStart guide
 factorials.txt
 factorial2.txt
@@ -99,3 +102,4 @@ native/
 /core
 
 .tmp
+
diff --git a/cluster/jmx-client/LICENSES b/cluster/jmx-client/LICENSES
deleted file mode 100644
index 9e23047794..0000000000
--- a/cluster/jmx-client/LICENSES
+++ /dev/null
@@ -1 +0,0 @@
-The jmxsh library has been obtained from https://code.google.com/p/jmxsh/ 
under the Apache License 2.0.
diff --git a/cluster/jmx-client/jmxsh-R5.jar b/cluster/jmx-client/jmxsh-R5.jar
deleted file mode 100644
index 166e4762e0..0000000000
Binary files a/cluster/jmx-client/jmxsh-R5.jar and /dev/null differ
diff --git a/cluster/jmx-client/pekko-cluster b/cluster/jmx-client/pekko-cluster
index ac347238fc..11501479d0 100755
--- a/cluster/jmx-client/pekko-cluster
+++ b/cluster/jmx-client/pekko-cluster
@@ -19,7 +19,8 @@
 SELF=`basename $0` # script name
 HOST=$1            # cluster node to talk to through JMX
 PORT=$2
-JMXSHJAR=`dirname $0`/jmxsh-R5.jar
+JMXSHJAR_NAME=jmxsh-R5.jar
+JMXSHJAR=`dirname $0`/$JMXSHJAR_NAME
 
 shift 2
 
@@ -54,7 +55,14 @@ function ensureNodeIsRunningAndAvailable {
     fi
 }
 
-echo "This jmx-client/pekko-cluster tool is deprecated use curl and 
https://github.com/apache/incubator-pekko-management instead." >&2
+function downloadJmxshR5IfNecessary() {
+    if [ ! -f "$JMXSHJAR_NAME" ]; then
+        echo "downloading $JMXSHJAR"
+        curl 
https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jmxsh/$JMXSHJAR_NAME
 -o $JMXSHJAR
+    fi
+}
+
+echo "This jmx-client/pekko-cluster tool is deprecated; use curl and 
https://github.com/apache/incubator-pekko-management instead." >&2
 
 # switch on command
 while [ $# -gt 0 ];
@@ -66,6 +74,7 @@ do
             exit 1
         fi
 
+        downloadJmxshR5IfNecessary
         ACTOR_SYSTEM_URL=$2
         echo "$HOST is JOINING cluster node $ACTOR_SYSTEM_URL"
         invoke join $ACTOR_SYSTEM_URL
@@ -78,6 +87,7 @@ do
             exit 1
         fi
 
+        downloadJmxshR5IfNecessary
         ensureNodeIsRunningAndAvailable
         ACTOR_SYSTEM_URL=$2
         echo "Scheduling $ACTOR_SYSTEM_URL to LEAVE cluster"
@@ -91,6 +101,7 @@ do
             exit 1
         fi
 
+        downloadJmxshR5IfNecessary
         ensureNodeIsRunningAndAvailable
 
         ACTOR_SYSTEM_URL=$2
@@ -105,6 +116,7 @@ do
             exit 1
         fi
 
+        downloadJmxshR5IfNecessary
         ensureNodeIsRunningAndAvailable
 
         echo "Querying member status for $HOST"
@@ -118,6 +130,7 @@ do
             exit 1
         fi
 
+        downloadJmxshR5IfNecessary
         ensureNodeIsRunningAndAvailable
 
         get ClusterStatus
@@ -130,6 +143,7 @@ do
             exit 1
         fi
 
+        downloadJmxshR5IfNecessary
         ensureNodeIsRunningAndAvailable
 
         echo "Querying members"
@@ -143,6 +157,7 @@ do
             exit 1
         fi
 
+        downloadJmxshR5IfNecessary
         ensureNodeIsRunningAndAvailable
 
         echo "Querying unreachable members"
@@ -156,6 +171,7 @@ do
             exit 1
         fi
 
+        downloadJmxshR5IfNecessary
         ensureNodeIsRunningAndAvailable
 
         echo "Checking leader status"
@@ -169,6 +185,7 @@ do
             exit 1
         fi
 
+        downloadJmxshR5IfNecessary
         ensureNodeIsRunningAndAvailable
 
         echo "Checking for singleton cluster"
@@ -182,6 +199,7 @@ do
             exit 1
         fi
 
+        downloadJmxshR5IfNecessary
         ensureNodeIsRunningAndAvailable
 
         echo "Checking if member node on $HOST is AVAILABLE"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to