专业只做数据库实训和认证的品牌机构

微信公众号新浪微博
免费咨询电话:400-0909-964
  • --->
当前位置: 网站首页 > 行业资讯 > Hadoop 调试第一个mapreduce程序过程详细记录总结

Hadoop 调试第一个mapreduce程序过程详细记录总结

文章来源: 更新时间:2016/6/17 15:21:31

在线老师点击咨询:

最新学讯:近期OCP认证正在报名中,因考试人员较多请尽快报名获取最近考试时间,报名费用请联系在线老师,甲骨文官方认证,报名从速!

我要咨询

开发环境搭建参考

:http://blog.itpub.net/26230597/viewspace-1370205/

1,程序代码如下:

package wc;

import Java.io.IOException;

import Java.util.StringTokenizer;

import org.apache.Hadoop.conf.Configuration;

import org.apache.Hadoop.fs.Path;

import org.apache.Hadoop.io.IntWritable;

import org.apache.Hadoop.io.Text;

import org.apache.Hadoop.mapreduce.Job;

import org.apache.Hadoop.mapreduce.Mapper;

import org.apache.Hadoop.mapreduce.Reducer;

import org.apache.Hadoop.mapreduce.lib.input.FileInputFormat;

import org.apache.Hadoop.mapreduce.lib.output.FileOutputFormat;

import org.apache.Hadoop.util.GenericOptionsParser;

public class W2 {

public static class TokenizerMapper extends Mapper {

private final static IntWritable one = new IntWritable(1);

private Text word = new Text();

public void map(Object key, Text value, Context context)

throws IOException, InterruptedException {

StringTokenizer itr = new StringTokenizer(value.toString());

while (itr.hasMoreTokens()) {

word.set(itr.nextToken());

context.write(word, one);

}

}

}

public static class IntSumReducer extends

Reducer {

private IntWritable result = new IntWritable();

public void reduce(Text key, Iterablevalues,

Context context) throws IOException, InterruptedException {

int sum = 0;

for (IntWritable val : values) {

sum += val.get();

}

result.set(sum);

context.write(key, result);

}

}

public static void main(String[] args) throws Exception {

Configuration conf = new Configuration();

System.setProperty("Hadoop.home.dir", "E:/hadoop/hadoop-2.3.0");

String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs();

if (otherArgs.length != 2) {

System.err.println("Usage: wordcount");

System.exit(2);

}

Job job = new Job(conf, "word count");

job.setJarByClass(W2.class);

job.setMapperClass(TokenizerMapper.class);

job.setCombinerClass(IntSumReducer.class);

job.setReducerClass(IntSumReducer.class);

job.setOutputKeyClass(Text.class);

job.setOutputValueClass(IntWritable.class);

FileInputFormat.addInputPath(job, new Path(otherArgs[0]));

FileOutputFormat.setOutputPath(job, new Path(otherArgs[1]));

System.exit(job.waitForCompletion(true) ? 0 : 1);

}

}

2,运行方式:

在eclipse中W2.Java代码区点击右键,点击里面的run on Hadoop即可运行该程序。

3,运行报错(1):

Exception in thread "main" Java.lang.NoClassDefFoundError: com/google/common/base/Preconditions

at org.apache.Hadoop.conf.Configuration$DeprecationDelta.(Configuration.Java:314)

at org.apache.Hadoop.conf.Configuration$DeprecationDelta.(Configuration.Java:327)

at org.apache.Hadoop.conf.Configuration.(Configuration.Java:409)

at wc.WordCount.main(WordCount.Java:82)

Caused by: Java.lang.ClassNotFoundException: com.google.common.base.Preconditions

at Java.net.URLClassLoader$1.run(Unknown Source)

at Java.net.URLClassLoader$1.run(Unknown Source)

at Java.security.AccessController.doPrivileged(Native Method)

at Java.net.URLClassLoader.findClass(Unknown Source)

at Java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at Java.lang.ClassLoader.loadClass(Unknown Source)

... 4 more

少了guava-r07.jar包。

4,运行报错(2):

Exception in thread "main" Java.lang.NoClassDefFoundError: org/apache/hadoop/util/PlatformName

缺少Hadoop-auth-2.2.0.jar包,这个包在. /eclipse/configuration/org.eclipse.osgi/bundles/230/1/.cp/lib/hadoop-auth-2.2.0.jar里面

5,运行报错(3):

Exception in thread "main" Java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

缺少2个包:

/usr/local/eclipse/configuration/org.eclipse.osgi/bundles/230/1/.cp/lib/slf4j-api-1.7.5.jar

/usr/local/eclipse/configuration/org.eclipse.osgi/bundles/230/1/.cp/lib/slf4j-log4j12-1.7.5.jar

6,运行报错(4):

在Eclipse运行Hadoop报错:

