blob: a85e411cb65d98bff09f56509ed25fc4c2e23284 [file] [log] [blame]
Ian Maxon69375a12015-06-29 16:12:53 -07001@echo off
2@rem Licensed to the Apache Software Foundation (ASF) under one or more
3@rem contributor license agreements. See the NOTICE file distributed with
4@rem this work for additional information regarding copyright ownership.
5@rem The ASF licenses this file to You under the Apache License, Version 2.0
6@rem (the "License"); you may not use this file except in compliance with
7@rem the License. You may obtain a copy of the License at
8@rem
9@rem http://www.apache.org/licenses/LICENSE-2.0
10@rem
11@rem Unless required by applicable law or agreed to in writing, software
12@rem distributed under the License is distributed on an "AS IS" BASIS,
13@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14@rem See the License for the specific language governing permissions and
15@rem limitations under the License.
16
17setlocal enabledelayedexpansion
18
19if not defined HADOOP_BIN_PATH (
20 set HADOOP_BIN_PATH=%~dp0
21)
22
23if "%HADOOP_BIN_PATH:~-1%" == "\" (
24 set HADOOP_BIN_PATH=%HADOOP_BIN_PATH:~0,-1%
25)
26
27set DEFAULT_LIBEXEC_DIR=%HADOOP_BIN_PATH%\..\libexec
28if not defined HADOOP_LIBEXEC_DIR (
29 set HADOOP_LIBEXEC_DIR=%DEFAULT_LIBEXEC_DIR%
30)
31
32:main
33
34 set CLASS=edu.uci.ics.asterix.aoya.AsterixYARNClient
35
36 @rem JAVA and JAVA_HEAP_MAX and set in hadoop-config.cmd
37
38 if defined YARN_HEAPSIZE (
39 @rem echo run with Java heapsize %YARN_HEAPSIZE%
40 set JAVA_HEAP_MAX=-Xmx%YARN_HEAPSIZE%m
41 )
42
43 @rem CLASSPATH initially contains HADOOP_CONF_DIR & YARN_CONF_DIR
44 if not defined HADOOP_CONF_DIR (
45 echo No HADOOP_CONF_DIR set.
46 echo Please specify it either in yarn-env.cmd or in the environment.
47 goto :eof
48 )
49
50 set CLASSPATH=%HADOOP_CONF_DIR%;%YARN_CONF_DIR%;%CLASSPATH%;Z:\lib\*
51
52 @rem for developers, add Hadoop classes to CLASSPATH
53 if exist %HADOOP_YARN_HOME%\yarn-api\target\classes (
54 set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\yarn-api\target\classes
55 )
56
57 if exist %HADOOP_YARN_HOME%\yarn-common\target\classes (
58 set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\yarn-common\target\classes
59 )
60
61 if exist %HADOOP_YARN_HOME%\yarn-mapreduce\target\classes (
62 set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\yarn-mapreduce\target\classes
63 )
64
65 if exist %HADOOP_YARN_HOME%\yarn-master-worker\target\classes (
66 set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\yarn-master-worker\target\classes
67 )
68
69 if exist %HADOOP_YARN_HOME%\yarn-server\yarn-server-nodemanager\target\classes (
70 set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\yarn-server\yarn-server-nodemanager\target\classes
71 )
72
73 if exist %HADOOP_YARN_HOME%\yarn-server\yarn-server-common\target\classes (
74 set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\yarn-server\yarn-server-common\target\classes
75 )
76
77 if exist %HADOOP_YARN_HOME%\yarn-server\yarn-server-resourcemanager\target\classes (
78 set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\yarn-server\yarn-server-resourcemanager\target\classes
79 )
80
81 if exist %HADOOP_YARN_HOME%\build\test\classes (
82 set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\build\test\classes
83 )
84
85 if exist %HADOOP_YARN_HOME%\build\tools (
86 set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\build\tools
87 )
88
89 set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\%YARN_DIR%\*
90 set CLASSPATH=%CLASSPATH%;%HADOOP_YARN_HOME%\%YARN_LIB_JARS_DIR%\*
91
92
93
94 if defined JAVA_LIBRARY_PATH (
95 set YARN_OPTS=%YARN_OPTS% -Djava.library.path=%JAVA_LIBRARY_PATH%
96 )
97
98 set java_arguments=%JAVA_HEAP_MAX% %YARN_OPTS% -classpath %CLASSPATH% %CLASS%
99 call java %java_arguments% %*
100
101goto :eof
102
103endlocal