Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
33e48032
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,发现更多精彩内容 >>
提交
33e48032
编写于
7月 14, 2014
作者:
G
Gyula Fora
提交者:
Stephan Ewen
8月 18, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[streaming] wordcount cluster testing
上级
3d6462b5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
15 deletion
+17
-15
flink-addons/flink-streaming/src/main/java/eu/stratosphere/streaming/test/wordcount/WordCountCluster.java
...ratosphere/streaming/test/wordcount/WordCountCluster.java
+3
-9
flink-addons/flink-streaming/src/main/java/eu/stratosphere/streaming/test/wordcount/WordCountLocal.java
...stratosphere/streaming/test/wordcount/WordCountLocal.java
+14
-6
未找到文件。
flink-addons/flink-streaming/src/main/java/eu/stratosphere/streaming/test/wordcount/WordCountCluster.java
浏览文件 @
33e48032
...
@@ -19,7 +19,6 @@ import org.apache.log4j.BasicConfigurator;
...
@@ -19,7 +19,6 @@ import org.apache.log4j.BasicConfigurator;
import
org.apache.log4j.Level
;
import
org.apache.log4j.Level
;
import
eu.stratosphere.client.minicluster.NepheleMiniCluster
;
import
eu.stratosphere.client.minicluster.NepheleMiniCluster
;
import
eu.stratosphere.client.program.JobWithJars
;
import
eu.stratosphere.configuration.ConfigConstants
;
import
eu.stratosphere.configuration.ConfigConstants
;
import
eu.stratosphere.configuration.Configuration
;
import
eu.stratosphere.configuration.Configuration
;
import
eu.stratosphere.nephele.client.JobClient
;
import
eu.stratosphere.nephele.client.JobClient
;
...
@@ -46,7 +45,7 @@ public class WordCountCluster {
...
@@ -46,7 +45,7 @@ public class WordCountCluster {
private
static
JobGraph
getJobGraph
()
throws
Exception
{
private
static
JobGraph
getJobGraph
()
throws
Exception
{
JobGraphBuilder
graphBuilder
=
new
JobGraphBuilder
(
"testGraph"
);
JobGraphBuilder
graphBuilder
=
new
JobGraphBuilder
(
"testGraph"
);
graphBuilder
.
setSource
(
"WordCountSource"
,
WordCount
Dummy
Source
.
class
);
graphBuilder
.
setSource
(
"WordCountSource"
,
WordCountSource
.
class
);
graphBuilder
.
setTask
(
"WordCountSplitter"
,
WordCountSplitter
.
class
,
2
);
graphBuilder
.
setTask
(
"WordCountSplitter"
,
WordCountSplitter
.
class
,
2
);
graphBuilder
.
setTask
(
"WordCountCounter"
,
WordCountCounter
.
class
,
2
);
graphBuilder
.
setTask
(
"WordCountCounter"
,
WordCountCounter
.
class
,
2
);
graphBuilder
.
setSink
(
"WordCountSink"
,
WordCountSink
.
class
);
graphBuilder
.
setSink
(
"WordCountSink"
,
WordCountSink
.
class
);
...
@@ -69,17 +68,12 @@ public class WordCountCluster {
...
@@ -69,17 +68,12 @@ public class WordCountCluster {
Configuration
configuration
=
jG
.
getJobConfiguration
();
Configuration
configuration
=
jG
.
getJobConfiguration
();
configuration
.
setString
(
ConfigConstants
.
JOB_MANAGER_IPC_ADDRESS_KEY
,
"hadoop02.ilab.sztaki.hu"
);
configuration
.
setString
(
ConfigConstants
.
JOB_MANAGER_IPC_ADDRESS_KEY
,
"hadoop02.ilab.sztaki.hu"
);
configuration
.
setInteger
(
ConfigConstants
.
JOB_MANAGER_IPC_PORT_KEY
,
jobManagerRpcPort
);
configuration
.
setInteger
(
ConfigConstants
.
JOB_MANAGER_IPC_PORT_KEY
,
jobManagerRpcPort
);
configuration
.
setInteger
(
ConfigConstants
.
TASK_MANAGER_IPC_PORT_KEY
,
6122
);
// configuration.setInteger(ConfigConstants.TASK_MANAGER_DATA_PORT_KEY, 7501);
JobClient
client
=
new
JobClient
(
jG
,
configuration
);
JobClient
client
=
new
JobClient
(
jG
,
configuration
);
//JobClient client = exec.getJobClient(jG);
ClassLoader
userClassLoader
;
client
.
submitJobAndWait
();
client
.
submitJobAndWait
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
flink-addons/flink-streaming/src/main/java/eu/stratosphere/streaming/test/wordcount/WordCountLocal.java
浏览文件 @
33e48032
...
@@ -15,12 +15,15 @@
...
@@ -15,12 +15,15 @@
package
eu.stratosphere.streaming.test.wordcount
;
package
eu.stratosphere.streaming.test.wordcount
;
import
java.net.InetSocketAddress
;
import
org.apache.hadoop.fs.FileSystem
;
import
org.apache.hadoop.fs.FileSystem
;
import
org.apache.log4j.BasicConfigurator
;
import
org.apache.log4j.BasicConfigurator
;
import
org.apache.log4j.Level
;
import
org.apache.log4j.Level
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
eu.stratosphere.client.minicluster.NepheleMiniCluster
;
import
eu.stratosphere.client.minicluster.NepheleMiniCluster
;
import
eu.stratosphere.client.program.Client
;
import
eu.stratosphere.configuration.ConfigConstants
;
import
eu.stratosphere.configuration.ConfigConstants
;
import
eu.stratosphere.configuration.Configuration
;
import
eu.stratosphere.configuration.Configuration
;
import
eu.stratosphere.nephele.client.JobClient
;
import
eu.stratosphere.nephele.client.JobClient
;
...
@@ -37,6 +40,7 @@ public class WordCountLocal {
...
@@ -37,6 +40,7 @@ public class WordCountLocal {
private
NepheleMiniCluster
executor
;
private
NepheleMiniCluster
executor
;
public
WordCountLocal
()
{
public
WordCountLocal
()
{
this
(
new
Configuration
());
this
(
new
Configuration
());
}
}
...
@@ -126,20 +130,24 @@ public class WordCountLocal {
...
@@ -126,20 +130,24 @@ public class WordCountLocal {
try
{
try
{
JobGraph
jG
=
getJobGraph
();
JobGraph
jG
=
getJobGraph
();
int
jobManagerRpcPort
=
6498
;
Configuration
configuration
=
jG
.
getJobConfiguration
();
Configuration
configuration
=
jG
.
getJobConfiguration
();
configuration
.
setString
(
ConfigConstants
.
JOB_MANAGER_IPC_ADDRESS_KEY
,
"localhost"
);
Client
client
=
new
Client
(
new
InetSocketAddress
(
"localhost"
,
6498
),
configuration
);
configuration
.
setInteger
(
ConfigConstants
.
JOB_MANAGER_IPC_PORT_KEY
,
jobManagerRpcPort
);
JobClient
client
=
new
JobClient
(
jG
,
configuration
);
// int jobManagerRpcPort = 6498;
//
// configuration.setString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY, "localhost");
// configuration.setInteger(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY, jobManagerRpcPort);
//
//
// JobClient client= new JobClient(jG, configuration);
exec
.
start
();
exec
.
start
();
//JobClient client = exec.getJobClient(jG);
//JobClient client = exec.getJobClient(jG);
client
.
run
(
null
,
jG
,
true
);
client
.
submitJobAndWait
();
//
client.submitJobAndWait();
exec
.
stop
();
exec
.
stop
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录