flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From StephanEwen <...@git.apache.org>
Subject [GitHub] flink pull request #4285: [FLINK-7118] [hadoop] Remove hadoop1.x code in Had...
Date Tue, 18 Jul 2017 14:32:20 GMT
Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4285#discussion_r127992635
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapred/HadoopOutputFormatBase.java
---
    @@ -126,18 +128,18 @@ public void open(int taskNumber, int numTasks) throws IOException
{
     			this.jobConf.setInt("mapreduce.task.partition", taskNumber + 1);
     
     			try {
    -				this.context = HadoopUtils.instantiateTaskAttemptContext(this.jobConf, taskAttemptID);
    +				this.context = new TaskAttemptContextImpl(this.jobConf, taskAttemptID);
     			} catch (Exception e) {
    -				throw new RuntimeException(e);
    +				throw new IOException("Could not create instance of TaskAttemptContext.", e);
     			}
     
     			this.outputCommitter = this.jobConf.getOutputCommitter();
     
     			JobContext jobContext;
     			try {
    -				jobContext = HadoopUtils.instantiateJobContext(this.jobConf, new JobID());
    +				jobContext = new JobContextImpl(this.jobConf, new JobID());
     			} catch (Exception e) {
    -				throw new RuntimeException(e);
    +				throw new IOException("Could not create instance of JobContext.", e);
    --- End diff --
    
    Same as above...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message