Skip to content

Commit

Permalink
remove-async
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjunfeng committed Oct 25, 2023
1 parent 52b1841 commit 25e695b
Show file tree
Hide file tree
Showing 51 changed files with 1,123 additions and 829 deletions.
8 changes: 4 additions & 4 deletions bin/control.bat
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
:: Set IGNITE_LIBS
::
call "%SCRIPTS_HOME%\include\setenv.bat"
call "%SCRIPTS_HOME%\include\build-classpath.bat"

set CP=%IGNITE_LIBS%;%IGNITE_HOME%\libs\optional\ignite-zookeeper\*

::
Expand Down Expand Up @@ -165,7 +165,7 @@ if %ERRORLEVEL% equ 0 (
:: Assertions are disabled by default since version 3.5.
:: If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
::
set ENABLE_ASSERTIONS=1
set ENABLE_ASSERTIONS=0

::
:: Set '-ea' options if assertions are enabled.
Expand Down Expand Up @@ -198,11 +198,11 @@ if defined JVM_OPTS (

if "%INTERACTIVE%" == "1" (
"%JAVA_HOME%\bin\java.exe" %CONTROL_JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^
-DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-cp "%CP%" %MAIN_CLASS% %*
) else (
"%JAVA_HOME%\bin\java.exe" %CONTROL_JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^
-DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-cp "%CP%" %MAIN_CLASS% %*
)

Expand Down
12 changes: 6 additions & 6 deletions bin/control.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fi
# Set IGNITE_LIBS.
#
. "${SCRIPTS_HOME}"/include/setenv.sh
. "${SCRIPTS_HOME}"/include/build-classpath.sh # Will be removed in the binary release.

CP="${IGNITE_LIBS}:${IGNITE_HOME}/libs/optional/ignite-zookeeper/*"

RANDOM_NUMBER=$("$JAVA" -cp "${CP}" org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator)
Expand Down Expand Up @@ -113,7 +113,7 @@ fi
# Assertions are disabled by default since version 3.5.
# If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
#
ENABLE_ASSERTIONS="1"
ENABLE_ASSERTIONS="0"

#
# Set '-ea' options if assertions are enabled.
Expand Down Expand Up @@ -148,12 +148,12 @@ fi
case $osname in
Darwin*)
"$JAVA" ${CONTROL_JVM_OPTS} ${QUIET:-} "${DOCK_OPTS}" \
-DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} "$@"
-DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} $@
;;
*)
"$JAVA" ${CONTROL_JVM_OPTS} ${QUIET:-} \
-DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} "$@"
-DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS:-} -cp "${CP}" ${MAIN_CLASS} $@
;;
esac
10 changes: 8 additions & 2 deletions bin/gremlin.bat
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

:: Windows launcher script for Gremlin Console

@ECHO ON
@ECHO OFF
SETLOCAL EnableDelayedExpansion
SET work=%CD%

Expand Down Expand Up @@ -65,8 +65,12 @@ call "%IGNITE_HOME%\bin\include\jvmdefaults.bat" %MAJOR_JAVA_VER% "%JVM_OPTS%" J

CD %IGNITE_HOME%

::
:: Set IGNITE_LIBS
::
call "%IGNITE_HOME%\bin\include\setenv.bat"

SET CP=%CLASSPATH%;libs\ignite-gremlin-server\*;libs\*;libs\ignite-log4j\*;exts\*
SET CP=%CLASSPATH%;%IGNITE_LIBS%;exts\*

:: jline.terminal workaround for https://issues.apache.org/jira/browse/GROOVY-6453
:: to debug plugin :install include -Divy.message.logger.level=4 -Dgroovy.grape.report.downloads=true
Expand Down Expand Up @@ -95,6 +99,8 @@ IF "%1" == "-jpda" GOTO debug

java %JAVA_OPTIONS% %JAVA_ARGS% -cp %CP% org.apache.tinkerpop.gremlin.console.Console %*

GOTO finally

:debug

SET debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=19003
Expand Down
20 changes: 7 additions & 13 deletions bin/gremlin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,19 @@ EXT=$(pwd)


cd ..
SYSTEM_EXT_DIR="`pwd`/ext"
SYSTEM_EXT_DIR="`pwd`/exts"
IGNITE_HOME=`pwd`
echo IGNITE_HOME=$IGNITE_HOME

JAVA_OPTIONS=${JAVA_OPTIONS:-}