2014-12-11 20:12:01,750 INFO [main] Configuration.deprecation (Configuration.Java:warnOnceIfDeprecated(996)) - fs.default.name is deprecated. Instead, use fs.defaultFS

SLF4J: This version of SLF4J requires log4j version 1.2.12 or later. See also http://www.slf4j.org/codes.html#log4j_version

2014-12-11 20:12:02,760 WARN [main] util.NativeCodeLoader (NativeCodeLoader.Java:(62)) - Unable to load native-Hadoop library for your platform... using builtin-Java classes where applicable

2014-12-11 20:12:02,812 ERROR [main] util.Shell (Shell.Java:getWinUtilsPath(336)) - Failed to locate the winutils binary in the Hadoop binary path

Java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

解决:

代码里加上 System.setProperty("Hadoop.home.dir", "d:/hadoop");并查看Windows环境下Hadoop目录下的bin目录下有没有winutils.exe,没有就下一个拷贝过去。

7,运行报错(5):

报错:

Exception in thread "main" Java.lang.NoClassDefFoundError: com/google/protobuf/ServiceException

at org.apache.Hadoop.ipc.ProtobufRpcEngine.(ProtobufRpcEngine.Java:69)

at Java.lang.Class.forName0(Native Method)

缺乏/usr/local/app/apache-tomcat-6.0.37_9090/webapps/solr/WEB-INF/lib/protobuf-Java-2.4.0a.jar

Exception in thread "main" Java.lang.VerifyError: class org.apache.Hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$AppendRequestProto overrides final method getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet;

需要换成protobuf-Java-2.5.0.jar包。

8,运行报错(6):

Caused by: Java.lang.ClassNotFoundException: com.google.common.cache.CacheBuilder

at Java.net.URLClassLoader$1.run(Unknown Source)

at Java.net.URLClassLoader$1.run(Unknown Source)

at Java.security.AccessController.doPrivileged(Native Method)

at Java.net.URLClassLoader.findClass(Unknown Source)

at Java.lang.ClassLoader.loadClass(Unknown Source)

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

at Java.lang.ClassLoader.loadClass(Unknown Source)

... 12 more

少guava-11.0.2.jar包

9,运行报错(7):

Exception in thread "main" org.apache.Hadoop.security.AccessControlException: Permission denied: user=Administrator, access=EXECUTE, inode="/tmp":Hadoop:supergroup:drwx------

at org.apache.Hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.Java:234)

at org.apache.Hadoop.hdfs.server.namenode.FSPermissionChecker.checkTraverse(FSPermissionChecker.Java:187)

at org.apache.Hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.Java:150)

at org.apache.Hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.Java:5433)

at org.apache.Hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.Java:5415)

at org.apache.Hadoop.hdfs.server.namenode.FSNamesystem.checkOwner(FSNamesystem.Java:5371)

at org.apache.Hadoop.hdfs.server.namenode.FSNamesystem.setPermissionInt(FSNamesystem.Java:1462)

at org.apache.Hadoop.hdfs.server.namenode.FSNamesystem.setPermission(FSNamesystem.Java:1443)

at org.apache.Hadoop.hdfs.server.namenode.NameNodeRpcServer.setPermission(NameNodeRpcServer.Java:536)

at org.apache.Hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.setPermission(ClientNamenodeProtocolServerSideTranslatorPB.Java:368)

at org.apache.Hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.Java)

at org.apache.Hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.Java:585)

at org.apache.Hadoop.ipc.RPC$Server.call(RPC.Java:928)

at org.apache.Hadoop.ipc.Server$Handler$1.run(Server.Java:1962)

at org.apache.Hadoop.ipc.Server$Handler$1.run(Server.Java:1958)

at Java.security.AccessController.doPrivileged(Native Method)

at Javax.security.auth.Subject.doAs(Subject.Java:415)

at org.apache.Hadoop.security.UserGroupInformation.doAs(UserGroupInformation.Java:1548)

at org.apache.Hadoop.ipc.Server$Handler.run(Server.Java:1956)

10,运行报错(8):

报错如下:

2014-12-16 10:16:09,632 INFO [main] Configuration.deprecation (Configuration.Java:warnOnceIfDeprecated(996)) - fs.default.name is deprecated. Instead, use fs.defaultFS

2014-12-16 10:16:11,597 WARN [main] util.NativeCodeLoader (NativeCodeLoader.Java:(62)) - Unable to load native-Hadoop library for your platform... using builtin-Java classes where applicable

Job start!

2014-12-16 10:16:28,819 INFO [main] client.RMProxy (RMProxy.Java:createRMProxy(92)) - Connecting to ResourceManager at /192.168.52.128:8032

2014-12-16 10:16:29,714 WARN [main] security.UserGroupInformation (UserGroupInformation.Java:doAs(1551)) - PriviledgedActionException as:Administrator (auth:SIMPLE) cause:Java.io.IOException: The ownership on the staging directory /tmp/hadoop-yarn/staging/Administrator/.staging is not as expected. It is owned by Hadoop. The directory must be owned by the submitter Administrator or by Administrator

