Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
d3df8dca
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,发现更多精彩内容 >>
提交
d3df8dca
编写于
5月 15, 2014
作者:
F
Fabian Hueske
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improved Java examples
上级
a6d188cd
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
22 addition
and
9 deletion
+22
-9
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/clustering/KMeans.java
.../java/eu/stratosphere/example/java/clustering/KMeans.java
+4
-1
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/graph/ConnectedComponents.java
.../stratosphere/example/java/graph/ConnectedComponents.java
+9
-5
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/graph/EnumTrianglesBasic.java
...u/stratosphere/example/java/graph/EnumTrianglesBasic.java
+1
-0
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/graph/EnumTrianglesOpt.java
.../eu/stratosphere/example/java/graph/EnumTrianglesOpt.java
+1
-0
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/graph/PageRankBasic.java
...ava/eu/stratosphere/example/java/graph/PageRankBasic.java
+4
-2
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/relational/WebLogAnalysis.java
.../stratosphere/example/java/relational/WebLogAnalysis.java
+2
-0
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/wordcount/WordCount.java
...ava/eu/stratosphere/example/java/wordcount/WordCount.java
+1
-1
未找到文件。
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/clustering/KMeans.java
浏览文件 @
d3df8dca
...
...
@@ -38,7 +38,8 @@ import eu.stratosphere.example.java.clustering.util.KMeansData;
* Subsequently, each cluster center is moved to the center (<i>mean</i>) of all points that have been assigned to it.
* The moved cluster centers are fed into the next iteration.
* The algorithm terminates after a fixed number of iterations (as in this implementation)
* or if cluster centers do not (significantly) move in an iteration.
* or if cluster centers do not (significantly) move in an iteration.<br>
* This is the Wikipedia entry for the <a href="http://en.wikipedia.org/wiki/K-means_clustering">K-Means Clustering algorithm</a>.
*
* <p>
* This implementation works on two-dimensional data points. <br>
...
...
@@ -290,6 +291,8 @@ public class KMeans {
}
else
{
System
.
out
.
println
(
"Executing K-Means example with default parameters and built-in default data."
);
System
.
out
.
println
(
" Provide parameters to read input data from files."
);
System
.
out
.
println
(
" See the documentation for the correct format of input files."
);
System
.
out
.
println
(
" We provide a data generator to create synthetic input files for this program."
);
System
.
out
.
println
(
" Usage: KMeans <points path> <centers path> <result path> <num iterations>"
);
}
}
...
...
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/graph/ConnectedComponents.java
浏览文件 @
d3df8dca
...
...
@@ -31,15 +31,18 @@ import eu.stratosphere.util.Collector;
/**
* An implementation of the connected components algorithm, using a delta iteration.
* Initially, the algorithm assigns each vertex its own ID. After the algorithm has completed, all vertices in the
* same component will have the same id. In each step, a vertex picks the minimum of its own ID and its
* neighbors' IDs, as its new ID.
*
* <p>
* Initially, the algorithm assigns each vertex an unique ID. In each step, a vertex picks the minimum of its own ID and its
* neighbors' IDs, as its new ID and tells its neighbors about its new ID. After the algorithm has completed, all vertices in the
* same component will have the same ID.
*
* <p>
* A vertex whose component did not change needs not propagate its information in the next step. Because of that,
* A vertex whose component
ID
did not change needs not propagate its information in the next step. Because of that,
* the algorithm is easily expressible via a delta iteration. We here model the solution set as the vertices with
* their current component ids, and the workset as the changed vertices. Because we see all vertices initially as
* changed, the initial workset and the initial solution set are identical. Also, the delta to the solution set
* is consequently also the next workset.
* is consequently also the next workset.
<br>
*
* <p>
* Input files are plain text files and must be formatted as follows:
...
...
@@ -180,6 +183,7 @@ public class ConnectedComponents implements ProgramDescription {
}
else
{
System
.
out
.
println
(
"Executing Connected Components example with default parameters and built-in default data."
);
System
.
out
.
println
(
" Provide parameters to read input data from files."
);
System
.
out
.
println
(
" See the documentation for the correct format of input files."
);
System
.
out
.
println
(
" Usage: ConnectedComponents <vertices path> <edges path> <result path> <max number of iterations>"
);
}
}
...
...
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/graph/EnumTrianglesBasic.java
浏览文件 @
d3df8dca
...
...
@@ -198,6 +198,7 @@ public class EnumTrianglesBasic {
}
else
{
System
.
out
.
println
(
"Executing Enum Triangles Basic example with built-in default data."
);
System
.
out
.
println
(
" Provide parameters to read input data from files."
);
System
.
out
.
println
(
" See the documentation for the correct format of input files."
);
System
.
out
.
println
(
" Usage: EnumTriangleBasic <edge path> <result path>"
);
}
}
...
...
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/graph/EnumTrianglesOpt.java
浏览文件 @
d3df8dca
...
...
@@ -322,6 +322,7 @@ public class EnumTrianglesOpt {
}
else
{
System
.
out
.
println
(
"Executing Enum Triangles Opt example with built-in default data."
);
System
.
out
.
println
(
" Provide parameters to read input data from files."
);
System
.
out
.
println
(
" See the documentation for the correct format of input files."
);
System
.
out
.
println
(
" Usage: EnumTriangleBasic <edge path> <result path>"
);
}
}
...
...
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/graph/PageRankBasic.java
浏览文件 @
d3df8dca
...
...
@@ -31,7 +31,7 @@ import eu.stratosphere.example.java.graph.util.PageRankData;
import
eu.stratosphere.util.Collector
;
/**
* A basic implementation of the
page r
ank algorithm using a bulk iteration.
* A basic implementation of the
Page R
ank algorithm using a bulk iteration.
*
* <p>
* This implementation requires a set of pages (vertices) with associated ranks and a set
...
...
@@ -39,7 +39,8 @@ import eu.stratosphere.util.Collector;
* In each iteration, the rank of every page is evenly distributed to all pages it points to.
* Each page collects the partial ranks of all pages that point to it, sums them up, and applies a dampening factor to the sum.
* The result is the new rank of the page. A new iteration is started with the new ranks of all pages.
* This implementation terminates after a fixed number of iterations.
* This implementation terminates after a fixed number of iterations.<br>
* This is the Wikipedia entry for the <a href="http://en.wikipedia.org/wiki/Page_rank">Page Rank algorithm</a>.
*
* <p>
* Input files are plain text files and must be formatted as follows:
...
...
@@ -216,6 +217,7 @@ public class PageRankBasic {
}
else
{
System
.
out
.
println
(
"Executing PageRank Basic example with default parameters and built-in default data."
);
System
.
out
.
println
(
" Provide parameters to read input data from files."
);
System
.
out
.
println
(
" See the documentation for the correct format of input files."
);
System
.
out
.
println
(
" Usage: PageRankBasic <vertex with initial rank input> <edges path> <output path> <num vertices> <num iterations>"
);
numVertices
=
PageRankData
.
getNumberOfPages
();
...
...
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/relational/WebLogAnalysis.java
浏览文件 @
d3df8dca
...
...
@@ -275,6 +275,8 @@ public class WebLogAnalysis {
}
else
{
System
.
out
.
println
(
"Executing WebLog Analysis example with built-in default data."
);
System
.
out
.
println
(
" Provide parameters to read input data from files."
);
System
.
out
.
println
(
" See the documentation for the correct format of input files."
);
System
.
out
.
println
(
" We provide a data generator to create synthetic input files for this program."
);
System
.
out
.
println
(
" Usage: WebLogAnalysis <documents path> <ranks path> <visits path> <result path>"
);
}
}
...
...
stratosphere-examples/stratosphere-java-examples/src/main/java/eu/stratosphere/example/java/wordcount/WordCount.java
浏览文件 @
d3df8dca
...
...
@@ -27,7 +27,7 @@ import eu.stratosphere.util.Collector;
* over text files.
*
* <p>
* The input is
plain text file
s.
* The input is
a plain text file with lines separated by newline character
s.
*
* <p>
* This example shows how to:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录