- 浏览: 416260 次
- 性别:
- 来自: 长沙
最新评论
-
x9x9x9x9:
好文好文好文好文
linux 内核启动错误和selinux参数 Kernel panic -not syncing:Attempted to kill init -
xintangchao:
谢谢,但我加个注解后为什么测试类运行正常,但数据却没有插入到数 ...
No bean named transactionManager is defined 多数据源的单元测试 -
hehaibo:
goahead2010 写道大谢,测试事务时出现了。不客气
No bean named transactionManager is defined 多数据源的单元测试 -
goahead2010:
大谢,测试事务时出现了。
No bean named transactionManager is defined 多数据源的单元测试 -
ctguhqh:
4 客户类可以通过完整的类名直接访问静态内部类的静态成员。但是 ...
java基础--静态内部类和局部内部类
redhat linux rehl 5 hadoop 单机[伪分布式]安装
redhat linux rehl 5 hadoop 单机[伪分布式]安装
参考博客:
http://freewxy.iteye.com/blog/1027569
下载 解压 修改权限等暂时跳过.
ssh 免登录
暂时告一段落。
参考博客:
http://freewxy.iteye.com/blog/1027569
下载 解压 修改权限等暂时跳过.
ssh 免登录
[root@oplinux ~]# ssh-keygen -t rsa P '' root@gen's password: Permission denied, please try again. root@gen's password: Permission denied, please try again. root@gen's password: Permission denied (publickey,gssapi-with-mic,password). [root@oplinux .ssh]# vi /etc/ssh/sshd //这个有错误 有时间在写. //切换到hadoop目录 [root@oplinux ~]# cd /usr/local/hadoop [root@oplinux hadoop]# ll drwxrwxr-x 2 hehaibo hehaibo 4096 2010-08-17 bin drwxrwxr-x 5 hehaibo hehaibo 4096 2010-08-17 c++ drwxr-xr-x 8 hehaibo hehaibo 4096 2010-08-17 common drwxrwxr-x 2 hehaibo hehaibo 4096 2010-08-17 conf -rw-rw-r-- 1 hehaibo hehaibo 1289953 2010-08-17 hadoop-common-0.21.0.jar -rw-rw-r-- 1 hehaibo hehaibo 622276 2010-08-17 hadoop-common-test-0.21.0.jar -rw-rw-r-- 1 hehaibo hehaibo 934881 2010-08-17 hadoop-hdfs-0.21.0.jar -rw-rw-r-- 1 hehaibo hehaibo 613332 2010-08-17 hadoop-hdfs-0.21.0-sources.jar -rw-rw-r-- 1 hehaibo hehaibo 6956 2010-08-17 hadoop-hdfs-ant-0.21.0.jar -rw-rw-r-- 1 hehaibo hehaibo 688026 2010-08-17 hadoop-hdfs-test-0.21.0.jar -rw-rw-r-- 1 hehaibo hehaibo 419671 2010-08-17 hadoop-hdfs-test-0.21.0-sources.jar -rw-rw-r-- 1 hehaibo hehaibo 1747897 2010-08-17 hadoop-mapred-0.21.0.jar -rw-rw-r-- 1 hehaibo hehaibo 1182309 2010-08-17 hadoop-mapred-0.21.0-sources.jar -rw-rw-r-- 1 hehaibo hehaibo 252064 2010-08-17 hadoop-mapred-examples-0.21.0.jar -rw-rw-r-- 1 hehaibo hehaibo 1492025 2010-08-17 hadoop-mapred-test-0.21.0.jar -rw-rw-r-- 1 hehaibo hehaibo 298837 2010-08-17 hadoop-mapred-tools-0.21.0.jar drwxr-xr-x 8 hehaibo hehaibo 4096 2010-08-17 hdfs drwxrwxr-x 4 hehaibo hehaibo 4096 2010-08-17 lib -rw-rw-r-- 1 hehaibo hehaibo 13366 2010-08-17 LICENSE.txt drwxr-xr-x 9 hehaibo hehaibo 4096 2010-08-17 mapred -rw-rw-r-- 1 hehaibo hehaibo 101 2010-08-17 NOTICE.txt -rw-rw-r-- 1 hehaibo hehaibo 1366 2010-08-17 README.txt drwxrwxr-x 8 hehaibo hehaibo 4096 2010-08-17 webapps [root@oplinux hadoop]# vi conf/hadoop-env.sh 找到JAVA_HOME,设置Java环境变量 JAVA_HOME=/usr/local/jdk1.6.0_19 [root@oplinux hadoop]# vi conf/core-site.xml <configuration> <property> <name>fs.default.name</name> <value>hdfs://localhost:9000</value> </property> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>hadoop.tmp.dir</name> <value>/home/root/tmp</value> </property> </configuration> [root@oplinux hadoop]# vi conf/mapred-site.xml <configuration> <property> <name>mapred.job.tracker</name> <value>localhost:9001</value> </property> </configuration> [root@oplinux hadoop]# cd bin/ //查看bin目录下的内容 [root@oplinux bin]# ll 总计 160 -rwxr-xr-x 1 hehaibo hehaibo 4131 2010-08-17 hadoop -rwxr-xr-x 1 hehaibo hehaibo 8658 2010-08-17 hadoop-config.sh -rwxr-xr-x 1 hehaibo hehaibo 3841 2010-08-17 hadoop-daemon.sh -rwxr-xr-x 1 hehaibo hehaibo 1242 2010-08-17 hadoop-daemons.sh -rwxr-xr-x 1 hehaibo hehaibo 4130 2010-08-17 hdfs -rwxr-xr-x 1 hehaibo hehaibo 1201 2010-08-17 hdfs-config.sh -rwxr-xr-x 1 hehaibo hehaibo 3387 2010-08-17 mapred -rwxr-xr-x 1 hehaibo hehaibo 1207 2010-08-17 mapred-config.sh -rwxr-xr-x 1 hehaibo hehaibo 2720 2010-08-17 rcc -rwxr-xr-x 1 hehaibo hehaibo 2058 2010-08-17 slaves.sh -rwxr-xr-x 1 hehaibo hehaibo 1367 2010-08-17 start-all.sh -rwxr-xr-x 1 hehaibo hehaibo 1018 2010-08-17 start-balancer.sh -rwxr-xr-x 1 hehaibo hehaibo 1778 2010-08-17 start-dfs.sh -rwxr-xr-x 1 hehaibo hehaibo 1255 2010-08-17 start-mapred.sh -rwxr-xr-x 1 hehaibo hehaibo 1359 2010-08-17 stop-all.sh -rwxr-xr-x 1 hehaibo hehaibo 1069 2010-08-17 stop-balancer.sh -rwxr-xr-x 1 hehaibo hehaibo 1277 2010-08-17 stop-dfs.sh -rwxr-xr-x 1 hehaibo hehaibo 1163 2010-08-17 stop-mapred.sh //格式化namenode[为什么要格式化,有待研究] [root@oplinux bin]# sh hadoop namenode -format DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. 11/08/13 10:56:18 INFO namenode.NameNode: STARTUP_MSG: /************************************************************ STARTUP_MSG: Starting NameNode STARTUP_MSG: host = oplinux.hehaibo.com/127.0.0.1 STARTUP_MSG: args = [-format] STARTUP_MSG: version = 0.21.0 STARTUP_MSG: classpath = /usr/local/hadoop/bin/../conf:/usr/local/jdk1.6.0_19/lib/tools.jar:/usr/local/hadoop/bin/..:/usr/local/hadoop/bin/../hadoop-common-0.21.0.jar:/usr/local/hadoop/bin/../hadoop-common-test-0.21.0.jar:/usr/local/hadoop/bin/../hadoop-hdfs-0.21.0.jar:/usr/local/hadoop/bin/../hadoop-hdfs-0.21.0-sources.jar:/usr/local/hadoop/bin/../hadoop-hdfs-ant-0.21.0.jar:/usr/local/hadoop/bin/../hadoop-hdfs-test-0.21.0.jar:/usr/local/hadoop/bin/../hadoop-hdfs-test-0.21.0-sources.jar:/usr/local/hadoop/bin/../hadoop-mapred-0.21.0.jar:/usr/local/hadoop/bin/../hadoop-mapred-0.21.0-sources.jar:/usr/local/hadoop/bin/../hadoop-mapred-examples-0.21.0.jar:/usr/local/hadoop/bin/../hadoop-mapred-test-0.21.0.jar:/usr/local/hadoop/bin/../hadoop-mapred-tools-0.21.0.jar:/usr/local/hadoop/bin/../lib/ant-1.6.5.jar:/usr/local/hadoop/bin/../lib/asm-3.2.jar:/usr/local/hadoop/bin/../lib/aspectjrt-1.6.5.jar:/usr/local/hadoop/bin/../lib/aspectjtools-1.6.5.jar:/usr/local/hadoop/bin/../lib/avro-1.3.2.jar:/usr/local/hadoop/bin/../lib/commons-cli-1.2.jar:/usr/local/hadoop/bin/../lib/commons-codec-1.4.jar:/usr/local/hadoop/bin/../lib/commons-el-1.0.jar:/usr/local/hadoop/bin/../lib/commons-httpclient-3.1.jar:/usr/local/hadoop/bin/../lib/commons-lang-2.5.jar:/usr/local/hadoop/bin/../lib/commons-logging-1.1.1.jar:/usr/local/hadoop/bin/../lib/commons-logging-api-1.1.jar:/usr/local/hadoop/bin/../lib/commons-net-1.4.1.jar:/usr/local/hadoop/bin/../lib/core-3.1.1.jar:/usr/local/hadoop/bin/../lib/ftplet-api-1.0.0.jar:/usr/local/hadoop/bin/../lib/ftpserver-core-1.0.0.jar:/usr/local/hadoop/bin/../lib/ftpserver-deprecated-1.0.0-M2.jar:/usr/local/hadoop/bin/../lib/hsqldb-1.8.0.10.jar:/usr/local/hadoop/bin/../lib/jackson-core-asl-1.4.2.jar:/usr/local/hadoop/bin/../lib/jackson-mapper-asl-1.4.2.jar:/usr/local/hadoop/bin/../lib/jasper-compiler-5.5.12.jar:/usr/local/hadoop/bin/../lib/jasper-runtime-5.5.12.jar:/usr/local/hadoop/bin/../lib/jdiff-1.0.9.jar:/usr/local/hadoop/bin/../lib/jets3t-0.7.1.jar:/usr/local/hadoop/bin/../lib/jetty-6.1.14.jar:/usr/local/hadoop/bin/../lib/jetty-util-6.1.14.jar:/usr/local/hadoop/bin/../lib/jsp-2.1-6.1.14.jar:/usr/local/hadoop/bin/../lib/jsp-api-2.1-6.1.14.jar:/usr/local/hadoop/bin/../lib/junit-4.8.1.jar:/usr/local/hadoop/bin/../lib/kfs-0.3.jar:/usr/local/hadoop/bin/../lib/log4j-1.2.15.jar:/usr/local/hadoop/bin/../lib/mina-core-2.0.0-M5.jar:/usr/local/hadoop/bin/../lib/mockito-all-1.8.2.jar:/usr/local/hadoop/bin/../lib/oro-2.0.8.jar:/usr/local/hadoop/bin/../lib/paranamer-2.2.jar:/usr/local/hadoop/bin/../lib/paranamer-ant-2.2.jar:/usr/local/hadoop/bin/../lib/paranamer-generator-2.2.jar:/usr/local/hadoop/bin/../lib/qdox-1.10.1.jar:/usr/local/hadoop/bin/../lib/servlet-api-2.5-6.1.14.jar:/usr/local/hadoop/bin/../lib/slf4j-api-1.5.11.jar:/usr/local/hadoop/bin/../lib/slf4j-log4j12-1.5.11.jar:/usr/local/hadoop/bin/../lib/xmlenc-0.52.jar:/usr/local/hadoop/bin/../lib/jsp-2.1/*.jar:/usr/local/hadoop/hdfs/bin/../conf:/usr/local/hadoop/hdfs/bin/../hadoop-hdfs-*.jar:/usr/local/hadoop/hdfs/bin/../lib/*.jar:/usr/local/hadoop/bin/../mapred/conf:/usr/local/hadoop/bin/../mapred/hadoop-mapred-*.jar:/usr/local/hadoop/bin/../mapred/lib/*.jar:/usr/local/hadoop/hdfs/bin/../hadoop-hdfs-*.jar:/usr/local/hadoop/hdfs/bin/../lib/*.jar STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.21 -r 985326; compiled by 'tomwhite' on Tue Aug 17 01:02:28 EDT 2010 ************************************************************/ 11/08/13 10:56:19 INFO namenode.FSNamesystem: defaultReplication = 3 11/08/13 10:56:19 INFO namenode.FSNamesystem: maxReplication = 512 11/08/13 10:56:19 INFO namenode.FSNamesystem: minReplication = 1 11/08/13 10:56:19 INFO namenode.FSNamesystem: maxReplicationStreams = 2 11/08/13 10:56:19 INFO namenode.FSNamesystem: shouldCheckForEnoughRacks = false 11/08/13 10:56:19 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000 11/08/13 10:56:20 INFO namenode.FSNamesystem: fsOwner=root 11/08/13 10:56:20 INFO namenode.FSNamesystem: supergroup=supergroup 11/08/13 10:56:20 INFO namenode.FSNamesystem: isPermissionEnabled=true 11/08/13 10:56:20 INFO namenode.FSNamesystem: isAccessTokenEnabled=false accessKeyUpdateInterval=0 min(s), accessTokenLifetime=0 min(s) 11/08/13 10:56:21 INFO common.Storage: Image file of size 110 saved in 0 seconds. 11/08/13 10:56:21 INFO common.Storage: Storage directory /home/root/tmp/dfs/name has been successfully formatted. 11/08/13 10:56:21 INFO namenode.NameNode: SHUTDOWN_MSG: /************************************************************ SHUTDOWN_MSG: Shutting down NameNode at oplinux.hehaibo.com/127.0.0.1 ************************************************************/ //停止hadoop [root@oplinux bin]# sh stop-all.sh This script is Deprecated. Instead use stop-dfs.sh and stop-mapred.sh no namenode to stop localhost: no datanode to stop localhost: no secondarynamenode to stop no jobtracker to stop localhost: no tasktracker to stop [root@oplinux bin]# sh start-all.sh This script is Deprecated. Instead use start-dfs.sh and start-mapred.sh starting namenode, logging to /usr/local/hadoop/bin/../logs/hadoop-root-namenode-oplinux.hehaibo.com.out localhost: starting datanode, logging to /usr/local/hadoop/bin/../logs/hadoop-root-datanode-oplinux.hehaibo.com.out localhost: starting secondarynamenode, logging to /usr/local/hadoop/bin/../logs/hadoop-root-secondarynamenode-oplinux.hehaibo.com.out starting jobtracker, logging to /usr/local/hadoop/bin/../logs/hadoop-root-jobtracker-oplinux.hehaibo.com.out localhost: starting tasktracker, logging to /usr/local/hadoop/bin/../logs/hadoop-root-tasktracker-oplinux.hehaibo.com.out [root@oplinux bin]# //启动hadoop [root@oplinux bin]# sh start-all.sh This script is Deprecated. Instead use start-dfs.sh and start-mapred.sh starting namenode, logging to /usr/local/hadoop/bin/../logs/hadoop-root-namenode-oplinux.hehaibo.com.out localhost: starting datanode, logging to /usr/local/hadoop/bin/../logs/hadoop-root-datanode-oplinux.hehaibo.com.out localhost: starting secondarynamenode, logging to /usr/local/hadoop/bin/../logs/hadoop-root-secondarynamenode-oplinux.hehaibo.com.out starting jobtracker, logging to /usr/local/hadoop/bin/../logs/hadoop-root-jobtracker-oplinux.hehaibo.com.out localhost: starting tasktracker, logging to /usr/local/hadoop/bin/../logs/hadoop-root-tasktracker-oplinux.hehaibo.com.out //验证启动是否成功 [root@oplinux hadoop]# jps 5333 TaskTracker 6035 Jps 4801 NameNode 5190 JobTracker 5078 SecondaryNameNode 4940 DataNode [root@oplinux hadoop]# jps 5333 TaskTracker 6068 Jps 4801 NameNode 5190 JobTracker 5078 SecondaryNameNode 4940 DataNode //创建一份测试文件 如:/home/root/hadooptest.txt //我的dfs文件目录为/user/root [linux目录上不会存在,这个应该是hadoop的文件目录] /** * dfs 文件操作命令 //创建目录 dfs -mkdir firsttest //实际上会在hadoop /user/root上创建/user/root/firsttest dfs -ls 查看文件命令 dfs -rm 删除目录 */ //切换目录 [root@oplinux bin]# cd ../ //执行一个例子 //先创建文件 /home/root/hadooptest.txt 文件内容随便输入些英文单词 我们将文件上传到hadoop 文件目录firsttest中. [root@oplinux hadoop]# sh hadoop dfs -copyFromLocal /home/root/hadooptest.txt firsttest sh: hadoop: 没有那个文件或目录 //注意这个错误,是firsttest目录不存在 //执行下面命令创建它 [root@oplinux hadoop]# bin/hadoop dfs -mkdir firsttest DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. 11/08/13 12:11:52 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000 11/08/13 12:11:52 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id //查看创建的目录 [root@oplinux hadoop]# bin/hadoop dfs -ls DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. 11/08/13 12:12:46 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000 11/08/13 12:12:46 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id Found 2 items drwxr-xr-x - root supergroup 0 2011-08-13 12:11 /user/root/firsttest [root@oplinux hadoop]# //我们再执行wordcount 将执行的结果保存到result目录下 [root@oplinux hadoop]# bin/hadoop jar hadoop-mapred-examples-0.21.0.jar wordcount firsttestttttt result 11/08/13 11:50:49 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000 11/08/13 11:50:50 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id 11/08/13 11:50:50 WARN mapreduce.JobSubmitter: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same. 11/08/13 11:50:50 INFO mapreduce.JobSubmitter: Cleaning up the staging area hdfs://localhost:9000/home/root/tmp/mapred/staging/root/.staging/job_201108131105_0006 org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: hdfs://localhost:9000/user/root/firsttestttttt at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.listStatus(FileInputFormat.java:245) at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.getSplits(FileInputFormat.java:271) at org.apache.hadoop.mapreduce.JobSubmitter.writeNewSplits(JobSubmitter.java:401) at org.apache.hadoop.mapreduce.JobSubmitter.writeSplits(JobSubmitter.java:418) at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:338) at org.apache.hadoop.mapreduce.Job.submit(Job.java:960) at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:976) at org.apache.hadoop.examples.WordCount.main(WordCount.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:72) at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:144) at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:68) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.hadoop.util.RunJar.main(RunJar.java:192) //出现错误, Input path does not exist: hdfs://localhost:9000/user/root/tmp/firsttestttttt //仔细检查,发现是firsttestttttt 这个目录不存在,是因为你没有创建firsttest 所以不存在,创建了就ok了 //正确的结果 [root@oplinux hadoop]# bin/hadoop jar hadoop-mapred-examples-0.21.0.jar wordcount firsttest result 11/08/13 13:56:11 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000 11/08/13 13:56:12 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id 11/08/13 13:56:12 WARN mapreduce.JobSubmitter: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same. 11/08/13 13:56:13 INFO input.FileInputFormat: Total input paths to process : 1 11/08/13 13:56:14 WARN conf.Configuration: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps 11/08/13 13:56:14 INFO mapreduce.JobSubmitter: number of splits:1 11/08/13 13:56:14 INFO mapreduce.JobSubmitter: adding the following namenodes' delegation tokens:null 11/08/13 13:56:15 INFO mapreduce.Job: Running job: job_201108131105_0011 11/08/13 13:56:16 INFO mapreduce.Job: map 0% reduce 0% 11/08/13 13:56:43 INFO mapreduce.Job: map 100% reduce 0% 11/08/13 13:57:04 INFO mapreduce.Job: map 100% reduce 100% 11/08/13 13:57:06 INFO mapreduce.Job: Job complete: job_201108131105_0011 11/08/13 13:57:06 INFO mapreduce.Job: Counters: 33 FileInputFormatCounters BYTES_READ=141 FileSystemCounters FILE_BYTES_READ=284 FILE_BYTES_WRITTEN=600 HDFS_BYTES_READ=262 HDFS_BYTES_WRITTEN=178 Shuffle Errors BAD_ID=0 CONNECTION=0 IO_ERROR=0 WRONG_LENGTH=0 WRONG_MAP=0 WRONG_REDUCE=0 Job Counters Data-local map tasks=1 Total time spent by all maps waiting after reserving slots (ms)=0 Total time spent by all reduces waiting after reserving slots (ms)=0 SLOTS_MILLIS_MAPS=22524 SLOTS_MILLIS_REDUCES=18291 Launched map tasks=1 Launched reduce tasks=1 Map-Reduce Framework Combine input records=28 Combine output records=25 Failed Shuffles=0 GC time elapsed (ms)=404 Map input records=4 Map output bytes=253 Map output records=28 Merged Map outputs=1 Reduce input groups=25 Reduce input records=25 Reduce output records=25 Reduce shuffle bytes=284 Shuffled Maps =1 Spilled Records=50 SPLIT_RAW_BYTES=121 /** /////这个错误提示Output directory result already exists 因为之前执行过,可以先删除result目录 执行命令 bin/hadoop dfs -rm result [root@oplinux hadoop]# bin/hadoop jar hadoop-mapred-examples-0.21.0.jar wordcount firsttest result 11/08/13 12:17:24 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000 11/08/13 12:17:25 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id 11/08/13 12:17:25 WARN mapreduce.JobSubmitter: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same. 11/08/13 12:17:25 INFO mapreduce.JobSubmitter: Cleaning up the staging area hdfs://localhost:9000/home/root/tmp/mapred/staging/root/.staging/job_201108131105_0009 org.apache.hadoop.fs.FileAlreadyExistsException: Output directory result already exists at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:140) at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:373) at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:334) at org.apache.hadoop.mapreduce.Job.submit(Job.java:960) at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:976) at org.apache.hadoop.examples.WordCount.main(WordCount.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:59 */ //我们查看执行结果后的目录 [root@oplinux hadoop]# bin/hadoop dfs -ls DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. 11/08/13 12:12:46 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000 11/08/13 12:12:46 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id Found 2 items //执行计算的目录 drwxr-xr-x - root supergroup 0 2011-08-13 12:11 /user/root/firsttest //输出结果的目录 drwxr-xr-x - root supergroup 0 2011-08-13 11:52 /user/root/result [root@oplinux hadoop]# /////查看结果 //查看执行后result目录下有哪些内容 [root@oplinux hadoop]# bin/hadoop dfs -ls result DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. 11/08/13 14:06:23 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000 11/08/13 14:06:23 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id Found 2 items -rw-r--r-- 3 root supergroup 0 2011-08-13 13:57 /user/root/result/_SUCCESS -rw-r--r-- 3 root supergroup 178 2011-08-13 13:56 /user/root/result/part-r-00000 //查看文件内容 [root@oplinux hadoop]# bin/hadoop dfs -cat result/part-r-00000 DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it. 11/08/13 14:08:34 INFO security.Groups: Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping; cacheTimeout=300000 11/08/13 14:08:34 WARN conf.Configuration: mapred.task.id is deprecated. Instead, use mapreduce.task.attempt.id . 1 I 1 a 1 am 1 case 1 do 1 everything 1 example 1 hadoop 2 happy 1 hehaibo 1 hello 1 if 1 is 3 jsut 1 linux 1 play 1 possible 1 sunday 1 this 1 to 1 today 1 with 1 yes 1 you 1 [root@oplinux hadoop]#
暂时告一段落。
相关推荐
### Hadoop安装教程:单机与伪分布式配置详解 #### 一、引言 Hadoop是一种开源的大数据处理框架,广泛应用于数据存储和处理场景。本文档将详细介绍如何在Ubuntu 14.04环境下安装配置Hadoop 2.6.0版本,包括单机模式...
2. **安装SSH**:Hadoop的伪分布式环境需要SSH服务,用于在本地不同进程中通信。Ubuntu系统通常预装了SSH客户端,我们需要安装SSH服务器。执行: ```bash sudo apt install openssh-server ``` 安装完成后,...
RedHat Linux 9.0 下 Hadoop 单机配置归类 Hadoop 是一个基于 Java 的分布式计算平台,由 Apache 开发,用于存储和处理大量数据。下面是 Red Hat Linux 9.0 下 Hadoop 单机配置的步骤和要求。 Hadoop 安装前提 1....
资源名称:RedHat linux下安装hadoop内容简介: hadoop安装有三种模式:单机模式,伪分布式,完全分布式。本文档主要讲述的是RedHat linux下安装hadoop 0.20.2, 并在windows下远程连接此hadoop,开发调试;感兴趣的...
【Hadoop安装教程:单机与伪分布式配置详解】 在大数据处理领域,Hadoop是一个广泛使用的开源框架,它允许在廉价硬件集群上处理大规模数据。本文将指导您如何在Ubuntu 14.04 64位系统上安装Hadoop 2.6.0,无论是...
Hadoop有三种工作模式:单机模式、伪分布式模式和完全分布式模式。 1. 单机模式:在单机模式下,Hadoop被配置成以非分布式模式运行的一个独立Java进程。这对调试非常有帮助。 2. 伪分布式模式:Hadoop可以在单节点...
。。。
它覆盖了Hadoop单机安装以及集群安装的过程,并且适用于CentOS 5/RedHat 5.2(32位/64位)及Ubuntu等操作系统。 #### 二、Hadoop单机安装配置 ##### 1. Linux基础环境搭建 - **Linux安装**:通常推荐使用VMware等...
在Redhat LINUX5.0操作系统上安装Oracle 10g、Tomcat5和JDK是一项技术性较强的任务,涉及到多个层面的知识点。首先,我们来详细解析这些关键组件的安装和配置过程。 1. **Oracle 10g安装**: Oracle 10g是一款关系...
redhat linux安装使用指南 redhat linux安装使用指南
RedHat Linux 9.0 安装和配置步骤 ...RedHat Linux 9.0 安装和配置步骤需要注意安装前的准备、确认安装方式、安装 RedHat Linux 9.0 等几个方面,并需要注意一些安装注意事项,以确保安装顺利进行。
安装好Linux系统后,安装JDK 1.8.0_05,这是运行Hadoop所必需的Java环境。你可以通过Linux的包管理器或手动下载并安装JDK。 接下来,安装VMware Tools以优化虚拟机性能,包括共享文件夹功能。这允许你从主机系统向...
Hadoop分布式集群配置是大数据处理的关键步骤之一,本指南将指导读者成功配置一个由5台计算机构成的Hadoop集群,并成功运行wordcount处理大型数据(大于50G)。 一、Hadoop集群架构简介 Hadoop集群由一个Master...
RedHat Linux安装图解RedHat Linux安装图解RedHat Linux安装图解RedHat Linux安装图解
在redhat下安装hadoop集群,文件中包括设置静态ip,jdk安装,内含截图,详细指导。
安装redhat linux以后需要安装附件的包才能支持中文,否则中文会显示乱码。 请按照如下步骤安装: rpm -ivh libFS-1.0.0-3.1.x86_64.rpm rpm -ivh ttmkfdir-3.0.9-23.el5.x86_64.rpm rpm -ivh chkfontpath-1.10.1-...
### 傻瓜式安装RedHat Linux 7.4:详细步骤与知识点解析 #### 一、RedHat Linux 7.4简介 Red Hat Enterprise Linux (RHEL) 是一款广泛应用于企业级服务器的操作系统,其稳定性、安全性以及广泛的社区支持使其成为...