Exception in thread "main" Java.io.IOException: The ownership on the staging directory /tmp/hadoop-yarn/staging/Administrator/.staging is not as expected. It is owned by Hadoop. The directory must be owned by the submitter Administrator or by Administrator

at org.apache.Hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.Java:112)

at org.apache.Hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.Java:348)

at org.apache.Hadoop.mapreduce.Job$10.run(Job.Java:1285)

at org.apache.Hadoop.mapreduce.Job$10.run(Job.Java:1282)

at Java.security.AccessController.doPrivileged(Native Method)

at Javax.security.auth.Subject.doAs(Unknown Source)

at org.apache.Hadoop.security.UserGroupInformation.doAs(UserGroupInformation.Java:1548)

at org.apache.Hadoop.mapreduce.Job.submit(Job.Java:1282)

at org.apache.Hadoop.mapreduce.Job.waitForCompletion(Job.Java:1303)

at wc.WordCount.main(WordCount.Java:147)

解决方法:

接着选择"本地用户和组",展开"用户",找到系统管理员"Administrator",修改其为"Hadoop",操作结果如下图:

最后,把电脑进行"注销"或者"重启电脑",这样才能使管理员才能用这个名字。再次运行之后,显示正常,能连接到linux下的Hadoop服务了,控制台信息如下显示:

2014-12-16 11:01:07,009 INFO [main] Configuration.deprecation (Configuration.Java:warnOnceIfDeprecated(996)) - fs.default.name is deprecated. Instead, use fs.defaultFS

2014-12-16 11:01:12,938 WARN [main] util.NativeCodeLoader (NativeCodeLoader.Java:(62)) - Unable to load native-Hadoop library for your platform... using builtin-Java classes where applicable

Job start!

2014-12-16 11:01:39,646 INFO [main] client.RMProxy (RMProxy.Java:createRMProxy(92)) - Connecting to ResourceManager at /192.168.52.128:8032

2014-12-16 11:01:49,297 INFO [main] mapreduce.JobSubmissionFiles (JobSubmissionFiles.Java:getStagingDir(119)) - Permissions on staging directory /tmp/hadoop-yarn/staging/hadoop/.staging are incorrect: rwxrwxrwx. Fixing permissions to correct value rwx------

2014-12-16 11:01:56,366 WARN [main] mapreduce.JobSubmitter (JobSubmitter.Java:copyAndConfigureFiles(150)) - Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this.

2014-12-16 11:02:14,657 INFO [main] input.FileInputFormat (FileInputFormat.Java:listStatus(287)) - Total input paths to process : 1

2014-12-16 11:02:15,781 INFO [main] mapreduce.JobSubmitter (JobSubmitter.Java:submitJobInternal(396)) - number of splits:1

2014-12-16 11:02:16,057 INFO [main] Configuration.deprecation (Configuration.Java:warnOnceIfDeprecated(996)) - fs.default.name is deprecated. Instead, use fs.defaultFS

2014-12-16 11:02:16,711 INFO [main] mapreduce.JobSubmitter (JobSubmitter.Java:printTokens(479)) - Submitting tokens for job: job_1418698686855_0001

2014-12-16 11:02:20,493 INFO [main] impl.YarnClientImpl (YarnClientImpl.Java:submitApplication(166)) - Submitted application application_1418698686855_0001

2014-12-16 11:02:21,353 INFO [main] mapreduce.Job (Job.Java:submit(1289)) - The url to track the job: http://name01:8088/proxy/application_1418698686855_0001/

2014-12-16 11:02:21,393 INFO [main] mapreduce.Job (Job.Java:monitorAndPrintJob(1334)) - Running job: job_1418698686855_0001

2014-12-16 11:02:45,306 INFO [main] mapreduce.Job (Job.Java:monitorAndPrintJob(1355)) - Job job_1418698686855_0001 running in uber mode : false

2014-12-16 11:02:45,392 INFO [main] mapreduce.Job (Job.Java:monitorAndPrintJob(1362)) - map 0% reduce 0%

2014-12-16 11:02:45,543 INFO [main] mapreduce.Job (Job.Java:monitorAndPrintJob(1375)) - Job job_1418698686855_0001 failed with state FAILED due to: Application application_1418698686855_0001 failed 2 times due to AM Container for appattempt_1418698686855_0001_000002 exited with exitCode: 1 due to: Exception from container-launch: org.apache.Hadoop.util.Shell$ExitCodeException: /bin/bash: line 0: fg: no job control

org.apache.Hadoop.util.Shell$ExitCodeException: /bin/bash: line 0: fg: no job control

at org.apache.Hadoop.util.Shell.runCommand(Shell.Java:505)

