草庐IT

MULTIPLEOUTPUTS

全部标签

Hadoop MultipleOutputFormat 支持 org.apache.hadoop.mapreduce.Job

我是Hadoop的新手!现在我正在尝试将MultipleOutputFormat与hadoop2.2.0一起使用,但它们似乎只适用于已弃用的“JobConf”,而后者又使用已弃用的Mapper和Reducer(org.apache.hadoop.mapred.Reducer)等。关于如何使用新的“org.apache.hadoop.mapreduce.Job”实现多个输出功能有什么想法吗? 最佳答案 正如@JudgeMental指出的那样,您应该将MultipleOutputs与新API(mapreduce)一起使用,因为Multi

hadoop - 如何从 mapreduce 中的 reducer 输出中删除 r-00000 扩展

我能够正确重命名我的reducer输出文件,但r-00000仍然存在。我在我的reducer类中使用了MultipleOutputs。这是那个的详细信息。不确定我遗漏了什么或我还需要做什么?publicclassMyReducerextendsReducer{privateLoggerlogger=Logger.getLogger(MyReducer.class);privateMultipleOutputsmultipleOutputs;StringstrName="";publicvoidsetup(Contextcontext){logger.info("InsideReduce

当文件格式为自定义格式时,Hadoop MultipleOutputs 不会写入多个文件

我正在尝试从cassandra中读取并使用MultipleOutputsapi(Hadoop版本1.0.3)将reducers输出写入多个输出文件。在我的案例中,文件格式是扩展FileOutputFormat的自定义输出格式。我已按照MultipleOutputsapi中所示的类似方式配置了我的作业.但是,当我运行作业时,我只得到一个名为part-r-0000的输出文件,它是文本输出格式。如果未设置job.setOutputFormatClass(),默认情况下它会将TextOutputFormat视为格式。此外,它只允许初始化两个格式类之一。它完全忽略了我在MulitpleOutpu

hadoop - 使用 MultipleOutputs 在 MapReduce 中写入 HBase

我目前有一个MapReduce作业,它使用MultipleOutputs将数据发送到多个HDFS位置。完成后,我使用HBase客户端调用(在MR之外)将一些相同的元素添加到几个HBase表中。使用TableOutputFormat将HBase输出添加为额外的MultipleOutputs会很好。这样,我将分发我的HBase处理。问题是,我无法让它工作。有没有人在MultipleOutputs中使用过TableOutputFormat...?有多个HBase输出?基本上,我正在设置我的收集器,就像这样....OutputcollectorhbaseCollector1=multipleO

hadoop - MultipleOutputs 具有不同的 FileOutputFormat

我正在尝试使用MultipleOutputs编写多个输出文件。然而,我希望我的FileOutputFormat具有两种不同的格式,即不同文件的Text和SequenceFileFormat。有什么办法可以实现吗? 最佳答案 引用以下链接:MultipleOutputs使用方法:addNamedOutputpublicstaticvoidaddNamedOutput(Jobjob,StringnamedOutput,ClassoutputFormatClass,ClasskeyClass,ClassvalueClass)所以基本上你的

具有 FileAlreadyExistsException 的 Reducer 中的 Hadoop MultipleOutputs

我在reducer中使用MultipleOutputs。多重输出会将文件写入名为NewIdentities的文件夹。代码如下所示:privateMultipleOutputsmos;@Overridepublicvoidreduce(TextinputKey,Iterablevalues,Contextcontext)throwsIOException,InterruptedException{......//outputtochangereportif(ischangereport.equals("TRUE")){mos.write(newText(e.getHID()),newTe

hadoop - 在 Hadoop 中使用 MultipleOutputs 时 GZIP 文件末尾损坏

我正在压缩HadoopMR作业的输出:conf.setOutputFormat(TextOutputFormat.class);TextOutputFormat.setCompressOutput(conf,true);TextOutputFormat.setOutputCompressorClass(conf,GzipCodec.class);我正在使用MultipleOutputs,例如:MultipleOutputs.addMultiNamedOutput(conf,"a",TextOutputFormat.class,Text.class,Text.class);Multipl

java - Hadoop MultipleOutputs.addNamedOutput 抛出 "cannot find symbol"

我正在使用Hadoop0.20.203.0。我想输出到两个不同的文件,所以我试图让MultipleOutputs工作。这是我的配置方法:publicstaticvoidmain(String[]args)throwsException{Configurationconf=newConfiguration();String[]otherArgs=newGenericOptionsParser(conf,args).getRemainingArgs();if(otherArgs.length!=2){System.err.println("Usage:indycascade");Syste

java - Hadoop - MultipleOutputs.write - OutofMemory - Java 堆空间

我正在编写一个处理许多文件并从每个文件创建多个文件的hadoop作业。我正在使用“MultipleOutputs”来编写它们。它适用于较少数量的文件,但我收到大量文件的以下错误。在MultipleOutputs.write(key,value,outputPath)上引发异常;我尝试增加ulimit和-Xmx但无济于事。2013-01-1513:44:05,154FATALorg.apache.hadoop.mapred.Child:Errorrunningchild:java.lang.OutOfMemoryError:Javaheapspaceatorg.apache.hadoop

hadoop - MultipleOutputs 不写入文件,我做错了什么?

我基本上是在尝试将我自己的Tab分隔值行写到3个不同的输出文件中。尽管定义和编写了不同的命名输出,但所有文件仍被命名为“part-r-*”所有代码都经过匿名和压缩驱动类如下所示://SetupjobJobjob=newJob(conf,MyDriver.class.getSimpleName());job.setJarByClass(MyJar.class);job.setOutputKeyClass(Text.class);job.setOutputValueClass(Text.class);//Setmappersandreducersjob.setMapperClass(MyM