Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Forever310
flink
提交
1e7d0bbc
F
flink
项目概览
Forever310
/
flink
与 Fork 源项目一致
从无法访问的项目Fork
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
flink
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1e7d0bbc
编写于
6月 10, 2015
作者:
U
Ufuk Celebi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-2195] Configure Configurable Hadoop InputFormats
This closes #827.
上级
32ddc9e6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
6 deletion
+10
-6
flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapreduce/HadoopInputFormatBase.java
...link/api/java/hadoop/mapreduce/HadoopInputFormatBase.java
+10
-6
未找到文件。
flink-java/src/main/java/org/apache/flink/api/java/hadoop/mapreduce/HadoopInputFormatBase.java
浏览文件 @
1e7d0bbc
...
...
@@ -16,7 +16,6 @@
* limitations under the License.
*/
package
org.apache.flink.api.java.hadoop.mapreduce
;
import
org.apache.flink.api.common.io.FileInputFormat.FileBaseStatistics
;
...
...
@@ -30,6 +29,7 @@ import org.apache.flink.core.fs.FileStatus;
import
org.apache.flink.core.fs.FileSystem
;
import
org.apache.flink.core.fs.Path
;
import
org.apache.flink.core.io.InputSplitAssigner
;
import
org.apache.hadoop.conf.Configurable
;
import
org.apache.hadoop.mapreduce.Job
;
import
org.apache.hadoop.mapreduce.JobContext
;
import
org.apache.hadoop.mapreduce.JobID
;
...
...
@@ -46,6 +46,8 @@ import java.io.ObjectOutputStream;
import
java.util.ArrayList
;
import
java.util.List
;
import
static
com
.
google
.
common
.
base
.
Preconditions
.
checkNotNull
;
public
abstract
class
HadoopInputFormatBase
<
K
,
V
,
T
>
implements
InputFormat
<
T
,
HadoopInputSplit
>
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -63,10 +65,10 @@ public abstract class HadoopInputFormatBase<K, V, T> implements InputFormat<T, H
public
HadoopInputFormatBase
(
org
.
apache
.
hadoop
.
mapreduce
.
InputFormat
<
K
,
V
>
mapreduceInputFormat
,
Class
<
K
>
key
,
Class
<
V
>
value
,
Job
job
)
{
super
();
this
.
mapreduceInputFormat
=
mapreduceInputFormat
;
this
.
keyClass
=
key
;
this
.
valueClass
=
value
;
this
.
configuration
=
job
.
getConfiguration
();
this
.
mapreduceInputFormat
=
checkNotNull
(
mapreduceInputFormat
)
;
this
.
keyClass
=
checkNotNull
(
key
)
;
this
.
valueClass
=
checkNotNull
(
value
)
;
this
.
configuration
=
checkNotNull
(
job
)
.
getConfiguration
();
HadoopUtils
.
mergeHadoopConf
(
configuration
);
}
...
...
@@ -80,7 +82,9 @@ public abstract class HadoopInputFormatBase<K, V, T> implements InputFormat<T, H
@Override
public
void
configure
(
Configuration
parameters
)
{
// nothing to do
if
(
mapreduceInputFormat
instanceof
Configurable
)
{
((
Configurable
)
mapreduceInputFormat
).
setConf
(
configuration
);
}
}
@Override
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录