at org.apache.Hadoop.util.Shell.run(Shell.Java:418)

at org.apache.Hadoop.util.Shell$ShellCommandExecutor.execute(Shell.Java:650)

at org.apache.Hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.Java:195)

at org.apache.Hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.Java:283)

at org.apache.Hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.Java:79)

at Java.util.concurrent.FutureTask.run(FutureTask.Java:262)

at Java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1145)

at Java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.Java:615)

at Java.lang.Thread.run(Thread.Java:745)

Container exited with a non-zero exit code 1

.Failing this attempt.. Failing the application.

2014-12-16 11:02:45,955 INFO [main] mapreduce.Job (Job.Java:monitorAndPrintJob(1380)) - Counters: 0

error!

11,运行报错(9):

2014-12-16 15:31:45,980 INFO [main] Configuration.deprecation (Configuration.Java:warnOnceIfDeprecated(996)) - session.id is deprecated. Instead, use dfs.metrics.session-id

2014-12-16 15:31:45,986 INFO [main] jvm.JvmMetrics (JvmMetrics.Java:init(76)) - Initializing JVM Metrics with processName=JobTracker, sessionId=

2014-12-16 15:31:46,213 WARN [main] security.UserGroupInformation (UserGroupInformation.Java:doAs(1551)) - PriviledgedActionException as:Hadoop (auth:SIMPLE) cause:org.apache.Hadoop.mapred.FileAlreadyExistsException: Output directory hdfs://192.168.52.128:9000/data/output already exists

Exception in thread "main" org.apache.Hadoop.mapred.FileAlreadyExistsException: Output directory hdfs://192.168.52.128:9000/data/output already exists

at org.apache.Hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.Java:146)

at org.apache.Hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.Java:458)

删除原来的/data/output目录

12,运行报错(10):

Could not locate executable null\bin\winutils.exe in the Hadoop binaries

老掉牙的问题了,系统变量未设置HADOOP_HOME,系统变量设置HADOOP_HOME,或者直接加一句代码指定路径地址:

System.setProperty("Hadoop.home.dir", "E:/hadoop/hadoop-2.3.0");

13,运行报错(11):

2014-12-16 14:28:58,589 WARN [main] util.NativeCodeLoader (NativeCodeLoader.Java:(62)) - Unable to load native-Hadoop library for your platform... using builtin-Java classes where applicable

2014-12-16 14:29:08,664 INFO [main] Configuration.deprecation (Configuration.Java:warnOnceIfDeprecated(996)) - session.id is deprecated. Instead, use dfs.metrics.session-id

2014-12-16 14:29:08,665 INFO [main] jvm.JvmMetrics (JvmMetrics.Java:init(76)) - Initializing JVM Metrics with processName=JobTracker, sessionId=

2014-12-16 14:29:10,026 INFO [main] input.FileInputFormat (FileInputFormat.Java:listStatus(287)) - Total input paths to process : 1

2014-12-16 14:29:11,164 INFO [main] mapreduce.JobSubmitter (JobSubmitter.Java:submitJobInternal(396)) - number of splits:1

2014-12-16 14:29:11,761 INFO [main] mapreduce.JobSubmitter (JobSubmitter.Java:printTokens(479)) - Submitting tokens for job: job_local1985238633_0001

2014-12-16 14:29:11,810 WARN [main] conf.Configuration (Configuration.Java:loadProperty(2345)) - file:/tmp/hadoop-Hadoop/mapred/staging/hadoop1985238633/.staging/job_local1985238633_0001/job.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval; Ignoring.

2014-12-16 14:29:11,811 WARN [main] conf.Configuration (Configuration.Java:loadProperty(2345)) - file:/tmp/hadoop-Hadoop/mapred/staging/hadoop1985238633/.staging/job_local1985238633_0001/job.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts; Ignoring.

2014-12-16 14:29:11,916 INFO [main] mapreduce.JobSubmitter (JobSubmitter.Java:submitJobInternal(441)) - Cleaning up the staging area file:/tmp/hadoop-Hadoop/mapred/staging/hadoop1985238633/.staging/job_local1985238633_0001

Exception in thread "main" Java.lang.UnsatisfiedLinkError: org.apache.Hadoop.io.nativeio.NativeIO$Windows.access0(LJava/lang/String;I)Z

at org.apache.Hadoop.io.nativeio.NativeIO$Windows.access0(Native Method)

at org.apache.Hadoop.io.nativeio.NativeIO$Windows.access(NativeIO.Java:560)

at org.apache.Hadoop.fs.FileUtil.canRead(FileUtil.Java:977)

at org.apache.Hadoop.util.DiskChecker.checkAccessByFileMethods(DiskChecker.Java:177)

at org.apache.Hadoop.util.DiskChecker.checkDirAccess(DiskChecker.Java:164)

