List of usage examples for org.apache.hadoop.mapred FileAlreadyExistsException FileAlreadyExistsException
public FileAlreadyExistsException()
From source file:co.nubetech.hiho.mapreduce.lib.output.AppendSequenceFileOutputFormat.java
License:Apache License
@Override public void checkOutputSpecs(JobContext job) throws FileAlreadyExistsException, IOException { try {//from w ww . ja v a 2 s .c o m super.checkOutputSpecs(job); } catch (FileAlreadyExistsException e) { Configuration conf = job.getConfiguration(); isAppend = conf.get(HIHOConf.IS_APPEND, "false"); if (isAppend.equalsIgnoreCase("false")) { throw new FileAlreadyExistsException(); } else { Path outDir = getOutputPath(job); if (outDir == null) { throw new InvalidJobConfException("OUTPUT directory not set."); } } } }