|
| 1 | +@echo off |
| 2 | + |
| 3 | +REM Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 | +REM contributor license agreements. See the NOTICE file distributed with |
| 5 | +REM this work for additional information regarding copyright ownership. |
| 6 | +REM The ASF licenses this file to You under the Apache License, Version 2.0 |
| 7 | +REM (the "License"); you may not use this file except in compliance with |
| 8 | +REM the License. You may obtain a copy of the License at |
| 9 | +REM |
| 10 | +REM http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +REM |
| 12 | +REM Unless required by applicable law or agreed to in writing, software |
| 13 | +REM distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +REM See the License for the specific language governing permissions and |
| 16 | +REM limitations under the License. |
| 17 | + |
| 18 | +if not defined ZEPPELIN_HOME ( |
| 19 | + for %%d in ("%~dp0..") do ( |
| 20 | + set ZEPPELIN_HOME=%%~fd |
| 21 | + ) |
| 22 | +) |
| 23 | + |
| 24 | +if not defined ZEPPELIN_CONF_DIR ( |
| 25 | + set ZEPPELIN_CONF_DIR=%ZEPPELIN_HOME%\conf |
| 26 | +) |
| 27 | + |
| 28 | +if not defined ZEPPELIN_LOG_DIR ( |
| 29 | + set ZEPPELIN_LOG_DIR=%ZEPPELIN_HOME%\logs |
| 30 | +) |
| 31 | + |
| 32 | +if not defined ZEPPELIN_NOTEBOOK_DIR ( |
| 33 | + set ZEPPELIN_NOTEBOOK_DIR=%ZEPPELIN_HOME%\notebook |
| 34 | +) |
| 35 | + |
| 36 | +if not defined ZEPPELIN_PID_DIR ( |
| 37 | + set ZEPPELIN_PID_DIR=%ZEPPELIN_HOME%\run |
| 38 | +) |
| 39 | + |
| 40 | +if not defined ZEPPELIN_WAR ( |
| 41 | + if exist "%ZEPPELIN_HOME%\zeppelin-web\dist" ( |
| 42 | + set ZEPPELIN_WAR=%ZEPPELIN_HOME%\zeppelin-web\dist |
| 43 | + ) else ( |
| 44 | + for %%d in ("%ZEPPELIN_HOME%\zeppelin-web*.war") do ( |
| 45 | + set ZEPPELIN_WAR=%%d |
| 46 | + ) |
| 47 | + ) |
| 48 | +) |
| 49 | + |
| 50 | +if not defined ZEPPELIN_INTERPRETER_DIR ( |
| 51 | + set ZEPPELIN_INTERPRETER_DIR=%ZEPPELIN_HOME%\interpreter |
| 52 | +) |
| 53 | + |
| 54 | +if exist "%ZEPPELIN_CONF_DIR%\zeppelin-env.cmd" ( |
| 55 | + call "%ZEPPELIN_CONF_DIR%\zeppelin-env.cmd" |
| 56 | +) |
| 57 | + |
| 58 | +if not defined ZEPPELIN_CLASSPATH ( |
| 59 | + set ZEPPELIN_CLASSPATH="%ZEPPELIN_CONF_DIR%" |
| 60 | +) else ( |
| 61 | + set ZEPPELIN_CLASSPATH=%ZEPPELIN_CLASSPATH%;"%ZEPPELIN_CONF_DIR%" |
| 62 | +) |
| 63 | + |
| 64 | +if not defined ZEPPELIN_ENCODING ( |
| 65 | + set ZEPPELIN_ENCODING=UTF-8 |
| 66 | +) |
| 67 | + |
| 68 | +if not defined ZEPPELIN_MEM ( |
| 69 | + set ZEPPELIN_MEM=-Xms1024m -Xmx1024m -XX:MaxPermSize=512m |
| 70 | +) |
| 71 | + |
| 72 | +if not defined ZEPPELIN_JAVA_OPTS ( |
| 73 | + set ZEPPELIN_JAVA_OPTS=-Dfile.encoding=%ZEPPELIN_ENCODING% %ZEPPELIN_MEM% |
| 74 | +) else ( |
| 75 | + set ZEPPELIN_JAVA_OPTS=%ZEPPELIN_JAVA_OPTS% -Dfile.encoding=%ZEPPELIN_ENCODING% %ZEPPELIN_MEM% |
| 76 | +) |
| 77 | + |
| 78 | +if not defined JAVA_OPTS ( |
| 79 | + set JAVA_OPTS=%ZEPPELIN_JAVA_OPTS% |
| 80 | +) else ( |
| 81 | + set JAVA_OPTS=%JAVA_OPTS% %ZEPPELIN_JAVA_OPTS% |
| 82 | +) |
| 83 | + |
| 84 | +if not defined ZEPPELIN_INTP_JAVA_OPTS ( |
| 85 | + set ZEPPELIN_INTP_JAVA_OPTS=%ZEPPELIN_JAVA_OPTS% |
| 86 | +) |
| 87 | + |
| 88 | +if not defined ZEPPELIN_INTP_MEM ( |
| 89 | + set ZEPPELIN_INTP_MEM=%ZEPPELIN_MEM% |
| 90 | +) |
| 91 | + |
| 92 | +set JAVA_INTP_OPTS=%ZEPPELIN_INTP_JAVA_OPTS% -Dfile.encoding=%ZEPPELIN_ENCODING% |
| 93 | + |
| 94 | +if not defined JAVA_HOME ( |
| 95 | + set ZEPPELIN_RUNNER=java |
| 96 | +) else ( |
| 97 | + set ZEPPELIN_RUNNER=%JAVA_HOME%\bin\java |
| 98 | +) |
| 99 | + |
| 100 | +if not defined ZEPPELIN_IDENT_STRING ( |
| 101 | + set ZEPPELIN_IDENT_STRING=%USERNAME% |
| 102 | +) |
| 103 | + |
| 104 | +if not defined DEBUG ( |
| 105 | + set DEBUG=0 |
| 106 | +) |
| 107 | + |
| 108 | +if not defined ZEPPELIN_INTERPRETER_REMOTE_RUNNER ( |
| 109 | + set ZEPPELIN_INTERPRETER_REMOTE_RUNNER=bin\interpreter.cmd |
| 110 | +) |
| 111 | + |
| 112 | +exit /b |
0 commit comments