Skip to content

Commit aa6a3bb

Browse files
authored
GEOMESA-3564 CLI - Remove Nailgun support (#3527)
1 parent e7a8b08 commit aa6a3bb

14 files changed

Lines changed: 14 additions & 524 deletions

File tree

build/dependencies.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ com.chuusai:shapeless_2.12:2.3.10:compile
33
com.clearspring.analytics:stream:2.9.8:compile
44
com.esotericsoftware:kryo-shaded:4.0.3:compile
55
com.esotericsoftware:minlog:1.3.0:compile
6-
com.facebook:nailgun-server:1.0.1:compile
76
com.fasterxml.jackson.core:jackson-annotations:2.21:compile
87
com.fasterxml.jackson.core:jackson-core:2.21.1:compile
98
com.fasterxml.jackson.core:jackson-databind:2.21.1:compile
@@ -105,8 +104,6 @@ javax.annotation:javax.annotation-api:1.2:compile
105104
javax.annotation:javax.annotation-api:1.3.2:compile
106105
javax.measure:unit-api:2.2:compile
107106
javax.xml.bind:jaxb-api:2.4.0-b180830.0359:compile
108-
net.java.dev.jna:jna-platform:5.14.0:compile
109-
net.java.dev.jna:jna:5.14.0:compile
110107
net.jodah:typetools:0.6.1:compile
111108
net.minidev:accessors-smart:2.5.2:compile
112109
net.minidev:json-smart:2.5.2:compile

docs/user/cli/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ overview of the commands available for most back-ends.
2020
logging
2121
filesystems
2222
console
23-
nailgun
2423
geotools
2524

2625
Specific back-end implementations are described in the following chapters:

docs/user/cli/nailgun.rst

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/user/cli/status.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ Argument Description
3535

3636
Lists available commands. The arguments for specific commands can be shown using ``help <command>``.
3737

38-
.. _ng_command:
39-
40-
``ng``
41-
------
42-
43-
The ``ng`` command can be used to ``start``, ``stop``, get ``stats``, or view the ``classpath`` from the
44-
command Nailgun server. See :ref:`nailgun_server` for details.
45-
4638
``version``
4739
-----------
4840

docs/user/upgrade/6.0.0.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ Deprecated Methods
115115
* ``org.locationtech.geomesa.index.api.GeoMesaFeatureIndexFactory.indices``
116116
* ``org.locationtech.geomesa.index.planning.StrategyDecider.selectFilterPlan``
117117

118+
Removal of Nailgun Support
119+
--------------------------
120+
121+
The command-line tools no longer support using Nailgun to run a persistent service. Nailgun is no longer maintained, and
122+
doesn't work with current Java versions.
123+
118124
Internal API Changes
119125
--------------------
120126

geomesa-archetypes/geomesa-archetypes-binary-dist/assembly.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,6 @@
160160
<fileMode>0755</fileMode>
161161
<filtered>true</filtered>
162162
</file>
163-
<!-- nailgun client -->
164-
<file>
165-
<source>../../geomesa-tools/bin/ng</source>
166-
<outputDirectory>bin</outputDirectory>
167-
<fileMode>0755</fileMode>
168-
</file>
169163
<!-- geomesa-site.xml.template -->
170164
<file>
171165
<source>../../geomesa-utils-parent/geomesa-utils/src/main/resources/org/locationtech/geomesa/geomesa-site.xml.template</source>

geomesa-tools/bin/geomesa-tools

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ if [[ -n "$GEOMESA_CONF_DIR" ]] && [[ ! "$GEOMESA_CONF_DIR" -ef "$%%tools.dist.
2222
fi
2323
export GEOMESA_CONF_DIR="${%%tools.dist.name%%_HOME}/conf"
2424

25-
NG_RUNNER="org.locationtech.geomesa.tools.utils.NailgunServer"
26-
2725
source "${GEOMESA_CONF_DIR}/geomesa-env.sh"
2826
source "${GEOMESA_CONF_DIR}/functions.sh"
2927

@@ -82,42 +80,6 @@ function get_classpath() {
8280
fi
8381
}
8482

85-
function start_nailgun() {
86-
load_classpath
87-
local NG_OPTS=()
88-
if [[ -n "$GEOMESA_NG_SERVER" ]]; then
89-
NG_OPTS+=("-host" "$GEOMESA_NG_SERVER")
90-
fi
91-
if [[ -n "$GEOMESA_NG_PORT" ]]; then
92-
NG_OPTS+=("--port" "$GEOMESA_NG_PORT")
93-
fi
94-
if [[ -n "$GEOMESA_NG_TIMEOUT" ]]; then
95-
NG_OPTS+=("--timeout" "$GEOMESA_NG_TIMEOUT")
96-
fi
97-
if [[ -n "$GEOMESA_NG_IDLE" ]]; then
98-
NG_OPTS+=("--idle" "$GEOMESA_NG_IDLE")
99-
fi
100-
if [[ -n "$GEOMESA_NG_POOL_SIZE" ]]; then
101-
NG_OPTS+=("--pool-size" "$GEOMESA_NG_POOL_SIZE")
102-
fi
103-
echo -n "Starting Nailgun server... " >&2
104-
# create a named pipe to read our nailgun startup output
105-
fd="$(mktemp --tmpdir ngfdXXXX)" && rm "$fd" && mkfifo "$fd"
106-
exec 3<>"$fd" # tie the pipe to output 3
107-
rm "$fd" # remove the pipe so that the process can exit normally
108-
# start nailgun in the background and redirect output to the pipe
109-
# shellcheck disable=SC2086
110-
nohup java $GEOMESA_OPTS -cp "$CLASSPATH" $NG_RUNNER "${NG_OPTS[@]}" >&3 2>&1 </dev/null &
111-
# read the output from the nailgun start up, timeout after 60 seconds
112-
read -t 60 -r ng_output <&3
113-
echo "$ng_output" >&2
114-
if ! echo "$ng_output" | grep -q started; then
115-
echo "Error starting Nailgun server" >&2
116-
exit 1
117-
fi
118-
}
119-
120-
12183
if [[ $1 = classpath ]]; then
12284
get_classpath | tr ':' '\n' | sort
12385
elif [[ $1 = configure ]]; then
@@ -128,22 +90,6 @@ elif [[ $1 = scala-console ]]; then
12890
# scala console requires options to be passed in through java_opts
12991
export JAVA_OPTS="${GEOMESA_OPTS}"
13092
geomesa_scala_console "$(get_classpath)" "$@"
131-
elif [[ $1 = ng && $2 = start ]]; then
132-
start_nailgun
133-
elif [[ $1 = ng && $2 = stop ]]; then
134-
"${%%tools.dist.name%%_HOME}"/bin/ng ng-stop
135-
elif [[ $1 = ng && $2 = classpath ]]; then
136-
"${%%tools.dist.name%%_HOME}"/bin/ng ng-cp
137-
elif [[ "$GEOMESA_NG_ENABLED" = "true" ]]; then
138-
# check to see if the nailgun server is up
139-
"${%%tools.dist.name%%_HOME}"/bin/ng ng-version >/dev/null 2>&1
140-
RET=$?
141-
if [[ $RET -ne 0 ]]; then
142-
# it's not running, start the nailgun server
143-
start_nailgun
144-
fi
145-
# invoke the nailgun client
146-
"${%%tools.dist.name%%_HOME}"/bin/ng "%%tools.runner%%" "$@"
14793
else
14894
load_classpath
14995
# shellcheck disable=SC2086

geomesa-tools/bin/ng

-18.2 KB
Binary file not shown.

geomesa-tools/conf-filtered/geomesa-env.sh

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -52,35 +52,11 @@ export CUSTOM_JAVA_OPTS="${CUSTOM_JAVA_OPTS} $JAVA_OPTS"
5252
# add additional native libraries to the java classpath (LD_LIBRARY_PATH)
5353
# export JAVA_LIBRARY_PATH="${JAVA_LIBRARY_PATH:-/path/to/java/native/library}"
5454

55-
# ==================================================================
56-
# GeoMesa Nailgun Server Variables
57-
# ==================================================================
58-
59-
# enable or disable a nailgun server for faster commands
60-
export GEOMESA_NG_ENABLED="${GEOMESA_NG_ENABLED:-false}"
61-
# host and port used to run nailgun server
62-
export GEOMESA_NG_SERVER="${GEOMESA_NG_SERVER:-$NAILGUN_SERVER}"
63-
export GEOMESA_NG_PORT="${GEOMESA_NG_PORT:-$NAILGUN_PORT}"
64-
# timeout for ng client heartbeats
65-
export GEOMESA_NG_TIMEOUT="${GEOMESA_NG_TIMEOUT:-}"
66-
# time before the nailgun server is shut down due to inactivity
67-
export GEOMESA_NG_IDLE="${GEOMESA_NG_IDLE:-1 hour}"
68-
# size of the thread pool used for handling requests
69-
export GEOMESA_NG_POOL_SIZE="${GEOMESA_NG_POOL_SIZE:-}"
70-
7155
# ==================================================================
7256
# Export the variables configured above as needed
73-
# This section shouldn't need to be modified
57+
# The remainder of this file shouldn't need to be modified
7458
# ==================================================================
7559

76-
# export the above nailgun options for use by the ng client
77-
if [[ -n "${GEOMESA_NG_SERVER}" ]]; then
78-
export NAILGUN_SERVER="${GEOMESA_NG_SERVER}"
79-
fi
80-
if [[ -n "${GEOMESA_NG_PORT}" ]]; then
81-
export NAILGUN_PORT="${GEOMESA_NG_PORT}"
82-
fi
83-
8460
# set java opts
8561
GEOMESA_OPTS="-Duser.timezone=UTC -DEPSG-HSQL.directory=/tmp/$(whoami) -Djava.awt.headless=true\
8662
-Dlog4j.configuration=file://${GEOMESA_CONF_DIR}/log4j.properties -Dgeomesa.home=${%%tools.dist.name%%_HOME}\

geomesa-tools/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@
7676
<groupId>org.scala-lang.modules</groupId>
7777
<artifactId>scala-xml_${scala.binary.version}</artifactId>
7878
</dependency>
79-
<dependency>
80-
<groupId>com.facebook</groupId>
81-
<artifactId>nailgun-server</artifactId>
82-
<version>1.0.1</version>
83-
</dependency>
8479

8580
<dependency>
8681
<groupId>org.slf4j</groupId>

0 commit comments

Comments
 (0)