Skip to content

Conversation

@chenliang613
Copy link
Contributor

The names of the example JARs under build-target/examples have some confusion, the version number might stop users from submitting examples to incompatible versions of Flink
Propose to name the file examples/ConnectedComponents.jar rather than examples/flink-java-examples-0.10-SNAPSHOT-ConnectedComponents.jar.
The result as below:
build-target
--examples
--ConnectedComponents.jar
--EnumTrianglesBasic.jar
--EnumTrianglesOpt.jar
......

@chenliang613
Copy link
Contributor Author

The implementation method may not be the best solution. Actually i tried a couple of solutions(for example:use finalName tag to replace classifier),but because there having many dependency with java examples internally, "rename depended Jars" would generate too much influence for other programs, so selecting such change has least influence on the system :)

@StephanEwen
Copy link
Contributor

Looks nice.

Can you help me quickly? I would like to understand why the internal maven dependencies on the Java examples have problems when you use the "finalName" classifier?

@chenliang613
Copy link
Contributor Author

@StephanEwen
Just as maillist the last message mentioned: http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/jira-FLINK-2493-Simplify-names-of-example-program-JARs-td7495.html.

After using the tag of "finalName" to replace classifier,
flink-scala-examples/flink-streaming-examples/flink-storm-compatibility-example" can't correctly unpack "flink-java-examples-0.10-SNAPSHOT.jar", have the below error:

[ERROR] /Users/chenliang/flink/flink-examples/flink-scala-examples/src/main/scala/org/apache/flink/examples/scala/clustering/KMeans.scala:148: error: not found: value KMeansData
[ERROR] val points = KMeansData.POINTS map {
[ERROR] ^
[WARNING] /Users/chenliang/flink/flink-examples/flink-scala-examples/src/main/scala/org/apache/flink/examples/scala/clustering/KMeans.scala:161: warning: Type org.apache.flink.examples.scala.clustering.KMeans.Centroid is no POJO, has immutable fields: value y, value x.
[WARNING] .map { x => new Centroid(x._1, x._2, x._3)}
[WARNING] ^
[ERROR] /Users/chenliang/flink/flink-examples/flink-scala-examples/src/main/scala/org/apache/flink/examples/scala/clustering/KMeans.scala:164: error: not found: value KMeansData
[ERROR] val centroids = KMeansData.CENTROIDS map {

@StephanEwen
Copy link
Contributor

Strange, the dependency here should not be dependent on the individual program jars, but on the aggregate flink-java-examples-0.10-SNAPSHOT.jar, which is not affected by the change...

Anyways, as long as your version works, let's use it :-)

@chenliang613
Copy link
Contributor Author

And when i worked the issue, i found that not only the three examples have dependency with flink-java-examples-0.10-SNAPSHOT.jar. Many other places also have dependency, for example:

flink-staging/flink-fs-tests/src/test/java/org.apache.flink.tachyon/HDFSTest

row 45-28:
/**

  • This test should logically be located in the 'flink-runtime' tests. However, this project
  • has already all dependencies required (flink-java-examples). Also, the ParallelismOneExecEnv is here.
    */

@chenliang613
Copy link
Contributor Author

@StephanEwen i found that many other documents(docs/apis\cli.md, examples.md etc) need update correspondingly, let me update it together, and update the commit.

@fhueske
Copy link
Contributor

fhueske commented Sep 9, 2015

@chenliang613, thanks for the PR!
I'll check it and merge it if everything is fine.

@asfgit asfgit closed this in bbddda7 Sep 9, 2015
nikste pushed a commit to nikste/flink that referenced this pull request Sep 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants