在级联中删除 outputPath

Deleting outputPath in cascading


我们一般删除mapreduce中的output路径使用如下代码

outputPath.getFileSystem(conf).delete(outputPath,true);

我的问题是,我们可以在级联中做同样的事情吗?如果是,请建议我这样做的步骤。
谢谢:)

如果打算为 mapreduce 的下一个 运行 重用输出目录,则将接收器 Tap 的 属性 设置为 SinkMode.REPLACE。它删除 hdfs 输出 DIR 并且 mapreduce 作业不会在 运行s.

之间失败
Tap sink = new Hfs(<your scheme>,<your output hdfs dir>,SinkMode.REPLACE)