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
9 @rem http://www.apache.org/licenses/LICENSE-2.0
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.
17 @rem User for YARN daemons
18 if not defined HADOOP_YARN_USER (
19 set HADOOP_YARN_USER=%yarn%
22 if not defined YARN_CONF_DIR (
23 set YARN_CONF_DIR=%HADOOP_YARN_HOME%\conf
26 if defined YARN_HEAPSIZE (
27 @rem echo run with Java heapsize %YARN_HEAPSIZE%
28 set JAVA_HEAP_MAX=-Xmx%YARN_HEAPSIZE%m
31 if not defined YARN_LOG_DIR (
32 set YARN_LOG_DIR=%HADOOP_YARN_HOME%\logs
35 if not defined YARN_LOGFILE (
36 set YARN_LOGFILE=yarn.log
39 @rem default policy file for service-level authorization
40 if not defined YARN_POLICYFILE (
41 set YARN_POLICYFILE=hadoop-policy.xml
44 if not defined YARN_ROOT_LOGGER (
45 set YARN_ROOT_LOGGER=INFO,console
48 set YARN_OPTS=%YARN_OPTS% -Dhadoop.log.dir=%YARN_LOG_DIR%
49 set YARN_OPTS=%YARN_OPTS% -Dyarn.log.dir=%YARN_LOG_DIR%
50 set YARN_OPTS=%YARN_OPTS% -Dhadoop.log.file=%YARN_LOGFILE%
51 set YARN_OPTS=%YARN_OPTS% -Dyarn.log.file=%YARN_LOGFILE%
52 set YARN_OPTS=%YARN_OPTS% -Dyarn.home.dir=%HADOOP_YARN_HOME%
53 set YARN_OPTS=%YARN_OPTS% -Dyarn.id.str=%YARN_IDENT_STRING%
54 set YARN_OPTS=%YARN_OPTS% -Dhadoop.home.dir=%HADOOP_YARN_HOME%
55 set YARN_OPTS=%YARN_OPTS% -Dhadoop.root.logger=%YARN_ROOT_LOGGER%
56 set YARN_OPTS=%YARN_OPTS% -Dyarn.root.logger=%YARN_ROOT_LOGGER%
57 if defined JAVA_LIBRARY_PATH (
58 set YARN_OPTS=%YARN_OPTS% -Djava.library.path=%JAVA_LIBRARY_PATH%
60 set YARN_OPTS=%YARN_OPTS% -Dyarn.policy.file=%YARN_POLICYFILE%