用户设置
sudo useradd –m hadoop –s /bin/bash sudo passwd hadoop sudo adduser hadoop sudo sudo tar -zxf ~/下载/hadoop-2.6.0.tar.gz -C /usr/local # 解压到/usr/local中 cd /usr/local/ sudo mv ./hadoop-2.6.0/ ./hadoop # 将文件夹名改为hadoop sudo chown -R hadoop:hadoop ./hadoop # 修改文件权限 cd /usr/local/hadoop ./bin/hadoop version
eclipse 安装
sudo yum install eclipse
安装 Hadoop-Eclipse-Plugin
要在 Eclipse 上编译和运行 MapReduce 程序,需要安装 hadoop-eclipse-plugin,可下载 Github 上的 hadoop2x-eclipse-plugin
下载后,将 release 中的 hadoop-eclipse-kepler-plugin-2.6.0.jar (还提供了 2.2.0 和 2.4.1 版本)复制到 Eclipse 安装目录的 plugins 文件夹中,运行 eclipse -clean 重启 Eclipse 即可(添加插件后只需要运行一次该命令,以后按照正常方式启动就行了)。
安装 hadoop-eclipse-plugin插件
复制到这个位置/usr/lib/eclipse/eclipse/plugin
启动
eclipse -clean 重启 Eclipse 即可
安装SSH、配置SSH无密码登陆
sudo yum install openssh-server
启动ssh服务
service sshd start
Redirecting to /bin/systemctl start sshd.service
ssh登陆
ssh localhost
The authenticity of host ‘localhost (::1)’ can’t be established.
ECDSA key fingerprint is SHA256:tVdm/X3NqkmJCdAzOGbRFzPg8cOWOznkEyooKH5MCb0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘localhost’ (ECDSA) to the list of known hosts.
ssh免密码登陆设置
cd ~/.ssh
livingbody@localhost’s password:
Last login: Sun Nov 11 09:21:10 2018
[livingbody@localhost .ssh]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/livingbody/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/livingbody/.ssh/id_rsa.
Your public key has been saved in /home/livingbody/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:D/Ocpr/kGRZ4PuM7vwa222IiKcOcH/sOp9WBv5AVBBM livingbody@localhost.localdomain
The key’s randomart image is:
±–[RSA 2048]----+
| Eo. |
| o |
| . |
| o . |
| S = |
| &o+ |
| o .o.=./o |
| * oB.O=B. |
| +++++XO+. |
±—[SHA256]-----+
[livingbody@localhost .ssh]$
[livingbody@localhost .ssh]$ cat ./id_rsa.pub >> ./authorized_keys
hadoop环境配置
export PATH=$PATH:/usr/local/hadoop/sbin:/usr/local/hadoop/bin
jdk配置
sudo rpm -i jdk-8u191-linux-x64.rpm
export JAVA_HOME=/usr/java/jdk1.8.0_191-amd64
export CLASSPATH=: J A V A H O M E / l i b / d t . j a r : JAVA_HOME/lib/dt.jar: JAVAHOME/lib/dt.jar:JAVA_HOME/lib/tools.jar
export PATH= P A T H : PATH: PATH:JAVA_HOME/bin
source /etc/profile
选择默认jdk环境
sudo alternatives --config java
实验步骤
修改配置文件:core-site.xml,hdfs-site.xml,mapred-site.xml
初始化文件系统hadoop namenode -format
访问web界面,查看Hadoop信息
运行实例
core-site.xml
hadoop.tmp.dir file:/usr/local/hadoop/tmp Abase for other temporary directories. fs.defaultFS hdfs://localhost:9000
hdfs-site.xml
dfs.replication 1 dfs.namenode.name.dir file:/usr/local/hadoop/tmp/dfs/name dfs.datanode.data.dir file:/usr/local/hadoop/tmp/dfs/data
关于三种Shell命令方式的区别
- hadoop fs
- hadoop dfs
- hdfs dfs
hadoop fs适用于任何不同的文件系统,比如本地文件系统和HDFS文件系统
hadoop dfs只能适用于HDFS文件系统
hdfs dfs跟hadoop dfs的命令作用一样,也只能适用于HDFS文件系统
[hadoop@localhost hadoop]$ ./bin/hdfs namenode -format 18/11/11 18:55:44 INFO namenode.NameNode: STARTUP_MSG: /************************************************************ STARTUP_MSG: Starting NameNode STARTUP_MSG: user = hadoop STARTUP_MSG: host = localhost/127.0.0.1 STARTUP_MSG: args = [-format] STARTUP_MSG: version = 2.8.5 STARTUP_MSG: classpath = /usr/local/hadoop/etc/hadoop:/usr/local/hadoop/share/hadoop/common/lib/commons-math3-3.1.1.jar:/usr/local/hadoop/share/hadoop/common/lib/api-asn1-api-1.0.0-M20.jar:/usr/local/hadoop/share/hadoop/common/lib/paranamer-2.3.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-configuration-1.6.jar:/usr/local/hadoop/share/hadoop/common/lib/jackson-xc-1.9.13.jar:/usr/local/hadoop/share/hadoop/common/lib/xmlenc-0.52.jar:/usr/local/hadoop/share/hadoop/common/lib/apacheds-kerberos-codec-2.0.0-M15.jar:/usr/local/hadoop/share/hadoop/common/lib/slf4j-api-1.7.10.jar:/usr/local/hadoop/share/hadoop/common/lib/api-util-1.0.0-M20.jar:/usr/local/hadoop/share/hadoop/common/lib/jsr305-3.0.0.jar:/usr/local/hadoop/share/hadoop/common/lib/servlet-api-2.5.jar:/usr/local/hadoop/share/hadoop/common/lib/activation-1.1.jar:/usr/local/hadoop/share/hadoop/common/lib/jersey-core-1.9.jar:/usr/local/hadoop/share/hadoop/common/lib/protobuf-java-2.5.0.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-compress-1.4.1.jar:/usr/local/hadoop/share/hadoop/common/lib/jackson-mapper-asl-1.9.13.jar:/usr/local/hadoop/share/hadoop/common/lib/avro-1.7.4.jar:/usr/local/hadoop/share/hadoop/common/lib/jackson-core-asl-1.9.13.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-net-3.1.jar:/usr/local/hadoop/share/hadoop/common/lib/htrace-core4-4.0.1-incubating.jar:/usr/local/hadoop/share/hadoop/common/lib/httpclient-4.5.2.jar:/usr/local/hadoop/share/hadoop/common/lib/log4j-1.2.17.jar:/usr/local/hadoop/share/hadoop/common/lib/jetty-sslengine-6.1.26.jar:/usr/local/hadoop/share/hadoop/common/lib/jackson-jaxrs-1.9.13.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-lang-2.6.jar:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar:/usr/local/hadoop/share/hadoop/common/lib/curator-recipes-2.7.1.jar:/usr/local/hadoop/share/hadoop/common/lib/jcip-annotations-1.0-1.jar:/usr/local/hadoop/share/hadoop/common/lib/hadoop-annotations-2.8.5.jar:/usr/local/hadoop/share/hadoop/common/lib/json-smart-1.3.1.jar:/usr/local/hadoop/share/hadoop/common/lib/java-xmlbuilder-0.4.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-digester-1.8.jar:/usr/local/hadoop/share/hadoop/common/lib/junit-4.11.jar:/usr/local/hadoop/share/hadoop/common/lib/jsch-0.1.54.jar:/usr/local/hadoop/share/hadoop/common/lib/mockito-all-1.8.5.jar:/usr/local/hadoop/share/hadoop/common/lib/jettison-1.1.jar:/usr/local/hadoop/share/hadoop/common/lib/gson-2.2.4.jar:/usr/local/hadoop/share/hadoop/common/lib/nimbus-jose-jwt-4.41.1.jar:/usr/local/hadoop/share/hadoop/common/lib/jersey-server-1.9.jar:/usr/local/hadoop/share/hadoop/common/lib/jetty-6.1.26.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-beanutils-1.7.0.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-logging-1.1.3.jar:/usr/local/hadoop/share/hadoop/common/lib/stax-api-1.0-2.jar:/usr/local/hadoop/share/hadoop/common/lib/guava-11.0.2.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-cli-1.2.jar:/usr/local/hadoop/share/hadoop/common/lib/curator-framework-2.7.1.jar:/usr/local/hadoop/share/hadoop/common/lib/jsp-api-2.1.jar:/usr/local/hadoop/share/hadoop/common/lib/jets3t-0.9.0.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-beanutils-core-1.8.0.jar:/usr/local/hadoop/share/hadoop/common/lib/jaxb-api-2.2.2.jar:/usr/local/hadoop/share/hadoop/common/lib/xz-1.0.jar:/usr/local/hadoop/share/hadoop/common/lib/jersey-json-1.9.jar:/usr/local/hadoop/share/hadoop/common/lib/zookeeper-3.4.6.jar:/usr/local/hadoop/share/hadoop/common/lib/asm-3.2.jar:/usr/local/hadoop/share/hadoop/common/lib/netty-3.6.2.Final.jar:/usr/local/hadoop/share/hadoop/common/lib/hadoop-auth-2.8.5.jar:/usr/local/hadoop/share/hadoop/common/lib/httpcore-4.4.4.jar:/usr/local/hadoop/share/hadoop/common/lib/hamcrest-core-1.3.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-codec-1.4.jar:/usr/local/hadoop/share/hadoop/common/lib/apacheds-i18n-2.0.0-M15.jar:/usr/local/hadoop/share/hadoop/common/lib/curator-client-2.7.1.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-io-2.4.jar:/usr/local/hadoop/share/hadoop/common/lib/jaxb-impl-2.2.3-1.jar:/usr/local/hadoop/share/hadoop/common/lib/commons-collections-3.2.2.jar:/usr/local/hadoop/share/hadoop/common/lib/snappy-java-1.0.4.1.jar:/usr/local/hadoop/share/hadoop/common/lib/jetty-util-6.1.26.jar:/usr/local/hadoop/share/hadoop/common/hadoop-common-2.8.5-tests.jar:/usr/local/hadoop/share/hadoop/common/hadoop-common-2.8.5.jar:/usr/local/hadoop/share/hadoop/common/hadoop-nfs-2.8.5.jar:/usr/local/hadoop/share/hadoop/hdfs:/usr/local/hadoop/share/hadoop/hdfs/lib/xmlenc-0.52.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/jsr305-3.0.0.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/servlet-api-2.5.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/leveldbjni-all-1.8.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/jersey-core-1.9.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/protobuf-java-2.5.0.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/jackson-mapper-asl-1.9.13.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/jackson-core-asl-1.9.13.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/htrace-core4-4.0.1-incubating.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/log4j-1.2.17.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/okhttp-2.4.0.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/commons-lang-2.6.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/okio-1.4.0.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/jersey-server-1.9.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/jetty-6.1.26.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/commons-logging-1.1.3.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/guava-11.0.2.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/commons-cli-1.2.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/xercesImpl-2.9.1.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/hadoop-hdfs-client-2.8.5.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/xml-apis-1.3.04.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/commons-daemon-1.0.13.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/asm-3.2.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/netty-3.6.2.Final.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/commons-codec-1.4.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/commons-io-2.4.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/netty-all-4.0.23.Final.jar:/usr/local/hadoop/share/hadoop/hdfs/lib/jetty-util-6.1.26.jar:/usr/local/hadoop/share/hadoop/hdfs/hadoop-hdfs-2.8.5.jar:/usr/local/hadoop/share/hadoop/hdfs/hadoop-hdfs-client-2.8.5-tests.jar:/usr/local/hadoop/share/hadoop/hdfs/hadoop-hdfs-native-client-2.8.5-tests.jar:/usr/local/hadoop/share/hadoop/hdfs/hadoop-hdfs-native-client-2.8.5.jar:/usr/local/hadoop/share/hadoop/hdfs/hadoop-hdfs-2.8.5-tests.jar:/usr/local/hadoop/share/hadoop/hdfs/hadoop-hdfs-nfs-2.8.5.jar:/usr/local/hadoop/share/hadoop/hdfs/hadoop-hdfs-client-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/lib/javax.inject-1.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jackson-xc-1.9.13.jar:/usr/local/hadoop/share/hadoop/yarn/lib/guice-3.0.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jsr305-3.0.0.jar:/usr/local/hadoop/share/hadoop/yarn/lib/servlet-api-2.5.jar:/usr/local/hadoop/share/hadoop/yarn/lib/activation-1.1.jar:/usr/local/hadoop/share/hadoop/yarn/lib/fst-2.50.jar:/usr/local/hadoop/share/hadoop/yarn/lib/leveldbjni-all-1.8.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jersey-core-1.9.jar:/usr/local/hadoop/share/hadoop/yarn/lib/protobuf-java-2.5.0.jar:/usr/local/hadoop/share/hadoop/yarn/lib/commons-compress-1.4.1.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jackson-mapper-asl-1.9.13.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jackson-core-asl-1.9.13.jar:/usr/local/hadoop/share/hadoop/yarn/lib/log4j-1.2.17.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jackson-jaxrs-1.9.13.jar:/usr/local/hadoop/share/hadoop/yarn/lib/commons-lang-2.6.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jettison-1.1.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jersey-server-1.9.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jetty-6.1.26.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jersey-client-1.9.jar:/usr/local/hadoop/share/hadoop/yarn/lib/javassist-3.18.1-GA.jar:/usr/local/hadoop/share/hadoop/yarn/lib/commons-math-2.2.jar:/usr/local/hadoop/share/hadoop/yarn/lib/commons-logging-1.1.3.jar:/usr/local/hadoop/share/hadoop/yarn/lib/stax-api-1.0-2.jar:/usr/local/hadoop/share/hadoop/yarn/lib/guava-11.0.2.jar:/usr/local/hadoop/share/hadoop/yarn/lib/commons-cli-1.2.jar:/usr/local/hadoop/share/hadoop/yarn/lib/curator-test-2.7.1.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jaxb-api-2.2.2.jar:/usr/local/hadoop/share/hadoop/yarn/lib/xz-1.0.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jersey-json-1.9.jar:/usr/local/hadoop/share/hadoop/yarn/lib/zookeeper-3.4.6.jar:/usr/local/hadoop/share/hadoop/yarn/lib/aopalliance-1.0.jar:/usr/local/hadoop/share/hadoop/yarn/lib/zookeeper-3.4.6-tests.jar:/usr/local/hadoop/share/hadoop/yarn/lib/asm-3.2.jar:/usr/local/hadoop/share/hadoop/yarn/lib/netty-3.6.2.Final.jar:/usr/local/hadoop/share/hadoop/yarn/lib/guice-servlet-3.0.jar:/usr/local/hadoop/share/hadoop/yarn/lib/json-io-2.5.1.jar:/usr/local/hadoop/share/hadoop/yarn/lib/commons-codec-1.4.jar:/usr/local/hadoop/share/hadoop/yarn/lib/curator-client-2.7.1.jar:/usr/local/hadoop/share/hadoop/yarn/lib/commons-io-2.4.jar:/usr/local/hadoop/share/hadoop/yarn/lib/java-util-1.9.0.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jaxb-impl-2.2.3-1.jar:/usr/local/hadoop/share/hadoop/yarn/lib/commons-collections-3.2.2.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jetty-util-6.1.26.jar:/usr/local/hadoop/share/hadoop/yarn/lib/jersey-guice-1.9.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-applications-distributedshell-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-client-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-common-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-api-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-tests-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-sharedcachemanager-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-registry-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-resourcemanager-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-nodemanager-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-applications-unmanaged-am-launcher-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-applicationhistoryservice-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-common-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-timeline-pluginstorage-2.8.5.jar:/usr/local/hadoop/share/hadoop/yarn/hadoop-yarn-server-web-proxy-2.8.5.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/paranamer-2.3.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/javax.inject-1.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/guice-3.0.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/leveldbjni-all-1.8.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/jersey-core-1.9.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/protobuf-java-2.5.0.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/commons-compress-1.4.1.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/jackson-mapper-asl-1.9.13.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/avro-1.7.4.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/jackson-core-asl-1.9.13.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/log4j-1.2.17.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/hadoop-annotations-2.8.5.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/junit-4.11.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/jersey-server-1.9.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/xz-1.0.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/aopalliance-1.0.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/asm-3.2.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/netty-3.6.2.Final.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/guice-servlet-3.0.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/hamcrest-core-1.3.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/commons-io-2.4.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/snappy-java-1.0.4.1.jar:/usr/local/hadoop/share/hadoop/mapreduce/lib/jersey-guice-1.9.jar:/usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.8.5.jar:/usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-2.8.5.jar:/usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.8.5.jar:/usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.8.5.jar:/usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.8.5-tests.jar:/usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-shuffle-2.8.5.jar:/usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-app-2.8.5.jar:/usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-plugins-2.8.5.jar:/usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-client-common-2.8.5.jar:/contrib/capacity-scheduler/*.jar STARTUP_MSG: build = https://git-wip-us.apache.org/repos/asf/hadoop.git -r 0b8464d75227fcee2c6e7f2410377b3d53d3d5f8; compiled by 'jdu' on 2018-09-10T03:32Z STARTUP_MSG: java = 1.8.0_191 ************************************************************/ 18/11/11 18:55:44 INFO namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT] 18/11/11 18:55:44 INFO namenode.NameNode: createNameNode [-format] Formatting using clusterid: CID-d6157455-22bf-4150-9335-5a5232d76989 18/11/11 18:55:45 INFO namenode.FSEditLog: Edit logging is async:true 18/11/11 18:55:45 INFO namenode.FSNamesystem: KeyProvider: null 18/11/11 18:55:45 INFO namenode.FSNamesystem: fsLock is fair: true 18/11/11 18:55:45 INFO namenode.FSNamesystem: Detailed lock hold time metrics enabled: false 18/11/11 18:55:45 INFO blockmanagement.DatanodeManager: dfs.block.invalidate.limit=1000 18/11/11 18:55:45 INFO blockmanagement.DatanodeManager: dfs.namenode.datanode.registration.ip-hostname-check=true 18/11/11 18:55:45 INFO blockmanagement.BlockManager: dfs.namenode.startup.delay.block.deletion.sec is set to 000:00:00:00.000 18/11/11 18:55:45 INFO blockmanagement.BlockManager: The block deletion will start around 2018 Nov 11 18:55:45 18/11/11 18:55:45 INFO util.GSet: Computing capacity for map BlocksMap 18/11/11 18:55:45 INFO util.GSet: VM type = 64-bit 18/11/11 18:55:45 INFO util.GSet: 2.0% max memory 889 MB = 17.8 MB 18/11/11 18:55:45 INFO util.GSet: capacity = 2^21 = 2097152 entries 18/11/11 18:55:45 INFO blockmanagement.BlockManager: dfs.block.access.token.enable=false 18/11/11 18:55:45 INFO blockmanagement.BlockManager: defaultReplication = 1 18/11/11 18:55:45 INFO blockmanagement.BlockManager: maxReplication = 512 18/11/11 18:55:45 INFO blockmanagement.BlockManager: minReplication = 1 18/11/11 18:55:45 INFO blockmanagement.BlockManager: maxReplicationStreams = 2 18/11/11 18:55:45 INFO blockmanagement.BlockManager: replicationRecheckInterval = 3000 18/11/11 18:55:45 INFO blockmanagement.BlockManager: encryptDataTransfer = false 18/11/11 18:55:45 INFO blockmanagement.BlockManager: maxNumBlocksToLog = 1000 18/11/11 18:55:45 INFO namenode.FSNamesystem: fsOwner = hadoop (auth:SIMPLE) 18/11/11 18:55:45 INFO namenode.FSNamesystem: supergroup = supergroup 18/11/11 18:55:45 INFO namenode.FSNamesystem: isPermissionEnabled = true 18/11/11 18:55:45 INFO namenode.FSNamesystem: HA Enabled: false 18/11/11 18:55:45 INFO namenode.FSNamesystem: Append Enabled: true 18/11/11 18:55:45 INFO util.GSet: Computing capacity for map INodeMap 18/11/11 18:55:45 INFO util.GSet: VM type = 64-bit 18/11/11 18:55:45 INFO util.GSet: 1.0% max memory 889 MB = 8.9 MB 18/11/11 18:55:45 INFO util.GSet: capacity = 2^20 = 1048576 entries 18/11/11 18:55:45 INFO namenode.FSDirectory: ACLs enabled? false 18/11/11 18:55:45 INFO namenode.FSDirectory: XAttrs enabled? true 18/11/11 18:55:45 INFO namenode.NameNode: Caching file names occurring more than 10 times 18/11/11 18:55:45 INFO util.GSet: Computing capacity for map cachedBlocks 18/11/11 18:55:45 INFO util.GSet: VM type = 64-bit 18/11/11 18:55:45 INFO util.GSet: 0.25% max memory 889 MB = 2.2 MB 18/11/11 18:55:45 INFO util.GSet: capacity = 2^18 = 262144 entries 18/11/11 18:55:45 INFO namenode.FSNamesystem: dfs.namenode.safemode.threshold-pct = 0.9990000128746033 18/11/11 18:55:45 INFO namenode.FSNamesystem: dfs.namenode.safemode.min.datanodes = 0 18/11/11 18:55:45 INFO namenode.FSNamesystem: dfs.namenode.safemode.extension = 30000 18/11/11 18:55:45 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.window.num.buckets = 10 18/11/11 18:55:45 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.num.users = 10 18/11/11 18:55:45 INFO metrics.TopMetrics: NNTop conf: dfs.namenode.top.windows.minutes = 1,5,25 18/11/11 18:55:45 INFO namenode.FSNamesystem: Retry cache on namenode is enabled 18/11/11 18:55:45 INFO namenode.FSNamesystem: Retry cache will use 0.03 of total heap and retry cache entry expiry time is 600000 millis 18/11/11 18:55:45 INFO util.GSet: Computing capacity for map NameNodeRetryCache 18/11/11 18:55:45 INFO util.GSet: VM type = 64-bit 18/11/11 18:55:45 INFO util.GSet: 0.029999999329447746% max memory 889 MB = 273.1 KB 18/11/11 18:55:45 INFO util.GSet: capacity = 2^15 = 32768 entries 18/11/11 18:55:45 INFO namenode.FSImage: Allocated new BlockPoolId: BP-1541769090-127.0.0.1-1541933745725 18/11/11 18:55:45 INFO common.Storage: Storage directory /usr/local/hadoop/tmp/dfs/name has been successfully formatted. 18/11/11 18:55:45 INFO namenode.FSImageFormatProtobuf: Saving image file /usr/local/hadoop/tmp/dfs/name/current/fsimage.ckpt_0000000000000000000 using no compression 18/11/11 18:55:45 INFO namenode.FSImageFormatProtobuf: Image file /usr/local/hadoop/tmp/dfs/name/current/fsimage.ckpt_0000000000000000000 of size 323 bytes saved in 0 seconds. 18/11/11 18:55:45 INFO namenode.NNStorageRetentionManager: Going to retain 1 images with txid >= 0 18/11/11 18:55:45 INFO util.ExitUtil: Exiting with status 0 18/11/11 18:55:45 INFO namenode.NameNode: SHUTDOWN_MSG: /************************************************************ SHUTDOWN_MSG: Shutting down NameNode at localhost/127.0.0.1 ************************************************************/ [hadoop@localhost hadoop]$
[hadoop@localhost hadoop]$ ./sbin/start-dfs.sh Starting namenodes on [localhost] localhost: ssh: connect to host localhost port 22: Connection refused localhost: ssh: connect to host localhost port 22: Connection refused Starting secondary namenodes [0.0.0.0] 0.0.0.0: ssh: connect to host 0.0.0.0 port 22: Connection refused
./sbin/start-dfs.sh
[hadoop@localhost hadoop]$ ./sbin/start-dfs.sh
Starting namenodes on [localhost]
hadoop@localhost’s password:
localhost: Error: JAVA_HOME is not set and could not be found.
hadoop@localhost’s password:
localhost: Error: JAVA_HOME is not set and could not be found.
Starting secondary namenodes [0.0.0.0]
The authenticity of host ‘0.0.0.0 (0.0.0.0)’ can’t be established.
ECDSA key fingerprint is SHA256:tVdm/X3NqkmJCdAzOGbRFzPg8cOWOznkEyooKH5MCb0.
Are you sure you want to continue connecting (yes/no)?
0.0.0.0: Host key verification failed.
[hadoop@localhost .ssh]$ cd /usr/local/hadoop/
[hadoop@localhost hadoop]$ ./sbin/start-dfs.sh
Starting namenodes on [localhost]
hadoop@localhost’s password:
localhost: starting namenode, logging to /usr/local/hadoop/logs/hadoop-hadoop-namenode-localhost.localdomain.out
hadoop@localhost’s password:
localhost: starting datanode, logging to /usr/local/hadoop/logs/hadoop-hadoop-datanode-localhost.localdomain.out
Starting secondary namenodes [0.0.0.0]
The authenticity of host ‘0.0.0.0 (0.0.0.0)’ can’t be established.
ECDSA key fingerprint is SHA256:tVdm/X3NqkmJCdAzOGbRFzPg8cOWOznkEyooKH5MCb0.
Are you sure you want to continue connecting (yes/no)? yes
0.0.0.0: Warning: Permanently added ‘0.0.0.0’ (ECDSA) to the list of known hosts.
hadoop@0.0.0.0’s password:
0.0.0.0: starting secondarynamenode, logging to /usr/local/hadoop/logs/hadoop-hadoop-secondarynamenode-localhost.localdomain.out
web访问
Web 界面 http://localhost:50070
使用 Fedora 提供的快捷键
这就类似使用微信的截图快捷键了,不用启动应用就可以直接截图:
Printscreen – 截取整个桌面的屏幕截图并保存到 Pictures 目录
Alt + Printscreen – 截取目前获得焦点的窗口截图并保存到 Pictures 目录
Shift + Printscreen – 选定区域截取并将其保存到你的 Pictures 目录,常用
Ctrl + Printscreen – 截取整个桌面的屏幕截图并将其复制到剪贴板
Ctrl + Alt + Printscreen – 截取目前获得焦点的窗口截图并将其复制到剪贴板
Ctrl + Shift + Printscreen – 选定区域截取并将其复制到剪贴板
eclipse 安装日志
Installed:
eclipse-jdt-1:4.9.0-2.fc29.noarch
eclipse-abrt-0.0.3-6.fc29.noarch
eclipse-recommenders-2.5.4-2.fc29.noarch
eclipse-usage-4.9.0-1.fc29.noarch
jai-imageio-core-1.2-0.24.20100217cvs.fc29.noarch
aether-connector-okhttp-0.17.3-2.fc29.noarch
ant-1.10.5-2.fc29.noarch
ant-antlr-1.10.5-2.fc29.noarch
ant-apache-bcel-1.10.5-2.fc29.noarch
ant-apache-bsf-1.10.5-2.fc29.noarch
ant-apache-log4j-1.10.5-2.fc29.noarch
ant-apache-oro-1.10.5-2.fc29.noarch
ant-apache-regexp-1.10.5-2.fc29.noarch
ant-apache-resolver-1.10.5-2.fc29.noarch
ant-apache-xalan2-1.10.5-2.fc29.noarch
ant-commons-logging-1.10.5-2.fc29.noarch
ant-commons-net-1.10.5-2.fc29.noarch
ant-javamail-1.10.5-2.fc29.noarch
ant-jdepend-1.10.5-2.fc29.noarch
ant-jmf-1.10.5-2.fc29.noarch
ant-jsch-1.10.5-2.fc29.noarch
ant-junit-1.10.5-2.fc29.noarch
ant-junit5-1.10.5-2.fc29.noarch
ant-lib-1.10.5-2.fc29.noarch
ant-swing-1.10.5-2.fc29.noarch
ant-testutil-1.10.5-2.fc29.noarch
ant-xz-1.10.5-2.fc29.noarch
antlr-tool-2.7.7-55.fc29.noarch
aopalliance-1.0-18.fc29.noarch
apache-commons-cli-1.4-5.fc29.noarch
apache-commons-codec-1.11-4.fc29.noarch
apache-commons-collections-3.2.2-10.fc29.noarch
apache-commons-compress-1.17-3.fc29.noarch
apache-commons-el-1.0-41.fc29.noarch
apache-commons-fileupload-1.3.3-4.fc29.noarch
apache-commons-io-1:2.6-4.fc29.noarch
apache-commons-jxpath-1.3-30.fc29.noarch
apache-commons-lang-2.6-22.fc29.noarch
apache-commons-lang3-3.7-4.fc29.noarch
apache-commons-logging-1.2-14.fc29.noarch
apache-commons-math-3.4.1-9.fc29.noarch
apache-commons-net-3.6-4.fc29.noarch
apache-commons-pool-1.6-17.fc29.noarch
apache-ivy-2.4.0-14.fc29.noarch
apiguardian-1.0.0-3.fc29.noarch
args4j-2.33-5.fc29.noarch
atinject-1-29.20100611svn86.fc29.noarch
batik-1.10-2.fc29.noarch
batik-css-1.10-2.fc29.noarch
bcel-6.2-3.fc29.noarch
bsf-2.4.0-31.fc29.noarch
cdi-api-1.2-9.fc29.noarch
cglib-3.2.4-8.fc29.noarch
closure-compiler-20160315-6.fc29.noarch
dom4j-2.0.0-6.fc29.noarch
eclipse-ecf-core-3.14.1-3.fc29.noarch
eclipse-egit-5.1.1-1.fc29.noarch
eclipse-emf-core-1:2.15.0-0.3.gitd1e5fdd.fc29.noarch
eclipse-emf-runtime-2.15.0-0.3.gitd1e5fdd.fc29.noarch
eclipse-emf-xsd-2.15.0-0.3.gitd1e5fdd.fc29.noarch
eclipse-epp-logging-2.0.7-4.fc29.noarch
eclipse-equinox-osgi-1:4.9.0-2.fc29.x86_64
eclipse-jgit-5.1.1-2.fc29.noarch
eclipse-m2e-core-1.9.1-2.fc29.noarch
eclipse-m2e-workspace-0.4.0-9.fc29.noarch
eclipse-mylyn-3.25.0-0.2.fc29.noarch
eclipse-mylyn-tasks-bugzilla-3.25.0-0.2.fc29.noarch
eclipse-p2-discovery-1:4.9.0-2.fc29.noarch
eclipse-pde-1:4.9.0-2.fc29.x86_64
eclipse-platform-1:4.9.0-2.fc29.x86_64
eclipse-swt-1:4.9.0-2.fc29.x86_64
eclipse-webtools-common-3.11.0-1.fc29.noarch
eclipse-webtools-servertools-3.11.0-1.fc29.noarch
eclipse-webtools-sourceediting-3.11.0-1.fc29.noarch
extra166y-1.7.0-10.fc29.noarch
felix-gogo-command-1.0.2-6.fc29.noarch
felix-gogo-runtime-1.1.0-1.fc29.noarch
felix-gogo-shell-1.1.0-1.fc29.noarch
felix-scr-2.0.14-3.fc29.noarch
geronimo-annotation-1.0-24.fc29.noarch
glassfish-el-3.0.1-0.9.b08.fc29.noarch
glassfish-el-api-3.0.1-0.9.b08.fc29.noarch
glassfish-jsp-2.3.3-0.13.b02.fc29.noarch
glassfish-jsp-api-2.3.2-0.10.b01.fc29.noarch
glassfish-servlet-api-3.1.0-15.fc29.noarch
google-gson-2.8.2-2.fc29.noarch
google-guice-4.1-12.fc29.noarch
gpars-1.2.1-12.fc29.noarch
groovy-lib-2.4.8-7.fc29.noarch
guava20-20.0-8.fc29.noarch
guice-multibindings-4.1-12.fc29.noarch
hamcrest-core-1.3-24.fc29.noarch
hawtjni-runtime-1.16-3.fc29.noarch
httpcomponents-client-4.5.5-5.fc29.noarch
httpcomponents-client-cache-4.5.5-5.fc29.noarch
httpcomponents-core-4.4.10-3.fc29.noarch
icu4j-1:62.1-2.fc29.noarch
jakarta-commons-httpclient-1:3.1-29.fc29.noarch
jakarta-oro-2.0.8-24.fc29.noarch
jansi-1.17.1-2.fc29.noarch
jansi-native-1.7-7.fc29.x86_64
java_cup-1:0.11b-9.fc29.noarch
javaewah-1.1.6-4.fc29.noarch
javamail-1.5.2-8.fc29.noarch
javapackages-tools-5.3.0-1.fc29.noarch
jaxen-1.1.6-18.fc29.noarch
jboss-interceptors-1.2-api-1.0.0-9.fc29.noarch
jchardet-1.1-18.fc29.noarch
jcl-over-slf4j-1.7.25-5.fc29.noarch
jcsp-1.1-0.10.rc5.fc29.noarch
jdepend-2.9.1-19.fc29.noarch
jdom-1.1.3-17.fc29.noarch
jetty-continuation-9.4.11-3.v20180605.fc29.noarch
jetty-http-9.4.11-3.v20180605.fc29.noarch
jetty-io-9.4.11-3.v20180605.fc29.noarch
jetty-security-9.4.11-3.v20180605.fc29.noarch
jetty-server-9.4.11-3.v20180605.fc29.noarch
jetty-servlet-9.4.11-3.v20180605.fc29.noarch
jetty-util-9.4.11-3.v20180605.fc29.noarch
jetty-webapp-9.4.11-3.v20180605.fc29.noarch
jetty-xml-9.4.11-3.v20180605.fc29.noarch
jffi-1.2.12-10.fc29.x86_64
jffi-native-1.2.12-10.fc29.x86_64
jgit-5.1.1-2.fc29.noarch
jline-2.14.6-3.fc29.noarch
jmh-1.13-7.fc29.noarch
jnr-constants-0.9.9-4.fc29.noarch
jnr-enxio-0.16-5.fc29.noarch
jnr-ffi-2.1.6-4.fc28.noarch
jnr-posix-3.0.41-4.fc29.noarch
jnr-unixsocket-0.18-6.fc29.noarch
jnr-x86asm-1.0.2-15.fc29.noarch
jopt-simple-5.0.4-3.fc29.noarch
jsch-0.1.54-8.fc29.noarch
json_simple-1.1.1-17.fc29.noarch
jsoup-1.11.3-3.fc29.noarch
jsr-305-0-0.23.20130910svn.fc29.noarch
junit-1:4.12-10.fc29.noarch
junit5-5.3.1-1.fc29.noarch
jzlib-1.1.3-9.fc29.noarch
kxml-2.3.0-17.fc29.noarch
log4j12-1.2.17-23.fc29.noarch
lucene-7.1.0-3.fc29.noarch
lucene-analysis-7.1.0-3.fc29.noarch
lucene-analyzers-smartcn-7.1.0-3.fc29.noarch
lucene-grouping-7.1.0-3.fc29.noarch
lucene-highlighter-7.1.0-3.fc29.noarch
lucene-join-7.1.0-3.fc29.noarch
lucene-memory-7.1.0-3.fc29.noarch
lucene-queries-7.1.0-3.fc29.noarch
lucene-queryparser-7.1.0-3.fc29.noarch
lucene-sandbox-7.1.0-3.fc29.noarch
lucene3-3.6.2-13.fc28.noarch
maven-archetype-catalog-2.4-9.fc29.noarch
maven-archetype-common-2.4-9.fc29.noarch
maven-archetype-descriptor-2.4-9.fc29.noarch
maven-archetype-registry-2.4-9.fc29.noarch
maven-artifact-2.2.1-59.fc29.noarch
maven-artifact-manager-2.2.1-59.fc29.noarch
maven-indexer-5.1.2-0.7.gite0570bf.fc29.noarch
maven-invoker-2.2-8.fc29.noarch
maven-lib-1:3.5.4-4.fc29.noarch
maven-model-2.2.1-59.fc29.noarch
maven-plugin-registry-2.2.1-59.fc29.noarch
maven-profile-2.2.1-59.fc29.noarch
maven-project-2.2.1-59.fc29.noarch
maven-resolver-api-1:1.1.1-3.fc29.noarch
maven-resolver-connector-basic-1:1.1.1-3.fc29.noarch
maven-resolver-impl-1:1.1.1-3.fc29.noarch
maven-resolver-spi-1:1.1.1-3.fc29.noarch
maven-resolver-transport-file-1:1.1.1-3.fc29.noarch
maven-resolver-transport-http-1:1.1.1-3.fc29.noarch
maven-resolver-transport-wagon-1:1.1.1-3.fc29.noarch
maven-resolver-util-1:1.1.1-3.fc29.noarch
maven-settings-2.2.1-59.fc29.noarch
maven-shared-utils-3.2.1-0.2.fc29.noarch
maven-wagon-file-3.1.0-2.fc29.noarch
maven-wagon-http-3.1.0-2.fc29.noarch
maven-wagon-http-shared-3.1.0-2.fc29.noarch
maven-wagon-provider-api-3.1.0-2.fc29.noarch
mesa-libGLU-9.0.0-16.fc29.x86_64
multiverse-0.7.0-9.fc29.noarch
netty-tcnative-1.1.30-12.fc29.x86_64
netty3-3.10.6-5.fc29.noarch
objectweb-asm-6.2.1-1.fc29.noarch
okhttp-3.10.0-4.fc29.noarch
okio-1.14.0-2.fc29.noarch
opentest4j-1.0.0-3.fc29.noarch
osgi-core-6.0.0-7.fc29.noarch
plexus-build-api-0.0.7-21.fc29.noarch
plexus-cipher-1.7-15.fc29.noarch
plexus-classworlds-2.5.2-10.fc29.noarch
plexus-containers-component-annotations-1.7.1-8.fc29.noarch
plexus-containers-container-default-1.7.1-8.fc29.noarch
plexus-interpolation-1.22-10.fc29.noarch
plexus-sec-dispatcher-1.4-26.fc29.noarch
plexus-utils-3.1.0-3.fc29.noarch
plexus-velocity-1.2-5.fc29.noarch
protobuf-java-3.5.0-8.fc29.noarch
publicsuffix-list-20180723-1.fc29.noarch
regexp-1:1.5-27.fc29.noarch
rhino-1.7.7.1-6.fc29.noarch
sac-1.3-29.fc29.noarch
sat4j-2.3.5-13.fc29.noarch
sisu-inject-1:0.3.3-6.fc29.noarch
sisu-plexus-1:0.3.3-6.fc29.noarch
slf4j-1.7.25-5.fc29.noarch
solr3-3.6.2-18.fc29.noarch
stax2-api-4.0.0-5.fc29.noarch
ttmkfdir-3.0.9-55.fc29.x86_64
univocity-parsers-2.5.5-4.fc29.noarch
velocity-1.7-24.fc29.noarch
woodstox-core-5.0.3-5.fc29.noarch
ws-commons-util-1.0.2-8.fc29.noarch
xalan-j2-2.7.1-38.fc29.noarch
xbean-4.9-1.fc29.noarch
xerces-j2-2.11.0-34.fc29.noarch
xml-commons-apis-1.4.01-26.fc29.noarch
xml-commons-resolver-1.2-26.fc29.noarch
xmlgraphics-commons-2.2-2.fc29.noarch
xmlrpc-client-1:3.1.3-21.fc29.noarch
xmlrpc-common-1:3.1.3-21.fc29.noarch
xorg-x11-fonts-Type1-7.5-20.fc29.noarch
xpp3-1.1.4-19.c.fc29.noarch
xpp3-minimal-1.1.4-19.c.fc29.noarch
xstream-1.4.9-8.fc29.noarch
xz-java-1.8-3.fc29.noarch
eclipse-gef-3.11.0-7.fc29.noarch
java-1.8.0-openjdk-1:1.8.0.191.b12-8.fc29.x86_64
java-1.8.0-openjdk-devel-1:1.8.0.191.b12-8.fc29.x86_64
java-1.8.0-openjdk-headless-1:1.8.0.191.b12-8.fc29.x86_64
Complete!