Example usage for org.apache.hadoop.mapred OutputCommitter needsTaskCommit

List of usage examples for org.apache.hadoop.mapred OutputCommitter needsTaskCommit

Introduction

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

Prototype

@Override
public final boolean needsTaskCommit(org.apache.hadoop.mapreduce.TaskAttemptContext taskContext)
        throws IOException 

Source Link

Document

This method implements the new interface by calling the old method.

Usage

From source file:org.apache.ignite.internal.processors.hadoop.impl.v1.HadoopV1OutputCollector.java

License:Apache License

/**
 * Commit task.//from www . j a  v a 2s. co m
 *
 * @throws IOException In failed.
 */
public void commit() throws IOException {
    if (writer != null) {
        OutputCommitter outputCommitter = jobConf.getOutputCommitter();

        TaskAttemptContext taskCtx = new TaskAttemptContextImpl(jobConf, attempt);

        if (outputCommitter.needsTaskCommit(taskCtx))
            outputCommitter.commitTask(taskCtx);
    }
}