if [ ! -z "${JAVA_OPTIONS}" ]; then
USER_EXT_DIR=$(grep -o '\-Dtinkerpop.ext=\(\([^"][^ ]*\)\|\("[^"]*"\)\)' <<< "${JAVA_OPTIONS}" | cut -f2 -d '=' | xargs -0 echo)
if [ ! -z "${USER_EXT_DIR}" -a ! -d "${USER_EXT_DIR}" ]; then
mkdir -p "${USER_EXT_DIR}"
cp -R ${SYSTEM_EXT_DIR}/* ${USER_EXT_DIR}/
fi
fi

#
# Set IGNITE_LIBS.
#
. "${BIN}"/include/setenv.sh
. "${IGNITE_HOME}"/bin/include/setenv.sh



CP=${SYSTEM_EXT_DIR}/*:${LIB}/*:${LIB}/ignite-gremlin-server/*:${LIB}/ignite-log4j/*:libs/netty/*
CP=${SYSTEM_EXT_DIR}/*:${LIB}/*:${IGNITE_LIBS}

export CLASSPATH="${CLASSPATH:-}:$CP"

Expand Down Expand Up @@ -107,7 +100,7 @@ if [ -z "${HADOOP_GREMLIN_LIBS:-}" ]; then
export HADOOP_GREMLIN_LIBS="$LIB"
fi

JAVA_OPTIONS="${JAVA_OPTIONS} -Duser.working_dir=${USER_DIR} -Dtinkerpop.ext=${USER_EXT_DIR:-${SYSTEM_EXT_DIR}} -Dlog4j.configurationFile=file:conf/log4j2-console.xml
JAVA_OPTIONS="${JAVA_OPTIONS} -Duser.working_dir=${USER_DIR} -Dtinkerpop.ext=${USER_EXT_DIR:-${SYSTEM_EXT_DIR}} -Dlog4j.configurationFile=file:config/log4j2-console.xml -cp $CP "
JAVA_OPTIONS=$(awk -v RS=' ' '!/^$/ {if (!x[$0]++) print}' <<< "${JAVA_OPTIONS}" | grep -v '^$' | paste -sd ' ' -)

if [ -n "$SCRIPT_DEBUG" ]; then
Expand All @@ -119,3 +112,4 @@ fi

# Start the JVM, execute the application, and return its exit code
exec $JAVA $JAVA_OPTIONS $MAIN_CLASS $CFG "$@"

10 changes: 5 additions & 5 deletions bin/ignite.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

@echo off
Setlocal EnableDelayedExpansion
set JVM_OPTS=-agentlib:jdwp=transport=dt_socket,address=0.0.0.0:19001,server=y,suspend=n

if "%OS%" == "Windows_NT" setlocal

:: Check JAVA_HOME.
Expand Down Expand Up @@ -115,7 +115,7 @@ if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
:: Set IGNITE_LIBS
::
call "%SCRIPTS_HOME%\include\setenv.bat"
call "%SCRIPTS_HOME%\include\build-classpath.bat" &:: Will be removed in the binary release.

set CP=%IGNITE_LIBS%

::
Expand Down Expand Up @@ -174,7 +174,7 @@ if %ERRORLEVEL% equ 0 (
:: Assertions are disabled by default since version 3.5.
:: If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
::
set ENABLE_ASSERTIONS=1
set ENABLE_ASSERTIONS=0

::
:: Set '-ea' options if assertions are enabled.
Expand Down Expand Up @@ -202,11 +202,11 @@ call "%SCRIPTS_HOME%\include\jvmdefaults.bat" %MAJOR_JAVA_VER% "%JVM_OPTS%" JVM_

if "%INTERACTIVE%" == "1" (
"%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^
-DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-cp "%CP%" %MAIN_CLASS%
) else (
"%JAVA_HOME%\bin\java.exe" %JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^
-DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-cp "%CP%" %MAIN_CLASS% "%CONFIG%"
)

Expand Down
12 changes: 6 additions & 6 deletions bin/ignite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fi
# Set IGNITE_LIBS.
#
. "${SCRIPTS_HOME}"/include/setenv.sh
. "${SCRIPTS_HOME}"/include/build-classpath.sh # Will be removed in the binary release.

CP="${IGNITE_LIBS}"

RANDOM_NUMBER=$("$JAVA" -cp "${CP}" org.apache.ignite.startup.cmdline.CommandLineRandomNumberGenerator)
Expand Down Expand Up @@ -113,7 +113,7 @@ fi
# Assertions are disabled by default since version 3.5.
# If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
#
ENABLE_ASSERTIONS="1"
ENABLE_ASSERTIONS="0"

#
# Set '-ea' options if assertions are enabled.
Expand Down Expand Up @@ -148,25 +148,25 @@ do
case $osname in
Darwin*)
"$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" \
-DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} && ERRORCODE="$?" || ERRORCODE="$?"
;;
*)
"$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" \
-DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} && ERRORCODE="$?" || ERRORCODE="$?"
;;
esac
else
case $osname in
Darwin*)
"$JAVA" ${JVM_OPTS} ${QUIET} "${DOCK_OPTS}" "${RESTART_SUCCESS_OPT}" \
-DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} "${CONFIG}" && ERRORCODE="$?" || ERRORCODE="$?"
;;
*)
"$JAVA" ${JVM_OPTS} ${QUIET} "${RESTART_SUCCESS_OPT}" \
-DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_HOME="${IGNITE_HOME}" \
-DIGNITE_PROG_NAME="$0" ${JVM_XOPTS} -cp "${CP}" ${MAIN_CLASS} "${CONFIG}" && ERRORCODE="$?" || ERRORCODE="$?"
;;
esac
Expand Down
106 changes: 53 additions & 53 deletions bin/igniterouter.sh
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#
# Router command line loader.
#

#
# Import common functions.
#
if [ "${IGNITE_HOME}" = "" ]; then
IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")"
else
IGNITE_HOME_TMP=${IGNITE_HOME}
fi

#
# Set SCRIPTS_HOME - base path to scripts.
#
SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"

source "${SCRIPTS_HOME}"/include/functions.sh

#
# Discover IGNITE_HOME environment variable.
#
setIgniteHome

#
# Set router service environment.
#
export DEFAULT_CONFIG=config/router/default-router.xml
export MAIN_CLASS=org.apache.ignite.internal.client.router.impl.GridRouterCommandLineStartup

#
# Start router service.
#
. "${SCRIPTS_HOME}"/ignite.sh $@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#
# Router command line loader.
#

#
# Import common functions.
#
if [ "${IGNITE_HOME}" = "" ]; then
IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")"
else
IGNITE_HOME_TMP=${IGNITE_HOME}
fi

#
# Set SCRIPTS_HOME - base path to scripts.
#
SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"

source "${SCRIPTS_HOME}"/include/functions.sh

#
# Discover IGNITE_HOME environment variable.
#
setIgniteHome

#
# Set router service environment.
#
export DEFAULT_CONFIG=config/router/default-router.xml
export MAIN_CLASS=org.apache.ignite.internal.client.router.impl.GridRouterCommandLineStartup

#
# Start router service.
#
. "${SCRIPTS_HOME}"/ignite.sh $@
6 changes: 3 additions & 3 deletions bin/index-reader.bat
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ if "%OS%" == "Windows_NT" set PROG_NAME=%~nx0%
:: Set IGNITE_LIBS
::
call "%SCRIPTS_HOME%\include\setenv.bat"
call "%SCRIPTS_HOME%\include\build-classpath.bat"

set CP=%IGNITE_LIBS%

::
Expand Down Expand Up @@ -149,7 +149,7 @@ if %ERRORLEVEL% equ 0 (
:: Assertions are disabled by default since version 3.5.
:: If you want to enable them - set 'ENABLE_ASSERTIONS' flag to '1'.
::
set ENABLE_ASSERTIONS=1
set ENABLE_ASSERTIONS=0

::
:: Set '-ea' options if assertions are enabled.
Expand All @@ -175,7 +175,7 @@ if defined JVM_OPTS (
)

"%JAVA_HOME%\bin\java.exe" %CONTROL_JVM_OPTS% %QUIET% %RESTART_SUCCESS_OPT% ^
-DIGNITE_UPDATE_NOTIFIER=false -DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-DIGNITE_HOME="%IGNITE_HOME%" -DIGNITE_PROG_NAME="%PROG_NAME%" %JVM_XOPTS% ^
-cp "%CP%" %MAIN_CLASS% %*

set JAVA_ERRORLEVEL=%ERRORLEVEL%
Expand Down
Loading

0 comments on commit 25e695b

Please sign in to comment.