I agree that the quickstart docs/pom are lacking in this regard and have filed FLINK-8654 <https://issues.apache.org/jira/browse/FLINK-8654>.

On 14.02.2018 13:11, Esa Heikkinen wrote:


Hi

Thank you. It works now J

Maybe strict syntax of the “flink run” –command could be added to the sample project ?

Esa

*From:*Chesnay Schepler [mailto:ches...@apache.org]
*Sent:* Wednesday, February 14, 2018 12:27 PM
*To:* user@flink.apache.org
*Subject:* Re: Sample project does not work ?

The quickstarts do not generate separate jars, but only one that contains all the sample jobs as described here <https://ci.apache.org/projects/flink/flink-docs-master/quickstart/java_api_quickstart.html#build-project>.

To select a specific job from the jar when submitting a job you can use the "-c" switch:

|./bin/flink run -c <package>.WordCount ./<path to jar>|

Alternatively, uncomment the following section in the pom.xml, set your desired job class, and rebuild the jar.

<!-- If you want to use ./bin/flink run <quickstart jar> uncomment the following lines. This will add a Main-Class entry to the manifest file -->
                                    <!--
                                    <transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${package}.StreamingJob</mainClass>
                                        </transformer>
                                    </transformers>
                                    -->

On 14.02.2018 10:57, Esa Heikkinen wrote:

    Hi

    For example I don’t find WordCount.jar ! Or is it included in some
    other jar ?

    Esa

    *From:*Chesnay Schepler [mailto:ches...@apache.org]
    *Sent:* Wednesday, February 14, 2018 11:33 AM
    *To:* user@flink.apache.org <mailto:user@flink.apache.org>
    *Subject:* Re: Sample project does not work ?

    Hello,

    What exactly is not working? What you've shown looks fine to me.

    The following isn't due to your setup, and in this case can be
    safely ignored:

    [WARNING] com.data-artisans:flakka-slf4j_2.10:2.3-custom requires
    scala version: 2.10.4

    [WARNING] org.clapper:grizzled-slf4j_2.10:1.0.2 requires scala
    version: 2.10.3

    [WARNING] Multiple versions of scala libraries detected!



    On 14.02.2018 09:43, Esa Heikkinen wrote:

        Hi

        I have tried sample project from:
        
https://ci.apache.org/projects/flink/flink-docs-release-1.4/quickstart/scala_api_quickstart.html#maven

        Versions:

        Linux: DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"

        Maven: Apache Maven 3.3.9

        Java: openjdk version "1.8.0_151"

        OpenJDK Runtime Environment (build
        1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)

        OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

        I tried to use Maven archetypes and the quickstart script.

        After command: |mvn clean package -Pbuild-jar|

        Some pieces of result texts:

        [INFO] Scanning for projects...

        [INFO]

        [INFO]
        ------------------------------------------------------------------------

        [INFO] Building Flink Quickstart Job 0.1

        [INFO]
        ------------------------------------------------------------------------

        Downloading:
        
https://repo.maven.apache.org/maven2/org/apache/flink/flink-scala_2.10/1.3.0/flink-scala_2.10-1.3.0.pom

        Downloaded:
        
https://repo.maven.apache.org/maven2/org/apache/flink/flink-scala_2.10/1.3.0/flink-scala_2.10-1.3.0.pom
        (10 KB at 17.1 KB/sec)

        …..

        [INFO]

        [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @
        quickstart ---

        [INFO]

        [INFO] --- build-helper-maven-plugin:1.7:add-source
        (add-source) @ quickstart ---

        [INFO] Source directory:
        /home/esa/projects/quickstart/src/main/scala added.

        [INFO]

        [INFO] --- maven-resources-plugin:2.6:resources
        (default-resources) @ quickstart ---

        [INFO] Using 'UTF-8' encoding to copy filtered resources.

        [INFO] Copying 1 resource

        [INFO]

        [INFO] --- maven-compiler-plugin:3.1:compile (default-compile)
        @ quickstart ---

        [INFO] Nothing to compile - all classes are up to date

        [INFO]

        [INFO] --- scala-maven-plugin:3.2.2:compile (default) @
        quickstart ---

        [WARNING]  Expected all dependencies to require Scala version:
        2.10.4

        [WARNING] org.scala-lang:scala-reflect:2.10.4 requires scala
        version: 2.10.4

        [WARNING] org.apache.flink:flink-scala_2.10:1.3.0 requires
        scala version: 2.10.4

        [WARNING] org.apache.flink:flink-scala_2.10:1.3.0 requires
        scala version: 2.10.4

        [WARNING] org.scala-lang:scala-compiler:2.10.4 requires scala
        version: 2.10.4

        [WARNING] org.scalamacros:quasiquotes_2.10:2.0.1 requires
        scala version: 2.10.4

        [WARNING] org.apache.flink:flink-streaming-scala_2.10:1.3.0
        requires scala version: 2.10.4

        [WARNING] org.apache.flink:flink-streaming-scala_2.10:1.3.0
        requires scala version: 2.10.4

        [WARNING] org.apache.flink:flink-runtime_2.10:1.3.0 requires
        scala version: 2.10.4

        [WARNING] com.data-artisans:flakka-actor_2.10:2.3-custom
        requires scala version: 2.10.4

        [WARNING] com.data-artisans:flakka-remote_2.10:2.3-custom
        requires scala version: 2.10.4

        [WARNING] com.data-artisans:flakka-slf4j_2.10:2.3-custom
        requires scala version: 2.10.4

        [WARNING] org.clapper:grizzled-slf4j_2.10:1.0.2 requires scala
        version: 2.10.3

        [WARNING] Multiple versions of scala libraries detected!

        [INFO] /home/esa/projects/quickstart/src/main/scala:-1: info:
        compiling

        [INFO] Compiling 4 source files to
        /home/esa/projects/quickstart/target/classes at 1518596652303

        [WARNING] warning: there were 1 feature warning(s); re-run
        with -feature for details

        [WARNING] one warning found

        [INFO] prepare-compile in 0 s

        [INFO] compile in 3 s

        [INFO]

        [INFO] --- build-helper-maven-plugin:1.7:add-test-source
        (add-test-source) @ quickstart ---

        [INFO] Test Source directory:
        /home/esa/projects/quickstart/src/test/scala added.

        [INFO]

        [INFO] --- maven-resources-plugin:2.6:testResources
        (default-testResources) @ quickstart ---

        [INFO] Using 'UTF-8' encoding to copy filtered resources.

        [INFO] skip non existing resourceDirectory
        /home/esa/projects/quickstart/src/test/resources

        [INFO]

        [INFO] --- maven-compiler-plugin:3.1:testCompile
        (default-testCompile) @ quickstart ---

        [INFO] No sources to compile

        [INFO]

        ……

        Do I need to something with IDE ? (IntelliJ IDEA)

        Or do I need to install special version of Scala or something
        like that ?

        Esa


Reply via email to