You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by al...@apache.org on 2016/12/15 17:31:43 UTC
nifi-minifi git commit: MINIFI-156 - Windows script fixes from NiFi
Repository: nifi-minifi
Updated Branches:
refs/heads/master 94869042f -> 35dfa690c
MINIFI-156 - Windows script fixes from NiFi
This closes #62.
Signed-off-by: Aldrin Piri <al...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi/commit/35dfa690
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi/tree/35dfa690
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi/diff/35dfa690
Branch: refs/heads/master
Commit: 35dfa690cbbf6ae3831eb1802e476b2450f8b2b6
Parents: 9486904
Author: Bryan Rosander <br...@apache.org>
Authored: Tue Dec 6 10:58:41 2016 -0500
Committer: Aldrin Piri <al...@apache.org>
Committed: Thu Dec 15 12:28:11 2016 -0500
----------------------------------------------------------------------
.../src/main/resources/bin/dump-minifi.bat | 2 +-
.../src/main/resources/bin/minifi.sh | 2 +
.../src/main/resources/bin/run-minifi.bat | 2 +-
.../src/main/resources/bin/status-minifi.bat | 2 +-
.../src/main/assembly/dependencies.xml | 2 +-
.../src/main/resources/bin/config.bat | 39 ++++++
.../src/main/resources/bin/config.sh | 122 +++++++++++++++++++
.../src/main/resources/classpath/logback.xml | 37 ++++++
.../src/main/resources/config.bat | 40 ------
.../src/main/resources/config.sh | 122 -------------------
10 files changed, 204 insertions(+), 166 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/35dfa690/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/dump-minifi.bat
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/dump-minifi.bat b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/dump-minifi.bat
index 6e7897b..3ef8266 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/dump-minifi.bat
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/dump-minifi.bat
@@ -18,7 +18,7 @@ rem
rem Set environment variables
-call minifi-env.bat
+call %~sdp0\minifi-env.bat
rem Use JAVA_HOME if it's set; otherwise, just use java
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/35dfa690/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh
index 5469382..11446f3 100755
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh
@@ -250,6 +250,8 @@ run() {
fi;
MINIFI_HOME=$(cygpath --path --windows "${MINIFI_HOME}")
+ MINIFI_LOG_DIR=$(cygpath --path --windows "${MINIFI_LOG_DIR}")
+ MINIFI_PID_DIR=$(cygpath --path --windows "${MINIFI_PID_DIR}")
BOOTSTRAP_CONF=$(cygpath --path --windows "${BOOTSTRAP_CONF}")
BOOTSTRAP_CONF_DIR=$(cygpath --path --windows "${BOOTSTRAP_CONF_DIR}")
BOOTSTRAP_LIBS=$(cygpath --path --windows "${BOOTSTRAP_LIBS}")
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/35dfa690/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/run-minifi.bat
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/run-minifi.bat b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/run-minifi.bat
index 7bc5d31..c26c940 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/run-minifi.bat
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/run-minifi.bat
@@ -18,7 +18,7 @@ rem
rem Set environment variables
-call minifi-env.bat
+call %~sdp0\minifi-env.bat
rem Use JAVA_HOME if it's set; otherwise, just use java
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/35dfa690/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/status-minifi.bat
----------------------------------------------------------------------
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/status-minifi.bat b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/status-minifi.bat
index 8189d90..0115822 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/status-minifi.bat
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/src/main/resources/bin/status-minifi.bat
@@ -16,7 +16,7 @@ rem See the License for the specific language governing permissions and
rem limitations under the License.
rem
-call minifi-env.bat
+call %~sdp0\minifi-env.bat
rem Use JAVA_HOME if it's set; otherwise, just use java
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/35dfa690/minifi-toolkit/minifi-toolkit-assembly/src/main/assembly/dependencies.xml
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-assembly/src/main/assembly/dependencies.xml b/minifi-toolkit/minifi-toolkit-assembly/src/main/assembly/dependencies.xml
index f4f0b7a..b6ffcef 100644
--- a/minifi-toolkit/minifi-toolkit-assembly/src/main/assembly/dependencies.xml
+++ b/minifi-toolkit/minifi-toolkit-assembly/src/main/assembly/dependencies.xml
@@ -35,7 +35,7 @@
<fileSets>
<fileSet>
<directory>${project.basedir}/src/main/resources</directory>
- <outputDirectory>bin/</outputDirectory>
+ <outputDirectory>/</outputDirectory>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/35dfa690/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/bin/config.bat
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/bin/config.bat b/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/bin/config.bat
new file mode 100644
index 0000000..5366cc5
--- /dev/null
+++ b/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/bin/config.bat
@@ -0,0 +1,39 @@
+@echo off
+rem
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+rem
+
+rem Use JAVA_HOME if it's set; otherwise, just use java
+
+if "%JAVA_HOME%" == "" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+set JAVA_EXE=%JAVA_HOME%\bin\java.exe
+goto startConfig
+
+:noJavaHome
+echo The JAVA_HOME environment variable is not defined correctly.
+echo Instead the PATH will be used to find the java executable.
+echo.
+set JAVA_EXE=java
+goto startConfig
+
+:startConfig
+set LIB_DIR=%~dp0..\lib
+
+SET JAVA_PARAMS=-cp %LIB_DIR%\* -Xms12m -Xmx24m %JAVA_ARGS% org.apache.nifi.minifi.toolkit.configuration.ConfigMain
+
+cmd.exe /C "%JAVA_EXE%" %JAVA_PARAMS% %*
+
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/35dfa690/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/bin/config.sh
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/bin/config.sh b/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/bin/config.sh
new file mode 100755
index 0000000..a8bb286
--- /dev/null
+++ b/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/bin/config.sh
@@ -0,0 +1,122 @@
+#!/bin/sh
+#
+# 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.
+#
+#
+
+# Script structure inspired from Apache Karaf and other Apache projects with similar startup approaches
+
+SCRIPT_DIR=$(dirname "$0")
+SCRIPT_NAME=$(basename "$0")
+MINIFI_TOOLKIT_HOME=$(cd "${SCRIPT_DIR}" && cd .. && pwd)
+PROGNAME=$(basename "$0")
+
+
+warn() {
+ echo "${PROGNAME}: $*"
+}
+
+die() {
+ warn "$*"
+ exit 1
+}
+
+detectOS() {
+ # OS specific support (must be 'true' or 'false').
+ cygwin=false;
+ aix=false;
+ os400=false;
+ darwin=false;
+ case "$(uname)" in
+ CYGWIN*)
+ cygwin=true
+ ;;
+ AIX*)
+ aix=true
+ ;;
+ OS400*)
+ os400=true
+ ;;
+ Darwin)
+ darwin=true
+ ;;
+ esac
+ # For AIX, set an environment variable
+ if ${aix}; then
+ export LDR_CNTRL=MAXDATA=0xB0000000@DSA
+ echo ${LDR_CNTRL}
+ fi
+}
+
+locateJava() {
+ # Setup the Java Virtual Machine
+ if $cygwin ; then
+ [ -n "${JAVA}" ] && JAVA=$(cygpath --unix "${JAVA}")
+ [ -n "${JAVA_HOME}" ] && JAVA_HOME=$(cygpath --unix "${JAVA_HOME}")
+ fi
+
+ if [ "x${JAVA}" = "x" ] && [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=$(java-config --jre-home)
+ fi
+ if [ "x${JAVA}" = "x" ]; then
+ if [ "x${JAVA_HOME}" != "x" ]; then
+ if [ ! -d "${JAVA_HOME}" ]; then
+ die "JAVA_HOME is not valid: ${JAVA_HOME}"
+ fi
+ JAVA="${JAVA_HOME}/bin/java"
+ else
+ warn "JAVA_HOME not set; results may vary"
+ JAVA=$(type java)
+ JAVA=$(expr "${JAVA}" : '.* \(/.*\)$')
+ if [ "x${JAVA}" = "x" ]; then
+ die "java command not found"
+ fi
+ fi
+ fi
+}
+
+init() {
+ # Determine if there is special OS handling we must perform
+ detectOS
+
+ # Locate the Java VM to execute
+ locateJava
+}
+
+run() {
+ LIBS="${MINIFI_TOOLKIT_HOME}/lib/*"
+
+ sudo_cmd_prefix=""
+ if $cygwin; then
+ MINIFI_TOOLKIT_HOME=$(cygpath --path --windows "${MINIFI_TOOLKIT_HOME}")
+ CLASSPATH="$MINIFI_TOOLKIT_HOME/classpath;$(cygpath --path --windows "${LIBS}")"
+ else
+ CLASSPATH="$MINIFI_TOOLKIT_HOME/classpath:${LIBS}"
+ fi
+
+ echo
+ echo "Java home: ${JAVA_HOME}"
+ echo "MiNiFi Toolkit home: ${MINIFI_TOOLKIT_HOME}"
+ echo
+ echo
+
+
+ "${JAVA}" -cp "${CLASSPATH}" -Xms12m -Xmx24m org.apache.nifi.minifi.toolkit.configuration.ConfigMain $@
+ return $?
+}
+
+init
+run "$@"
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/35dfa690/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/classpath/logback.xml
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/classpath/logback.xml b/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/classpath/logback.xml
new file mode 100644
index 0000000..e939251
--- /dev/null
+++ b/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/classpath/logback.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ /*
+ ~ * 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.
+ ~ */
+ -->
+
+<configuration scan="true" scanPeriod="30 seconds">
+ <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
+ <resetJUL>true</resetJUL>
+ </contextListener>
+
+ <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <pattern>%date %level [%thread] %logger{40} %msg%n</pattern>
+ </encoder>
+ </appender>
+
+
+ <root level="INFO">
+ <appender-ref ref="CONSOLE"/>
+ </root>
+
+</configuration>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/35dfa690/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/config.bat
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/config.bat b/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/config.bat
deleted file mode 100644
index 596708e..0000000
--- a/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/config.bat
+++ /dev/null
@@ -1,40 +0,0 @@
-@echo off
-rem
-rem Licensed to the Apache Software Foundation (ASF) under one or more
-rem contributor license agreements. See the NOTICE file distributed with
-rem this work for additional information regarding copyright ownership.
-rem The ASF licenses this file to You under the Apache License, Version 2.0
-rem (the "License"); you may not use this file except in compliance with
-rem the License. You may obtain a copy of the License at
-rem
-rem http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing, software
-rem distributed under the License is distributed on an "AS IS" BASIS,
-rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-rem See the License for the specific language governing permissions and
-rem limitations under the License.
-rem
-
-rem Use JAVA_HOME if it's set; otherwise, just use java
-
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-set JAVA_EXE=%JAVA_HOME%\bin\java.exe
-goto startConfig
-
-:noJavaHome
-echo The JAVA_HOME environment variable is not defined correctly.
-echo Instead the PATH will be used to find the java executable.
-echo.
-set JAVA_EXE=java
-goto startConfig
-
-:startConfig
-set LIB_DIR=%~dp0..\lib
-
-SET JAVA_PARAMS=-cp %LIB_DIR%\* -Xms12m -Xmx24m %JAVA_ARGS% org.apache.nifi.minifi.toolkit.configuration.ConfigMain
-
-cmd.exe /C "%JAVA_EXE%" %JAVA_PARAMS% %*
-
-popd
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/35dfa690/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/config.sh
----------------------------------------------------------------------
diff --git a/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/config.sh b/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/config.sh
deleted file mode 100755
index 12963cb..0000000
--- a/minifi-toolkit/minifi-toolkit-assembly/src/main/resources/config.sh
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/bin/sh
-#
-# 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.
-#
-#
-
-# Script structure inspired from Apache Karaf and other Apache projects with similar startup approaches
-
-SCRIPT_DIR=$(dirname "$0")
-SCRIPT_NAME=$(basename "$0")
-MINIFI_TOOLKIT_HOME=$(cd "${SCRIPT_DIR}" && cd .. && pwd)
-PROGNAME=$(basename "$0")
-
-
-warn() {
- echo "${PROGNAME}: $*"
-}
-
-die() {
- warn "$*"
- exit 1
-}
-
-detectOS() {
- # OS specific support (must be 'true' or 'false').
- cygwin=false;
- aix=false;
- os400=false;
- darwin=false;
- case "$(uname)" in
- CYGWIN*)
- cygwin=true
- ;;
- AIX*)
- aix=true
- ;;
- OS400*)
- os400=true
- ;;
- Darwin)
- darwin=true
- ;;
- esac
- # For AIX, set an environment variable
- if ${aix}; then
- export LDR_CNTRL=MAXDATA=0xB0000000@DSA
- echo ${LDR_CNTRL}
- fi
-}
-
-locateJava() {
- # Setup the Java Virtual Machine
- if $cygwin ; then
- [ -n "${JAVA}" ] && JAVA=$(cygpath --unix "${JAVA}")
- [ -n "${JAVA_HOME}" ] && JAVA_HOME=$(cygpath --unix "${JAVA_HOME}")
- fi
-
- if [ "x${JAVA}" = "x" ] && [ -r /etc/gentoo-release ] ; then
- JAVA_HOME=$(java-config --jre-home)
- fi
- if [ "x${JAVA}" = "x" ]; then
- if [ "x${JAVA_HOME}" != "x" ]; then
- if [ ! -d "${JAVA_HOME}" ]; then
- die "JAVA_HOME is not valid: ${JAVA_HOME}"
- fi
- JAVA="${JAVA_HOME}/bin/java"
- else
- warn "JAVA_HOME not set; results may vary"
- JAVA=$(type java)
- JAVA=$(expr "${JAVA}" : '.* \(/.*\)$')
- if [ "x${JAVA}" = "x" ]; then
- die "java command not found"
- fi
- fi
- fi
-}
-
-init() {
- # Determine if there is special OS handling we must perform
- detectOS
-
- # Locate the Java VM to execute
- locateJava
-}
-
-run() {
- LIBS="${MINIFI_TOOLKIT_HOME}/lib/*"
-
- sudo_cmd_prefix=""
- if $cygwin; then
- MINIFI_TOOLKIT_HOME=$(cygpath --path --windows "${MINIFI_TOOLKIT_HOME}")
- CLASSPATH=$(cygpath --path --windows "${LIBS}")
- else
- CLASSPATH="${LIBS}"
- fi
-
- echo
- echo "Java home: ${JAVA_HOME}"
- echo "MiNiFi Toolkit home: ${MINIFI_TOOLKIT_HOME}"
- echo
- echo
-
-
- "${JAVA}" -cp "${CLASSPATH}" -Xms12m -Xmx24m org.apache.nifi.minifi.toolkit.configuration.ConfigMain $@
- return $?
-}
-
-init
-run "$@"
\ No newline at end of file