hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ioan Eugen Stan <stan.ieu...@gmail.com>
Subject Re: how to overwrite output in HDFS?
Date Wed, 04 Apr 2012 09:52:58 GMT
Pe 03.04.2012 12:34, Fang Xin a scris:
> Hi, all
>
> I'm writing my own map-reduce code using eclipse with hadoop plug-in.
> I've specified input and output directories in the project property.
> (two folders, namely input and output)
>
> My problem is that each time when I do some modification and try to
> run it again, i have to manually delete the previous output in HDFS,
> otherwise there will be error.
> Can anyone kindly suggest how to just simply overwrite the result?
>
> Best regards,
> Xin

Try  HadoopUtil.delete(conf, outputPath); where outputPath is a Path( 
file or directory)

-- 
Ioan Eugen Stan
http://ieugen.blogspot.com

Mime
View raw message