You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by rk...@apache.org on 2013/09/28 00:30:56 UTC
svn commit: r1527107 - in /oozie/trunk: ./ core/src/main/conf/
distro/src/main/bin/ tools/src/main/bin/
Author: rkanter
Date: Fri Sep 27 22:30:56 2013
New Revision: 1527107
URL: http://svn.apache.org/r1527107
Log:
OOZIE-1523 Create Windows versions of the shell scripts (dwann via rkanter)
Added:
oozie/trunk/core/src/main/conf/oozie-env.cmd
oozie/trunk/distro/src/main/bin/oozie-setup.cmd
oozie/trunk/distro/src/main/bin/oozie-setup.ps1
oozie/trunk/distro/src/main/bin/oozie-sys.cmd
oozie/trunk/distro/src/main/bin/oozie.cmd
oozie/trunk/distro/src/main/bin/oozied.cmd
oozie/trunk/tools/src/main/bin/ooziedb.cmd
Modified:
oozie/trunk/release-log.txt
Added: oozie/trunk/core/src/main/conf/oozie-env.cmd
URL: http://svn.apache.org/viewvc/oozie/trunk/core/src/main/conf/oozie-env.cmd?rev=1527107&view=auto
==============================================================================
--- oozie/trunk/core/src/main/conf/oozie-env.cmd (added)
+++ oozie/trunk/core/src/main/conf/oozie-env.cmd Fri Sep 27 22:30:56 2013
@@ -0,0 +1,63 @@
+@rem Licensed to the Apache Software Foundation (ASF) under one
+@rem or more contributor license agreements. See the NOTICE file
+@rem distributed with this work for additional information
+@rem regarding copyright ownership. The ASF licenses this file
+@rem to you under the Apache License, Version 2.0 (the
+@rem "License"); you may not use this file except in compliance
+@rem with 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 Set Oozie specific environment variables here.
+
+@rem Settings for the Embedded Tomcat that runs Oozie
+@rem Java System properties for Oozie should be specified in this variable
+@rem
+set CATALINA_OPTS=%CATALINA_OPTS% -Xmx1024m
+
+@rem Oozie configuration file to load from Oozie configuration directory
+@rem
+@rem set OOZIE_CONFIG_FILE=oozie-site.xml
+
+@rem Oozie logs directory
+@rem
+@rem set OOZIE_LOG=%OOZIE_HOME%\logs
+
+@rem Oozie Log4J configuration file to load from Oozie configuration directory
+@rem
+@rem set OOZIE_LOG4J_FILE=oozie-log4j.properties
+
+@rem Reload interval of the Log4J configuration file, in seconds
+@rem
+@rem set OOZIE_LOG4J_RELOAD=10
+
+@rem The port Oozie server runs
+@rem
+@rem set OOZIE_HTTP_PORT=11000
+
+@rem The port Oozie server runs if using SSL (HTTPS)
+@rem
+@rem export OOZIE_HTTPS_PORT=11443
+
+@rem The host name Oozie server runs on
+@rem
+@rem set OOZIE_HTTP_HOSTNAME=%COMPUTERNAME%
+
+@rem The base URL for callback URLs to Oozie
+@rem
+@rem set OOZIE_BASE_URL=http://%OOZIE_HTTP_HOSTNAME%:%OOZIE_HTTP_PORT%/oozie
+
+@rem The location of the keystore for the Oozie server if using SSL (HTTPS)
+@rem
+@rem export OOZIE_HTTPS_KEYSTORE_FILE=${HOME}\.keystore
+
+@rem The password of the keystore for the Oozie server if using SSL (HTTPS)
+@rem
+@rem export OOZIE_HTTPS_KEYSTORE_PASS=password
\ No newline at end of file
Added: oozie/trunk/distro/src/main/bin/oozie-setup.cmd
URL: http://svn.apache.org/viewvc/oozie/trunk/distro/src/main/bin/oozie-setup.cmd?rev=1527107&view=auto
==============================================================================
--- oozie/trunk/distro/src/main/bin/oozie-setup.cmd (added)
+++ oozie/trunk/distro/src/main/bin/oozie-setup.cmd Fri Sep 27 22:30:56 2013
@@ -0,0 +1,18 @@
+@rem echo off
+@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.
+
+powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -File %~dp0oozie-setup.ps1 %*
+goto :eof
Added: oozie/trunk/distro/src/main/bin/oozie-setup.ps1
URL: http://svn.apache.org/viewvc/oozie/trunk/distro/src/main/bin/oozie-setup.ps1?rev=1527107&view=auto
==============================================================================
--- oozie/trunk/distro/src/main/bin/oozie-setup.ps1 (added)
+++ oozie/trunk/distro/src/main/bin/oozie-setup.ps1 Fri Sep 27 22:30:56 2013
@@ -0,0 +1,172 @@
+### 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.
+
+param(
+[Parameter(Mandatory=$true)] [string] $InputWar,
+[Parameter(Mandatory=$true)] [string] $OutputWar,
+[string[]] $Jars,
+[string] $HadoopVersion,
+[string] $HadoopHome,
+[string] $ExtJS)
+
+# FUNCTIONS
+
+Function GetHadoopJars { param (
+ [Parameter(Mandatory=$true)] [string] $HadoopVersion,
+ [Parameter(Mandatory=$true)] [string] $HadoopHome)
+ if ($HadoopVersion -ieq "0.20.1")
+ {
+ $jarsList = "$hadoopHome\hadoop*core*.jar"
+ }
+ elseif ($HadoopVersion -ieq "0.20.2")
+ {
+ $jarsList = "$hadoopHome\hadoop*core*.jar"
+ }
+ elseif ($HadoopVersion -ieq "0.20.104")
+ {
+ $jarsList =
+ "$hadoopHome\hadoop*core*.jar",
+ "$hadoopHome\lib\jackson-core-asl*.jar",
+ "$hadoopHome\lib\jackson-mapper-asl-*.jar"
+ }
+ else
+ {
+ $jarsList =
+ "$hadoopHome\hadoop-core-$HadoopVersion.jar",
+ "$hadoopHome\lib\jackson-core-asl*.jar",
+ "$hadoopHome\lib\jackson-mapper-asl-*.jar",
+ "$hadoopHome\lib\commons-configuration-*.jar"
+ }
+ $hadoopJars = @()
+ $jarsList | % { if ((Test-Path $_)) {
+ $hadoopJars += $_
+ }
+ else {
+ Write-Output "Unable to find Hadoop Jar '$_'"
+ }}
+ $hadoopJars
+}
+
+Function PrintUsage { param ()
+ Write-Output "Usage : oozie-setup.ps1 [OPTIONS]"
+ Write-Output " [-ExtJS EXTJS_PATH] (expanded or ZIP, to enable the Oozie webconsole)"
+ Write-Output " [-HadoopHome HADOOP_PATH -HadoopVersion HADOOP_VERSION] (Hadoop version [1.2.0-SNAPSHOT])"
+ Write-Output " (Hadoop version [1.2.0-SNAPSHOT])"
+ Write-Output " [-jars [JAR_PATH, ... ] ] "
+ Write-Output " EXTJS can be downloaded from http://www.extjs.com/learn/Ext_Version_Archives"
+}
+
+# MAIN()
+
+# The script will terminate if any steps fail
+$ErrorActionPreference = "Stop"
+
+# Constants
+$EXT_SUBDIR = "ext-2.2"
+$HADOOP_DEFAULT_VERSION = "1.2.0-SNAPSHOT"
+
+# Finds JAR.EXE
+
+$JAR_EXE=""
+if ($env:JAVA_HOME) {
+ $JAR_EXE = "$env:JAVA_HOME\bin\jar.exe"
+} else {
+ Write-Output "WARN: JAVA_HOME not defined. oozie-setup.ps1 will rely on the PATH environment variable to use JAR.exe"
+ $JAR_EXE = "jar.exe"
+}
+
+# Validates that both/neither $HadoopHome and $HadoopVersion are provided
+if ($HadoopHome -and !$HadoopVersion) {
+ PrintUsage
+ throw "Need to specify -HadoopVersion for -HadoopHome='$HadoopHome'"
+}
+if ($HadoopVersion -and !$HadoopHome) {
+ PrintUsage
+ throw "Need to specify -HadoopHome for -HadoopVersion='$HadoopHome'"
+}
+
+# Validates the input\output wars
+if (!(Test-Path $InputWar)){
+ PrintUsage
+ throw "Path '$InputWar' doesn't exist"
+}
+if (!$InputWar.ToLower().EndsWith(".war")){
+ PrintUsage
+ throw "Invalid input war file '$InputWar'"
+}
+if (!$OutputWar.ToLower().EndsWith(".war")){
+ PrintUsage
+ throw "Invalid input war file '$OutputWar'"
+}
+if ($OutputWar -ieq $InputWar){
+ PrintUsage
+ throw "Invalid output\input war file. Both parameters cannot be the same file"
+}
+# Deletes previous output wars.
+if (Test-Path $OutputWar){
+ Write-Output "Deleting existing output .war '$OutputWar'"
+ Remove-Item -Force -Path $OutputWar
+}
+
+# Selects\Creates the temp directory
+$OOZIE_HOME = (Split-Path $MyInvocation.MyCommand.Path) + "\.."
+$OOZIE_HOME = Resolve-Path $OOZIE_HOME
+$OOZIE_TEMP = "$OOZIE_HOME\temp"
+$OOZIE_WEB_INF_LIB = "$OOZIE_TEMP\WEB-INF\lib"
+
+Write-Output "Creating OOZIE_TEMP directory '$OOZIE_TEMP'"
+if (Test-Path "$OOZIE_TEMP") { Remove-Item "$OOZIE_TEMP" -Force -Recurse }
+$x = New-Item "$OOZIE_WEB_INF_LIB" -type directory
+
+# Creates the new OutputWar
+$x = Copy-Item $InputWar $OutputWar
+
+# Copy hadoop files
+if ($HadoopVersion -or $HadoopHome) {
+ Write-Output "Extracting files from path '$HadoopHome' from version '$HadoopVersion'"
+ if (!(Test-Path $HadoopHome)) { throw "Unable to find Hadoop Home '$HadoopHome'" }
+ $HadoopFiles = GetHadoopJars -HadoopVersion $HadoopVersion -HadoopHome $HadoopHome
+ $HadoopFiles | % {
+ Write-Output " Adding HadoopFiles: $_"
+ Copy-Item $_ $OOZIE_WEB_INF_LIB -force
+ }
+}
+
+# Copy EXT_JS files
+if ($ExtJS) {
+ Write-Output "ExtJS not currently supported!"
+}
+
+# Copy additional Jars
+$Jars | % {
+ Write-Output " Adding JarFiles: $_"
+ Copy-Item $_ $OOZIE_WEB_INF_LIB -force
+}
+
+$counter = (Get-ChildItem $OOZIE_WEB_INF_LIB).Length
+IF ($counter -gt 0) {
+ Write-Output "Adding files to the war file '$OutputWar'..."
+
+ "$JAR_EXE"
+
+ cmd /c $JAR_EXE uvf $OutputWar -C $OOZIE_TEMP WEB-INF\lib
+
+
+ if ($LASTEXITCODE -ne 0) {
+ throw "Unable to execute 'jar uvf'. Error ($LASTEXITCODE)"
+ }
+
+ Write-Output "Done! $counter files added"
+}
Added: oozie/trunk/distro/src/main/bin/oozie-sys.cmd
URL: http://svn.apache.org/viewvc/oozie/trunk/distro/src/main/bin/oozie-sys.cmd?rev=1527107&view=auto
==============================================================================
--- oozie/trunk/distro/src/main/bin/oozie-sys.cmd (added)
+++ oozie/trunk/distro/src/main/bin/oozie-sys.cmd Fri Sep 27 22:30:56 2013
@@ -0,0 +1,150 @@
+@rem echo off
+@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.
+
+@echo off
+
+set OOZIE_HOME=%~dp0..
+echo Setting OOZIE_HOME to '%OOZIE_HOME%'
+set oozie_home_tmp=%OOZIE_HOME%
+
+if not defined OOZIE_CONFIG (
+ set OOZIE_CONFIG=%OOZIE_HOME%\conf
+ echo "Setting OOZIE_CONFIG: %OOZIE_CONFIG%"
+) else (
+ echo "Using OOZIE_CONFIG: %OOZIE_CONFIG%"
+)
+set oozie_config_tmp=%OOZIE_CONFIG%
+
+@REM if the configuration dir has a env file, source it
+if exist "%OOZIE_CONFIG%\oozie-env.CMD" (
+ ECHO "Sourcing: %OOZIE_CONFIG%\oozie-env.cmd"
+ call %OOZIE_CONFIG%\oozie-env.cmd
+)
+
+@REM verify that the sourced env file didn't change OOZIE_HOME
+@REM if so, warn and revert
+if not "%OOZIE_HOME%" == "%oozie_home_tmp%" (
+ echo "WARN: OOZIE_HOME resetting to ''%OOZIE_HOME%' ignored"
+ set OOZIE_HOME=%oozie_home_tmp%
+)
+
+@REM verify that the sourced env file didn't change OOZIE_CONFIG
+@REM if so, warn and revert
+if not "%OOZIE_CONFIG%" == "%oozie_config_tmp%" (
+ print "WARN: OOZIE_CONFIG resetting to ''%OOZIE_CONFIG%'' ignored"
+ set OOZIE_CONFIG=%oozie_config_tmp%
+)
+
+if not defined OOZIE_CONFIG_FILE (
+ set OOZIE_CONFIG_FILE=oozie-site.xml
+ echo Setting OOZIE_CONFIG_FILE: '%OOZIE_CONFIG_FILE%'
+) else (
+ echo Using OOZIE_CONFIG_FILE: '%OOZIE_CONFIG_FILE%'
+)
+
+if not defined OOZIE_DATA (
+ set OOZIE_DATA=%OOZIE_HOME%\data
+ echo Setting OOZIE_DATA: '%OOZIE_DATA%'
+) else (
+ echo Using OOZIE_DATA: '%OOZIE_DATA%'
+)
+
+if not defined OOZIE_LOG (
+ set OOZIE_LOG=%OOZIE_HOME%\logs
+ echo Setting OOZIE_LOG: '%OOZIE_LOG%'
+) else (
+ echo Using OOZIE_LOG: '%OOZIE_LOG%'
+)
+
+if not exist %OOZIE_LOG% (
+ echo Creating log directory: %OOZIE_LOG%
+ md %OOZIE_LOG%
+) else (
+ echo Using log directory: %OOZIE_LOG%
+)
+
+if not defined OOZIE_LOG4J_FILE (
+ set OOZIE_LOG4J_FILE=oozie-log4j.properties
+ echo Setting OOZIE_LOG4J_FILE: '%OOZIE_LOG4J_FILE%'
+) else (
+ echo Using OOZIE_LOG4J_FILE: '%OOZIE_LOG4J_FILE%'
+)
+
+if not defined OOZIE_LOG4J_RELOAD (
+ set OOZIE_LOG4J_RELOAD=10
+ echo Setting OOZIE_LOG4J_RELOAD: '%OOZIE_LOG4J_RELOAD%'
+) else (
+ echo Using OOZIE_LOG4J_RELOAD: '%OOZIE_LOG4J_RELOAD%'
+)
+
+if not defined OOZIE_HTTP_HOSTNAME (
+ set OOZIE_HTTP_HOSTNAME=%COMPUTERNAME%
+ echo Setting OOZIE_HTTP_HOSTNAME: '%OOZIE_HTTP_HOSTNAME%'
+) else (
+ echo Using OOZIE_HTTP_HOSTNAME: '%OOZIE_HTTP_HOSTNAME%'
+)
+
+if not defined OOZIE_HTTP_PORT (
+ set OOZIE_HTTP_PORT=11000
+ echo Setting OOZIE_HTTP_PORT: '%OOZIE_HTTP_PORT%'
+) else (
+ echo Using OOZIE_HTTP_PORT: '%OOZIE_HTTP_PORT%'
+)
+
+if not defined OOZIE_ADMIN_PORT (
+ SET /a OOZIE_ADMIN_PORT=%OOZIE_HTTP_PORT%+1
+ echo Setting OOZIE_ADMIN_PORT: '%OOZIE_ADMIN_PORT%'
+) else (
+ echo Using OOZIE_ADMIN_PORT: '%OOZIE_ADMIN_PORT%'
+)
+
+if not defined OOZIE_BASE_URL (
+ set OOZIE_BASE_URL=http://%OOZIE_HTTP_HOSTNAME%:%OOZIE_HTTP_PORT%/oozie
+ echo Setting OOZIE_BASE_URL: '%OOZIE_BASE_URL%'
+) else (
+ echo Using OOZIE_BASE_URL: '%OOZIE_BASE_URL%'
+)
+
+if not defined CATALINA_BASE (
+ set CATALINA_BASE=%OOZIE_HOME%\oozie-server
+ echo Setting CATALINA_BASE: '%CATALINA_BASE%'
+) else (
+ echo Using CATALINA_BASE: '%CATALINA_BASE%'
+)
+
+
+if not defined CATALINA_HOME (
+ set CATALINA_HOME=%OOZIE_HOME%\oozie-server
+ echo Setting CATALINA_HOME: '%CATALINA_HOME%'
+) else (
+ echo Using CATALINA_HOME: '%CATALINA_HOME%'
+)
+
+if not defined CATALINA_OUT (
+ set CATALINA_OUT=%OOZIE_LOG%\catalina.out
+ echo Setting CATALINA_OUT: '%CATALINA_OUT%'
+) else (
+ echo Using CATALINA_OUT: '%CATALINA_OUT%'
+)
+
+if not defined CATALINA_PID (
+ set CATALINA_PID=%OOZIE_HOME%\oozie-server\temp\oozie.pid
+ echo Setting CATALINA_PID: '%CATALINA_PID%'
+) else (
+ echo Using CATALINA_PID: '%CATALINA_PID%'
+)
+
+set CATALINA_OPTS=%CATALINA_OPTS% -Dderby.stream.error.file=%OOZIE_LOG%\derby.log
Added: oozie/trunk/distro/src/main/bin/oozie.cmd
URL: http://svn.apache.org/viewvc/oozie/trunk/distro/src/main/bin/oozie.cmd?rev=1527107&view=auto
==============================================================================
--- oozie/trunk/distro/src/main/bin/oozie.cmd (added)
+++ oozie/trunk/distro/src/main/bin/oozie.cmd Fri Sep 27 22:30:56 2013
@@ -0,0 +1,57 @@
+@rem Licensed to the Apache Software Foundation (ASF) under one
+@rem or more contributor license agreements. See the NOTICE file
+@rem distributed with this work for additional information
+@rem regarding copyright ownership. The ASF licenses this file
+@rem to you under the Apache License, Version 2.0 (the
+@rem "License"); you may not use this file except in compliance
+@rem with 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.
+
+@echo off
+setlocal enabledelayedexpansion
+
+set BASEDIR=%~dp0..
+
+set OOZIECPPATH=.
+
+for %%i IN (%BASEDIR%\lib\*.jar) do set OOZIECPPATH=!OOZIECPPATH!;%%i
+
+set JAVA_PROPERTIES=
+set OOZIE_PROPERTIES=
+
+:copyJavaProperties
+set str=%~1
+if "%str:~0,2%"=="-D" (
+ set JAVA_PROPERTIES=!JAVA_PROPERTIES! %str%
+) else (
+ goto :copyOozieProperties
+)
+SHIFT
+goto :copyJavaProperties
+
+:copyOozieProperties
+set str=%~1
+if not "%str%"=="" (
+ set OOZIE_PROPERTIES=!OOZIE_PROPERTIES! %str%
+) else (
+ goto :startExecuting
+)
+SHIFT
+goto :copyOozieProperties
+
+:startExecuting
+
+if "%JAVA_HOME%"=="" (
+ set JAVA_BIN=java
+) else (
+ set JAVA_BIN=%JAVA_HOME%\bin\java
+)
+
+%JAVA_BIN% %JAVA_PROPERTIES% -cp %OOZIECPPATH% org.apache.oozie.cli.OozieCLI %OOZIE_PROPERTIES%
Added: oozie/trunk/distro/src/main/bin/oozied.cmd
URL: http://svn.apache.org/viewvc/oozie/trunk/distro/src/main/bin/oozied.cmd?rev=1527107&view=auto
==============================================================================
--- oozie/trunk/distro/src/main/bin/oozied.cmd (added)
+++ oozie/trunk/distro/src/main/bin/oozied.cmd Fri Sep 27 22:30:56 2013
@@ -0,0 +1,89 @@
+@rem Licensed to the Apache Software Foundation (ASF) under one
+@rem or more contributor license agreements. See the NOTICE file
+@rem distributed with this work for additional information
+@rem regarding copyright ownership. The ASF licenses this file
+@rem to you under the Apache License, Version 2.0 (the
+@rem "License"); you may not use this file except in compliance
+@rem with 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.
+
+@echo off
+
+set argC=0
+for %%x in (%*) do Set /A argC+=1
+
+if %argC% == 0 (
+ echo "Usage: oozied.cmd (start|stop|run) [<catalina-args...>]"
+ exit 1
+)
+
+set actionCmd=%1
+
+set BASEDIR=%~dp0
+call %BASEDIR%\oozie-sys.cmd
+
+
+set CATALINA=%BASEDIR%\..\oozie-server\bin\catalina.bat
+
+if "%actionCmd%" == "start" goto setup_catalina_opts
+if "%actionCmd%" == "run" goto setup_catalina_opts
+
+goto exec_catalina
+
+:setup
+ echo "WARN: Oozie WAR has not been set up at '%CATALINA_BASE%\webapps', doing default set up"
+ call %BASEDIR%\bin\oozie-setup.cmd
+ if errorlevel 1(
+ exit /b %errorlevel%
+ )
+ goto :EOF
+
+:setup_catalina_opts
+ @REM The Java System property 'oozie.http.port' it is not used by Oozie,
+ @REM it is used in Tomcat's server.xml configuration file
+
+ echo "Using CATALINA_OPTS: %CATALINA_OPTS%"
+ echo "OOZIE_HOME" %OOZIE_HOME%
+ set catalina_opts_tmp=-Doozie.home.dir=%OOZIE_HOME%
+ set catalina_opts_tmp=%catalina_opts_tmp% -Doozie.config.dir=%OOZIE_CONFIG%
+ set catalina_opts_tmp=%catalina_opts_tmp% -Doozie.log.dir=%OOZIE_LOG%
+ set catalina_opts_tmp=%catalina_opts_tmp% -Doozie.data.dir=%OOZIE_DATA%
+
+ set catalina_opts_tmp=%catalina_opts_tmp% -Doozie.config.file=%OOZIE_CONFIG_FILE%
+
+ set catalina_opts_tmp=%catalina_opts_tmp% -Doozie.log4j.file=%OOZIE_LOG4J_FILE%
+ set catalina_opts_tmp=%catalina_opts_tmp% -Doozie.log4j.reload=%OOZIE_LOG4J_RELOAD%
+
+ set catalina_opts_tmp=%catalina_opts_tmp% -Doozie.http.=%OOZIE_HTTP_HOSTNAME%
+ set catalina_opts_tmp=%catalina_opts_tmp% -Doozie.http.port=%OOZIE_HTTP_PORT%
+ set catalina_opts_tmp=%catalina_opts_tmp% -Doozie.base.url=%OOZIE_BASE_URL%
+
+
+ echo "Adding to CATALINA_OPTS: %catalina_opts_tmp%"
+ set CATALINA_OPTS=%CATALINA_OPTS% %catalina_opts_tmp%
+ echo CATALINA_OPTS: %CATALINA_OPTS%
+
+:setup_oozie
+ if NOT EXIST "%CATALINA_BASE%\webapps\oozie.war" call setup
+
+
+:exec_catalina
+ ECHO EXECUTING CATALINA "%CATALINA% %actionCmd%"
+ call %CATALINA% %actionCmd%
+ if errorlevel 1 (
+ echo
+ echo "ERROR: Oozie %actionCmd% aborted"
+ echo
+ exit /b %errorlevel%
+ ) else (
+ echo
+ echo "Oozie %actionCmd% succeeded"
+ echo
+ )
Modified: oozie/trunk/release-log.txt
URL: http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1527107&r1=1527106&r2=1527107&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Fri Sep 27 22:30:56 2013
@@ -1,5 +1,6 @@
-- Oozie 4.1.0 release (trunk - unreleased)
+OOZIE-1523 Create Windows versions of the shell scripts (dwann via rkanter)
OOZIE-1558 RAT Warning from BundleActionsGetJPAExecutor.java (rkanter)
OOZIE-1557 TestFsActionExecutor.testChmodWithGlob fails against Hadoop 2.1.x-beta (rkanter)
OOZIE-1503 [DB optimization] revisit eagerLoadState at places (mona)
Added: oozie/trunk/tools/src/main/bin/ooziedb.cmd
URL: http://svn.apache.org/viewvc/oozie/trunk/tools/src/main/bin/ooziedb.cmd?rev=1527107&view=auto
==============================================================================
--- oozie/trunk/tools/src/main/bin/ooziedb.cmd (added)
+++ oozie/trunk/tools/src/main/bin/ooziedb.cmd Fri Sep 27 22:30:56 2013
@@ -0,0 +1,68 @@
+@rem Licensed to the Apache Software Foundation (ASF) under one
+@rem or more contributor license agreements. See the NOTICE file
+@rem distributed with this work for additional information
+@rem regarding copyright ownership. The ASF licenses this file
+@rem to you under the Apache License, Version 2.0 (the
+@rem "License"); you may not use this file except in compliance
+@rem with 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.
+
+@echo off
+setlocal enabledelayedexpansion
+
+set BASEDIR=%~dp0..
+pushd %BASEDIR%
+set BASEDIR=%cd%
+popd
+
+set OOZIE_HOME=%BASEDIR%
+set OOZIE_CONFIG=%OOZIE_HOME%\conf
+set OOZIE_LOG=%OOZIE_HOME%\logs
+set OOZIE_DATA=%OOZIE_HOME%\data
+
+@rem Verify the \conf directory is available
+if not exist %OOZIE_CONFIG%\NUL (
+ echo.
+ echo."ERROR: Oozie configuration directory could not be found at %OOZIE_CONFIG%"
+ echo.
+ exit 1
+)
+
+@rem Check if oozie-env.cmd is provided under \bin and import user defined
+@rem settings defined in it if it exists
+if exist "%OOZIE_HOME%\bin\oozie-env.cmd" (
+ call "%OOZIE_HOME%\bin\oozie-env.cmd"
+)
+if exist "%OOZIE_CONFIG%\oozie-env.cmd" (
+ call "%OOZIE_CONFIG%\oozie-env.cmd"
+)
+
+@rem Set Oozie Options
+set OOZIEDB_OPTS=-Doozie.home.dir=%OOZIE_HOME%
+set OOZIEDB_OPTS=%OOZIEDB_OPTS% -Doozie.config.dir=%OOZIE_CONFIG%
+set OOZIEDB_OPTS=%OOZIEDB_OPTS% -Doozie.log.dir=%OOZIE_LOG%
+set OOZIEDB_OPTS=%OOZIEDB_OPTS% -Doozie.data.dir=%OOZIE_DATA%
+
+@rem Set Classpath to load oozie dependencies
+set OOZIECPPATH=.
+
+@rem Add libtools to the classpath
+for %%i in (%BASEDIR%\libtools\*.jar) do set OOZIECPPATH=!OOZIECPPATH!;%%i
+@rem Add libext to the classpath
+for %%i in (%BASEDIR%\libext\*.jar) do set OOZIECPPATH=!OOZIECPPATH!;%%i
+
+@rem Set JAVA_BIN based on JAVA_HOME
+if "%JAVA_HOME%"=="" (
+ set JAVA_BIN=java
+) else (
+ set JAVA_BIN=%JAVA_HOME%\bin\java
+)
+
+%JAVA_BIN% %JAVA_PROPERTIES% %OOZIEDB_OPTS% -classpath %OOZIECPPATH% org.apache.oozie.tools.OozieDBCLI %*