at org.apache.Hadoop.util.DiskChecker.checkDir(DiskChecker.Java:98)

at org.apache.Hadoop.fs.LocalDirAllocator$AllocatorPerContext.confChanged(LocalDirAllocator.Java:285)

at org.apache.Hadoop.fs.LocalDirAllocator$AllocatorPerContext.getLocalPathForWrite(LocalDirAllocator.Java:344)

at org.apache.Hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.Java:150)

at org.apache.Hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.Java:131)

at org.apache.Hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.Java:115)

at org.apache.Hadoop.mapred.LocalDistributedCacheManager.setup(LocalDistributedCacheManager.Java:131)

at org.apache.Hadoop.mapred.LocalJobRunner$Job.(LocalJobRunner.Java:163)

at org.apache.Hadoop.mapred.LocalJobRunner.submitJob(LocalJobRunner.Java:731)

at org.apache.Hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.Java:432)

at org.apache.Hadoop.mapreduce.Job$10.run(Job.Java:1285)

at org.apache.Hadoop.mapreduce.Job$10.run(Job.Java:1282)

at Java.security.AccessController.doPrivileged(Native Method)

at Javax.security.auth.Subject.doAs(Unknown Source)

at org.apache.Hadoop.security.UserGroupInformation.doAs(UserGroupInformation.Java:1548)

at org.apache.Hadoop.mapreduce.Job.submit(Job.Java:1282)

at org.apache.Hadoop.mapreduce.Job.waitForCompletion(Job.Java:1303)

at wc.W2.main(W2.Java:111)

缺 乏Hadoop.dll,下载Hadoop.dll放到Hadoop/bin目录下即可,但是之后运行依然报错,还需要手动设置下Hadoop在 windows下的运行路径,于是在Eclipse运行环境中,在运行的WordCount.Java中,右键点击在下拉菜单栏里面选择Run Configurations,然后加上path的设置,Run顺利通过。参数如下图所示:

之后调试通过,运行结果如下:

2014-12-16 15:34:01,303 INFO [main] Configuration.deprecation (Configuration.Java:warnOnceIfDeprecated(996)) - session.id is deprecated. Instead, use dfs.metrics.session-id

2014-12-16 15:34:01,309 INFO [main] jvm.JvmMetrics (JvmMetrics.Java:init(76)) - Initializing JVM Metrics with processName=JobTracker, sessionId=

2014-12-16 15:34:02,047 INFO [main] input.FileInputFormat (FileInputFormat.Java:listStatus(287)) - Total input paths to process : 1

2014-12-16 15:34:02,120 INFO [main] mapreduce.JobSubmitter (JobSubmitter.Java:submitJobInternal(396)) - number of splits:1

2014-12-16 15:34:02,323 INFO [main] mapreduce.JobSubmitter (JobSubmitter.Java:printTokens(479)) - Submitting tokens for job: job_local1764589720_0001

2014-12-16 15:34:02,367 WARN [main] conf.Configuration (Configuration.Java:loadProperty(2345)) - file:/tmp/hadoop-Hadoop/mapred/staging/hadoop1764589720/.staging/job_local1764589720_0001/job.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval; Ignoring.

2014-12-16 15:34:02,368 WARN [main] conf.Configuration (Configuration.Java:loadProperty(2345)) - file:/tmp/hadoop-Hadoop/mapred/staging/hadoop1764589720/.staging/job_local1764589720_0001/job.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts; Ignoring.

2014-12-16 15:34:02,682 WARN [main] conf.Configuration (Configuration.Java:loadProperty(2345)) - file:/tmp/hadoop-Hadoop/mapred/local/localRunner/hadoop/job_local1764589720_0001/job_local1764589720_0001.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.retry.interval; Ignoring.

2014-12-16 15:34:02,682 WARN [main] conf.Configuration (Configuration.Java:loadProperty(2345)) - file:/tmp/hadoop-Hadoop/mapred/local/localRunner/hadoop/job_local1764589720_0001/job_local1764589720_0001.xml:an attempt to override final parameter: mapreduce.job.end-notification.max.attempts; Ignoring.

2014-12-16 15:34:02,703 INFO [main] mapreduce.Job (Job.Java:submit(1289)) - The url to track the job: http://localhost:8080/

2014-12-16 15:34:02,704 INFO [main] mapreduce.Job (Job.Java:monitorAndPrintJob(1334)) - Running job: job_local1764589720_0001

2014-12-16 15:34:02,707 INFO [Thread-4] mapred.LocalJobRunner (LocalJobRunner.Java:createOutputCommitter(471)) - OutputCommitter set in config null

2014-12-16 15:34:02,719 INFO [Thread-4] mapred.LocalJobRunner (LocalJobRunner.Java:createOutputCommitter(489)) - OutputCommitter is org.apache.Hadoop.mapreduce.lib.output.FileOutputCommitter

