Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
217286b4
F
flink
项目概览
doujutun3207
/
flink
与 Fork 源项目一致
从无法访问的项目Fork
通知
24
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,发现更多精彩内容 >>
提交
217286b4
编写于
6月 13, 2013
作者:
S
StephanEwen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor cleanup and corrections in API classes.
上级
abed9bed
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
32 addition
and
12 deletion
+32
-12
nephele/nephele-common/src/main/java/eu/stratosphere/nephele/configuration/Configuration.java
.../eu/stratosphere/nephele/configuration/Configuration.java
+1
-1
pact/pact-common/src/main/java/eu/stratosphere/pact/common/stubs/CoGroupStub.java
...n/java/eu/stratosphere/pact/common/stubs/CoGroupStub.java
+3
-3
pact/pact-common/src/main/java/eu/stratosphere/pact/common/stubs/CrossStub.java
...ain/java/eu/stratosphere/pact/common/stubs/CrossStub.java
+1
-1
pact/pact-common/src/main/java/eu/stratosphere/pact/common/stubs/MapStub.java
.../main/java/eu/stratosphere/pact/common/stubs/MapStub.java
+0
-2
pact/pact-common/src/main/java/eu/stratosphere/pact/common/util/InstantiationUtil.java
...a/eu/stratosphere/pact/common/util/InstantiationUtil.java
+22
-0
pact/pact-common/src/main/java/eu/stratosphere/pact/generic/stub/GenericCoGrouper.java
...a/eu/stratosphere/pact/generic/stub/GenericCoGrouper.java
+3
-3
pact/pact-common/src/main/java/eu/stratosphere/pact/generic/stub/GenericCrosser.java
...ava/eu/stratosphere/pact/generic/stub/GenericCrosser.java
+1
-1
pact/pact-runtime/src/main/java/eu/stratosphere/pact/runtime/task/util/TaskConfig.java
...va/eu/stratosphere/pact/runtime/task/util/TaskConfig.java
+1
-1
未找到文件。
nephele/nephele-common/src/main/java/eu/stratosphere/nephele/configuration/Configuration.java
浏览文件 @
217286b4
...
...
@@ -90,7 +90,7 @@ public class Configuration implements IOReadableWritable {
* @see #setClass(String, Class)
*/
@SuppressWarnings
(
"unchecked"
)
public
<
T
>
Class
<
T
>
getClass
(
String
key
,
Class
<?
extends
T
>
defaultValue
,
Class
<
T
>
ancestor
)
{
public
<
T
>
Class
<
T
>
getClass
(
String
key
,
Class
<?
extends
T
>
defaultValue
,
Class
<
?
super
T
>
ancestor
)
{
String
className
=
getStringInternal
(
key
);
if
(
className
==
null
)
{
return
(
Class
<
T
>)
defaultValue
;
...
...
pact/pact-common/src/main/java/eu/stratosphere/pact/common/stubs/CoGroupStub.java
浏览文件 @
217286b4
...
...
@@ -48,7 +48,7 @@ public abstract class CoGroupStub extends AbstractStub implements GenericCoGroup
* decide whether to retry the task execution.
*/
@Override
public
abstract
void
coGroup
(
Iterator
<
PactRecord
>
records1
,
Iterator
<
PactRecord
>
records2
,
Collector
<
PactRecord
>
out
);
public
abstract
void
coGroup
(
Iterator
<
PactRecord
>
records1
,
Iterator
<
PactRecord
>
records2
,
Collector
<
PactRecord
>
out
)
throws
Exception
;
/**
* This method must be overridden by CoGoup UDFs that want to make use of the combining feature
...
...
@@ -64,7 +64,7 @@ public abstract class CoGroupStub extends AbstractStub implements GenericCoGroup
* decide whether to retry the combiner execution.
*/
@Override
public
void
combineFirst
(
Iterator
<
PactRecord
>
records
,
Collector
<
PactRecord
>
out
)
{
public
void
combineFirst
(
Iterator
<
PactRecord
>
records
,
Collector
<
PactRecord
>
out
)
throws
Exception
{
throw
new
UnsupportedOperationException
();
}
...
...
@@ -82,7 +82,7 @@ public abstract class CoGroupStub extends AbstractStub implements GenericCoGroup
* decide whether to retry the combiner execution.
*/
@Override
public
void
combineSecond
(
Iterator
<
PactRecord
>
records
,
Collector
<
PactRecord
>
out
)
{
public
void
combineSecond
(
Iterator
<
PactRecord
>
records
,
Collector
<
PactRecord
>
out
)
throws
Exception
{
throw
new
UnsupportedOperationException
();
}
}
pact/pact-common/src/main/java/eu/stratosphere/pact/common/stubs/CrossStub.java
浏览文件 @
217286b4
...
...
@@ -44,5 +44,5 @@ public abstract class CrossStub extends AbstractStub implements GenericCrosser<P
* decide whether to retry the task execution.
*/
@Override
public
abstract
void
cross
(
PactRecord
record1
,
PactRecord
record2
,
Collector
<
PactRecord
>
out
);
public
abstract
void
cross
(
PactRecord
record1
,
PactRecord
record2
,
Collector
<
PactRecord
>
out
)
throws
Exception
;
}
pact/pact-common/src/main/java/eu/stratosphere/pact/common/stubs/MapStub.java
浏览文件 @
217286b4
...
...
@@ -25,8 +25,6 @@ import eu.stratosphere.pact.generic.stub.GenericMapper;
* For details on the Map PACT read the documentation of the PACT programming model.
* <p>
* For a mapper implementation, the <code>map()</code> method must be implemented.
*
* @author Fabian Hueske
*/
public
abstract
class
MapStub
extends
AbstractStub
implements
GenericMapper
<
PactRecord
,
PactRecord
>
{
...
...
pact/pact-common/src/main/java/eu/stratosphere/pact/common/util/InstantiationUtil.java
浏览文件 @
217286b4
...
...
@@ -15,9 +15,14 @@
package
eu.stratosphere.pact.common.util
;
import
java.io.ByteArrayInputStream
;
import
java.io.IOException
;
import
java.io.ObjectInputStream
;
import
java.lang.reflect.Constructor
;
import
java.lang.reflect.Modifier
;
import
eu.stratosphere.nephele.configuration.Configuration
;
/**
* Utility class to create instances from class objects and checking failure reasons.
...
...
@@ -164,6 +169,23 @@ public class InstantiationUtil {
}
}
public
static
Object
readObjectFormConfig
(
Configuration
config
,
String
key
)
throws
IOException
,
ClassNotFoundException
{
byte
[]
bytes
=
config
.
getBytes
(
key
,
null
);
if
(
bytes
==
null
)
{
return
null
;
}
ObjectInputStream
oois
=
null
;
try
{
oois
=
new
ObjectInputStream
(
new
ByteArrayInputStream
(
bytes
));
return
oois
.
readObject
();
}
finally
{
if
(
oois
!=
null
)
{
oois
.
close
();
}
}
}
// --------------------------------------------------------------------------------------------
/**
...
...
pact/pact-common/src/main/java/eu/stratosphere/pact/generic/stub/GenericCoGrouper.java
浏览文件 @
217286b4
...
...
@@ -22,9 +22,9 @@ import eu.stratosphere.pact.common.stubs.Stub;
public
interface
GenericCoGrouper
<
V1
,
V2
,
O
>
extends
Stub
{
public
abstract
void
coGroup
(
Iterator
<
V1
>
records1
,
Iterator
<
V2
>
records2
,
Collector
<
O
>
out
);
public
abstract
void
coGroup
(
Iterator
<
V1
>
records1
,
Iterator
<
V2
>
records2
,
Collector
<
O
>
out
)
throws
Exception
;
public
abstract
void
combineFirst
(
Iterator
<
V1
>
records
,
Collector
<
V1
>
out
)
;
public
void
combineFirst
(
Iterator
<
V1
>
records
,
Collector
<
V1
>
out
)
throws
Exception
;
public
abstract
void
combineSecond
(
Iterator
<
V2
>
records
,
Collector
<
V2
>
out
)
;
public
void
combineSecond
(
Iterator
<
V2
>
records
,
Collector
<
V2
>
out
)
throws
Exception
;
}
pact/pact-common/src/main/java/eu/stratosphere/pact/generic/stub/GenericCrosser.java
浏览文件 @
217286b4
...
...
@@ -21,5 +21,5 @@ import eu.stratosphere.pact.common.stubs.Stub;
public
interface
GenericCrosser
<
V1
,
V2
,
O
>
extends
Stub
{
void
cross
(
V1
record1
,
V2
record2
,
Collector
<
O
>
out
);
void
cross
(
V1
record1
,
V2
record2
,
Collector
<
O
>
out
)
throws
Exception
;
}
pact/pact-runtime/src/main/java/eu/stratosphere/pact/runtime/task/util/TaskConfig.java
浏览文件 @
217286b4
...
...
@@ -1083,7 +1083,7 @@ public class TaskConfig {
}
@Override
public
<
T
>
Class
<
T
>
getClass
(
String
key
,
Class
<?
extends
T
>
defaultValue
,
Class
<
T
>
ancestor
)
{
public
<
T
>
Class
<
T
>
getClass
(
String
key
,
Class
<?
extends
T
>
defaultValue
,
Class
<
?
super
T
>
ancestor
)
{
return
this
.
backingConfig
.
getClass
(
this
.
prefix
+
key
,
defaultValue
,
ancestor
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录