hadoop 配置文檔

安裝ssh
sudo apt-get install ssh

sudo apt-gert install rsync

ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa

yarn-site.xml
<?xml version="1.0"?>

<configuration>


<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<property>
<name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
<value>org.apache.hadoop.mapred.ShuffleHandler</value>
</property>
</configuration>


mapred-site.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>


core-site.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>


hadoop-env.sh

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.

Set Hadoop-specific environment variables here.

The only required environment variable is JAVA_HOME. All others are

optional. When running a distributed configuration it is best to

set JAVA_HOME in this file, so that it is correctly defined on

remote nodes.

The java implementation to use.

export JAVA_HOME=${JAVA_HOME}

export JAVA_HOME=/usr/lib/jvm/java-8-oracle

The jsvc implementation to use. Jsvc is required to run secure datanodes

that bind to privileged ports to provide authentication of data transfer

protocol. Jsvc is not required if SASL is configured for authentication of

data transfer protocol using non-privileged ports.

export JSVC_HOME=${JSVC_HOME}

export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-"/etc/hadoop"}

Extra Java CLASSPATH elements. Automatically insert capacity-scheduler.

for f in $HADOOP_HOME/contrib/capacity-scheduler/*.jar; do
if [ "$HADOOP_CLASSPATH" ]; then
export HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$f
else
export HADOOP_CLASSPATH=$f
fi
done

The maximum amount of heap to use, in MB. Default is 1000.

export HADOOP_HEAPSIZE=

export HADOOP_NAMENODE_INIT_HEAPSIZE=""

Extra Java runtime options. Empty by default.

export HADOOP_OPTS="$HADOOP_OPTS -Djava.net.preferIPv4Stack=true"

Command specific options appended to HADOOP_OPTS when specified

export HADOOP_NAMENODE_OPTS="-Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,RFAS} -Dhdfs.audit.logger=${HDFS_AUDIT_LOGGER:-INFO,NullAppender} $HADOOP_NAMENODE_OPTS"
export HADOOP_DATANODE_OPTS="-Dhadoop.security.logger=ERROR,RFAS $HADOOP_DATANODE_OPTS"

export HADOOP_SECONDARYNAMENODE_OPTS="-Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,RFAS} -Dhdfs.audit.logger=${HDFS_AUDIT_LOGGER:-INFO,NullAppender} $HADOOP_SECONDARYNAMENODE_OPTS"

export HADOOP_NFS3_OPTS="$HADOOP_NFS3_OPTS"
export HADOOP_PORTMAP_OPTS="-Xmx512m $HADOOP_PORTMAP_OPTS"

The following applies to multiple commands (fs, dfs, fsck, distcp etc)

export HADOOP_CLIENT_OPTS="-Xmx512m $HADOOP_CLIENT_OPTS"

HADOOP_JAVA_PLATFORM_OPTS="-XX:-UsePerfData $HADOOP_JAVA_PLATFORM_OPTS"

On secure datanodes, user to run the datanode as after dropping privileges.

This MUST be uncommented to enable secure HDFS if using privileged ports

to provide authentication of data transfer protocol. This MUST NOT be

defined if SASL is configured for authentication of data transfer protocol

using non-privileged ports.

export HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER}

Where log files are stored. $HADOOP_HOME/logs by default.

export HADOOP_LOG_DIR=${HADOOP_LOG_DIR}/$USER

Where log files are stored in the secure data environment.

export HADOOP_SECURE_DN_LOG_DIR=${HADOOP_LOG_DIR}/${HADOOP_HDFS_USER}

HDFS Mover specific parameters

Specify the JVM options to be used when starting the HDFS Mover.

These options will be appended to the options specified as HADOOP_OPTS

and therefore may override any similar flags set in HADOOP_OPTS

export HADOOP_MOVER_OPTS=""

Advanced Users Only!

The directory where pid files are stored. /tmp by default.

NOTE: this should be set to a directory that can only be written to by

the user that will run the hadoop daemons. Otherwise there is the

potential for a symlink attack.

export HADOOP_PID_DIR=${HADOOP_PID_DIR}
export HADOOP_SECURE_DN_PID_DIR=${HADOOP_PID_DIR}

A string representing this instance of hadoop. $USER by default.

export HADOOP_IDENT_STRING=$USER

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末同诫,一起剝皮案震驚了整個(gè)濱河市赏僧,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌定欧,老刑警劉巖匹耕,帶你破解...
    沈念sama閱讀 217,406評(píng)論 6 503
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件聚请,死亡現(xiàn)場離奇詭異,居然都是意外死亡稳其,警方通過查閱死者的電腦和手機(jī)驶赏,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,732評(píng)論 3 393
  • 文/潘曉璐 我一進(jìn)店門炸卑,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人煤傍,你說我怎么就攤上這事矾兜。” “怎么了患久?”我有些...
    開封第一講書人閱讀 163,711評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵椅寺,是天一觀的道長。 經(jīng)常有香客問我蒋失,道長返帕,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,380評(píng)論 1 293
  • 正文 為了忘掉前任篙挽,我火速辦了婚禮荆萤,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘铣卡。我一直安慰自己链韭,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,432評(píng)論 6 392
  • 文/花漫 我一把揭開白布煮落。 她就那樣靜靜地躺著敞峭,像睡著了一般。 火紅的嫁衣襯著肌膚如雪蝉仇。 梳的紋絲不亂的頭發(fā)上旋讹,一...
    開封第一講書人閱讀 51,301評(píng)論 1 301
  • 那天,我揣著相機(jī)與錄音轿衔,去河邊找鬼沉迹。 笑死,一個(gè)胖子當(dāng)著我的面吹牛害驹,可吹牛的內(nèi)容都是我干的鞭呕。 我是一名探鬼主播,決...
    沈念sama閱讀 40,145評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼宛官,長吁一口氣:“原來是場噩夢(mèng)啊……” “哼葫松!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起摘刑,我...
    開封第一講書人閱讀 39,008評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤进宝,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后枷恕,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體党晋,經(jīng)...
    沈念sama閱讀 45,443評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,649評(píng)論 3 334
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了未玻。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片灾而。...
    茶點(diǎn)故事閱讀 39,795評(píng)論 1 347
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖扳剿,靈堂內(nèi)的尸體忽然破棺而出旁趟,到底是詐尸還是另有隱情,我是刑警寧澤庇绽,帶...
    沈念sama閱讀 35,501評(píng)論 5 345
  • 正文 年R本政府宣布锡搜,位于F島的核電站,受9級(jí)特大地震影響瞧掺,放射性物質(zhì)發(fā)生泄漏耕餐。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,119評(píng)論 3 328
  • 文/蒙蒙 一辟狈、第九天 我趴在偏房一處隱蔽的房頂上張望肠缔。 院中可真熱鬧,春花似錦哼转、人聲如沸明未。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,731評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽趟妥。三九已至,卻和暖如春庶溶,著一層夾襖步出監(jiān)牢的瞬間煮纵,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 32,865評(píng)論 1 269
  • 我被黑心中介騙來泰國打工偏螺, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人匆光。 一個(gè)月前我還...
    沈念sama閱讀 47,899評(píng)論 2 370
  • 正文 我出身青樓套像,卻偏偏與公主長得像,于是被迫代替她去往敵國和親终息。 傳聞我的和親對(duì)象是個(gè)殘疾皇子夺巩,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,724評(píng)論 2 354