OSDN Git Service

add Apache Hadoop 2.2.0 support to the hadoop cookbooks.
[metasearch/grid-chef-repo.git] / cookbooks / hadoop / templates / default / etc-2.2 / hadoop / yarn-env.cmd
1 @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
17 @rem User for YARN daemons
18 if not defined HADOOP_YARN_USER (
19   set HADOOP_YARN_USER=%yarn%
20 )
21
22 if not defined YARN_CONF_DIR (
23   set YARN_CONF_DIR=%HADOOP_YARN_HOME%\conf
24 )
25
26 if defined YARN_HEAPSIZE (
27   @rem echo run with Java heapsize %YARN_HEAPSIZE%
28   set JAVA_HEAP_MAX=-Xmx%YARN_HEAPSIZE%m
29 )
30
31 if not defined YARN_LOG_DIR (
32   set YARN_LOG_DIR=%HADOOP_YARN_HOME%\logs
33 )
34
35 if not defined YARN_LOGFILE (
36   set YARN_LOGFILE=yarn.log
37 )
38
39 @rem default policy file for service-level authorization
40 if not defined YARN_POLICYFILE (
41   set YARN_POLICYFILE=hadoop-policy.xml
42 )
43
44 if not defined YARN_ROOT_LOGGER (
45   set YARN_ROOT_LOGGER=INFO,console
46 )
47
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%
59 )
60 set YARN_OPTS=%YARN_OPTS% -Dyarn.policy.file=%YARN_POLICYFILE%