Example usage for org.apache.hadoop.mapreduce OutputCommitter OutputCommitter

List of usage examples for org.apache.hadoop.mapreduce OutputCommitter OutputCommitter

Introduction

In this page you can find the example usage for org.apache.hadoop.mapreduce OutputCommitter OutputCommitter.

Prototype

OutputCommitter

Source Link

Usage

From source file:org.bigsolr.hadoop.SolrOutputFormat.java

License:Apache License

@Override
public OutputCommitter getOutputCommitter(TaskAttemptContext context) throws IOException, InterruptedException {

    log.info("SolrOutputFormat -> getOutputCommitter");
    //return an empty outputcommitter
    return new OutputCommitter() {
        @Override/*from w w w .j  av  a2 s . c  o m*/
        public void setupTask(TaskAttemptContext arg0) throws IOException {
        }

        @Override
        public void setupJob(JobContext arg0) throws IOException {
        }

        @Override
        public boolean needsTaskCommit(TaskAttemptContext arg0) throws IOException {
            return false;
        }

        @Override
        public void commitTask(TaskAttemptContext arg0) throws IOException {
        }

        @Override
        public void abortTask(TaskAttemptContext arg0) throws IOException {
        }
    };
}