2014-12-16 15:34:02,853 INFO [Thread-4] mapred.LocalJobRunner (LocalJobRunner.Java:runTasks(448)) - Waiting for map tasks

2014-12-16 15:34:02,857 INFO [LocalJobRunner Map Task Executor #0] mapred.LocalJobRunner (LocalJobRunner.Java:run(224)) - Starting task: attempt_local1764589720_0001_m_000000_0

2014-12-16 15:34:02,919 INFO [LocalJobRunner Map Task Executor #0] util.ProcfsBasedProcessTree (ProcfsBasedProcessTree.Java:isAvailable(129)) - ProcfsBasedProcessTree currently is supported only on Linux.

2014-12-16 15:34:03,281 INFO [LocalJobRunner Map Task Executor #0] mapred.Task (Task.Java:initialize(581)) - Using ResourceCalculatorProcessTree : org.apache.Hadoop.yarn.util.WindowsBasedProcessTree@2e1022ec

2014-12-16 15:34:03,287 INFO [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.Java:runNewMapper(733)) - Processing split: hdfs://192.168.52.128:9000/data/input/README.txt:0+1366

2014-12-16 15:34:03,304 INFO [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.Java:createSortingCollector(388)) - Map output collector class = org.apache.Hadoop.mapred.MapTask$MapOutputBuffer

2014-12-16 15:34:03,340 INFO [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.Java:setEquator(1181)) - (EQUATOR) 0 kvi 26214396(104857584)

2014-12-16 15:34:03,341 INFO [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.Java:init(975)) - mapreduce.task.io.sort.mb: 100

2014-12-16 15:34:03,341 INFO [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.Java:init(976)) - soft limit at 83886080

2014-12-16 15:34:03,341 INFO [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.Java:init(977)) - bufstart = 0; bufvoid = 104857600

2014-12-16 15:34:03,341 INFO [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.Java:init(978)) - kvstart = 26214396; length = 6553600

2014-12-16 15:34:03,708 INFO [main] mapreduce.Job (Job.Java:monitorAndPrintJob(1355)) - Job job_local1764589720_0001 running in uber mode : false

2014-12-16 15:34:03,710 INFO [main] mapreduce.Job (Job.Java:monitorAndPrintJob(1362)) - map 0% reduce 0%

2014-12-16 15:34:04,121 INFO [LocalJobRunner Map Task Executor #0] mapred.LocalJobRunner (LocalJobRunner.Java:statusUpdate(591)) -

2014-12-16 15:34:04,128 INFO [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.Java:flush(1435)) - Starting flush of map output

2014-12-16 15:34:04,128 INFO [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.Java:flush(1453)) - Spilling map output

2014-12-16 15:34:04,128 INFO [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.Java:flush(1454)) - bufstart = 0; bufend = 2055; bufvoid = 104857600

2014-12-16 15:34:04,128 INFO [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.Java:flush(1456)) - kvstart = 26214396(104857584); kvend = 26213684(104854736); length = 713/6553600

2014-12-16 15:34:04,179 INFO [LocalJobRunner Map Task Executor #0] mapred.MapTask (MapTask.Java:sortAndSpill(1639)) - Finished spill 0

2014-12-16 15:34:04,194 INFO [LocalJobRunner Map Task Executor #0] mapred.Task (Task.Java:done(995)) - Task:attempt_local1764589720_0001_m_000000_0 is done. And is in the process of committing

2014-12-16 15:34:04,207 INFO [LocalJobRunner Map Task Executor #0] mapred.LocalJobRunner (LocalJobRunner.Java:statusUpdate(591)) - map

2014-12-16 15:34:04,208 INFO [LocalJobRunner Map Task Executor #0] mapred.Task (Task.Java:sendDone(1115)) - Task 'attempt_local1764589720_0001_m_000000_0' done.

2014-12-16 15:34:04,208 INFO [LocalJobRunner Map Task Executor #0] mapred.LocalJobRunner (LocalJobRunner.Java:run(249)) - Finishing task: attempt_local1764589720_0001_m_000000_0

2014-12-16 15:34:04,208 INFO [Thread-4] mapred.LocalJobRunner (LocalJobRunner.Java:runTasks(456)) - map task executor complete.

2014-12-16 15:34:04,211 INFO [Thread-4] mapred.LocalJobRunner (LocalJobRunner.Java:runTasks(448)) - Waiting for reduce tasks

2014-12-16 15:34:04,211 INFO [pool-6-thread-1] mapred.LocalJobRunner (LocalJobRunner.Java:run(302)) - Starting task: attempt_local1764589720_0001_r_000000_0

2014-12-16 15:34:04,221 INFO [pool-6-thread-1] util.ProcfsBasedProcessTree (ProcfsBasedProcessTree.Java:isAvailable(129)) - ProcfsBasedProcessTree currently is supported only on Linux.

2014-12-16 15:34:04,478 INFO [pool-6-thread-1] mapred.Task (Task.Java:initialize(581)) - Using ResourceCalculatorProcessTree : org.apache.Hadoop.yarn.util.WindowsBasedProcessTree@36154615

2014-12-16 15:34:04,483 INFO [pool-6-thread-1] mapred.ReduceTask (ReduceTask.Java:run(362)) - Using ShuffleConsumerPlugin: org.apache.Hadoop.mapreduce.task.reduce.Shuffle@e2b02a3

2014-12-16 15:34:04,500 INFO [pool-6-thread-1] reduce.MergeManagerImpl (MergeManagerImpl.Java:(193)) - MergerManager: memoryLimit=949983616, maxSingleShuffleLimit=237495904, mergeThreshold=626989184, ioSortFactor=10, memToMemMergeOutputsThreshold=10

2014-12-16 15:34:04,503 INFO [EventFetcher for fetching Map Completion Events] reduce.EventFetcher (EventFetcher.Java:run(61)) - attempt_local1764589720_0001_r_000000_0 Thread started: EventFetcher for fetching Map Completion Events

2014-12-16 15:34:04,543 INFO [localfetcher#1] reduce.LocalFetcher (LocalFetcher.Java:copyMapOutput(140)) - localfetcher#1 about to shuffle output of map attempt_local1764589720_0001_m_000000_0 decomp: 1832 len: 1836 to MEMORY

2014-12-16 15:34:04,548 INFO [localfetcher#1] reduce.InMemoryMapOutput (InMemoryMapOutput.Java:shuffle(100)) - Read 1832 bytes from map-output for attempt_local1764589720_0001_m_000000_0

2014-12-16 15:34:04,553 INFO [localfetcher#1] reduce.MergeManagerImpl (MergeManagerImpl.Java:closeInMemoryFile(307)) - closeInMemoryFile -> map-output of size: 1832, inMemoryMapOutputs.size() -> 1, commitMemory -> 0, usedMemory ->1832

2014-12-16 15:34:04,564 INFO [EventFetcher for fetching Map Completion Events] reduce.EventFetcher (EventFetcher.Java:run(76)) - EventFetcher is interrupted.. Returning

2014-12-16 15:34:04,566 INFO [pool-6-thread-1] mapred.LocalJobRunner (LocalJobRunner.Java:statusUpdate(591)) - 1 / 1 copied.

2014-12-16 15:34:04,566 INFO [pool-6-thread-1] reduce.MergeManagerImpl (MergeManagerImpl.Java:finalMerge(667)) - finalMerge called with 1 in-memory map-outputs and 0 on-disk map-outputs

2014-12-16 15:34:04,585 INFO [pool-6-thread-1] mapred.Merger (Merger.Java:merge(589)) - Merging 1 sorted segments

2014-12-16 15:34:04,585 INFO [pool-6-thread-1] mapred.Merger (Merger.Java:merge(688)) - Down to the last merge-pass, with 1 segments left of total size: 1823 bytes

2014-12-16 15:34:04,605 INFO [pool-6-thread-1] reduce.MergeManagerImpl (MergeManagerImpl.Java:finalMerge(742)) - Merged 1 segments, 1832 bytes to disk to satisfy reduce memory limit

2014-12-16 15:34:04,605 INFO [pool-6-thread-1] reduce.MergeManagerImpl (MergeManagerImpl.Java:finalMerge(772)) - Merging 1 files, 1836 bytes from disk

2014-12-16 15:34:04,606 INFO [pool-6-thread-1] reduce.MergeManagerImpl (MergeManagerImpl.Java:finalMerge(787)) - Merging 0 segments, 0 bytes from memory into reduce

2014-12-16 15:34:04,607 INFO [pool-6-thread-1] mapred.Merger (Merger.Java:merge(589)) - Merging 1 sorted segments

2014-12-16 15:34:04,608 INFO [pool-6-thread-1] mapred.Merger (Merger.Java:merge(688)) - Down to the last merge-pass, with 1 segments left of total size: 1823 bytes

2014-12-16 15:34:04,608 INFO [pool-6-thread-1] mapred.LocalJobRunner (LocalJobRunner.Java:statusUpdate(591)) - 1 / 1 copied.

2014-12-16 15:34:04,643 INFO [pool-6-thread-1] Configuration.deprecation (Configuration.Java:warnOnceIfDeprecated(996)) - mapred.skip.on is deprecated. Instead, use mapreduce.job.skiprecords

2014-12-16 15:34:04,714 INFO [main] mapreduce.Job (Job.Java:monitorAndPrintJob(1362)) - map 100% reduce 0%

2014-12-16 15:34:04,842 INFO [pool-6-thread-1] mapred.Task (Task.Java:done(995)) - Task:attempt_local1764589720_0001_r_000000_0 is done. And is in the process of committing

2014-12-16 15:34:04,850 INFO [pool-6-thread-1] mapred.LocalJobRunner (LocalJobRunner.Java:statusUpdate(591)) - 1 / 1 copied.

2014-12-16 15:34:04,850 INFO [pool-6-thread-1] mapred.Task (Task.Java:commit(1156)) - Task attempt_local1764589720_0001_r_000000_0 is allowed to commit now

2014-12-16 15:34:04,881 INFO [pool-6-thread-1] output.FileOutputCommitter (FileOutputCommitter.Java:commitTask(439)) - Saved output of task 'attempt_local1764589720_0001_r_000000_0' to hdfs://192.168.52.128:9000/data/output/_temporary/0/task_local1764589720_0001_r_000000

2014-12-16 15:34:04,884 INFO [pool-6-thread-1] mapred.LocalJobRunner (LocalJobRunner.Java:statusUpdate(591)) - reduce > reduce

2014-12-16 15:34:04,884 INFO [pool-6-thread-1] mapred.Task (Task.Java:sendDone(1115)) - Task 'attempt_local1764589720_0001_r_000000_0' done.

2014-12-16 15:34:04,885 INFO [pool-6-thread-1] mapred.LocalJobRunner (LocalJobRunner.Java:run(325)) - Finishing task: attempt_local1764589720_0001_r_000000_0

2014-12-16 15:34:04,885 INFO [Thread-4] mapred.LocalJobRunner (LocalJobRunner.Java:runTasks(456)) - reduce task executor complete.

2014-12-16 15:34:05,714 INFO [main] mapreduce.Job (Job.Java:monitorAndPrintJob(1362)) - map 100% reduce 100%

2014-12-16 15:34:05,714 INFO [main] mapreduce.Job (Job.Java:monitorAndPrintJob(1373)) - Job job_local1764589720_0001 completed successfully

2014-12-16 15:34:05,733 INFO [main] mapreduce.Job (Job.Java:monitorAndPrintJob(1380)) - Counters: 38

File System Counters

FILE: Number of bytes read=34542

FILE: Number of bytes written=470650

FILE: Number of read operations=0

FILE: Number of large read operations=0

FILE: Number of write operations=0

HDFS: Number of bytes read=2732

HDFS: Number of bytes written=1306

HDFS: Number of read operations=15

HDFS: Number of large read operations=0

HDFS: Number of write operations=4

Map-Reduce Framework

Map input records=31

Map output records=179

Map output bytes=2055

Map output materialized bytes=1836

Input split bytes=113

Combine input records=179

Combine output records=131

Reduce input groups=131

Reduce shuffle bytes=1836

Reduce input records=131

Reduce output records=131

Spilled Records=262

Shuffled Maps =1

Failed Shuffles=0

Merged Map outputs=1

GC time elapsed (ms)=13

CPU time spent (ms)=0

Physical memory (bytes) snapshot=0

Virtual memory (bytes) snapshot=0

Total committed heap usage (bytes)=440664064

Shuffle Errors

BAD_ID=0

CONNECTION=0

IO_ERROR=0

WRONG_LENGTH=0

WRONG_MAP=0

WRONG_REDUCE=0

File Input Format Counters

Bytes Read=1366

File Output Format Counters

Bytes Written=1306

原博客地址: http://blog.itpub.net/26230597/viewspace-1385602/

原作者:黄杉 (mchDBA)

本文地址:http://www.cuug.com.cn/zixun/12239799366.html 转载请注明!


在线预约 抢先报名 获取课程排期

Oracle培训机构

金牌讲师<>

冉乃纲-老师CUUG金牌讲师
冉老师 CUUG金牌讲师 Oracle及RedHat高级讲师、Unix/Linux 资深专家...[详细了解老师]

免费咨询上课流程 客服在线中

陈卫星-老师CUUG金牌讲师
陈老师 CUUG金牌讲师 精通Oracle管理、备份恢复、性能优化 11年Ora...[详细了解老师]

免费咨询上课流程 客服在线中

选学校如何选择适合自己的学校

CUUG -CHINA UNIX USER GROUP,是国际UNIX组织UNIFORUM的中国代表,是国内悠久的专业UNIX培训机构,被誉为中国UNIX 的摇篮。多年来,以提高教学质量为本,强调素质教育,积极引进、消化国外的新技术,有效的结合中国....[详情]

一站式服务(从入学到就业一帮到底)

入学

学习

就业

实操

食宿
地址:北京市海淀区田村山南路35号院17号楼
课程咨询:010-59426307 010-59426319 400-0909-964
企业服务:137 1818 8639(陈经理)
部分信息来源于网络,如有错误请联系指正!
版权所有@北京神脑资讯技术有限公司 (CUUG,中国UNIX用户协会) Copyright 2016 ALL Rights Reserved 京ICP备11008061号-1