Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-2662

Quickstart for Spark Java not working

Details

    • Bug
    • Status: Resolved
    • P0
    • Resolution: Fixed
    • 2.1.0
    • 2.1.0
    • examples-java, runner-spark
    • None

    Description

      Spark version is missing in generated examples archetype pom.xml:

              <dependency>
                <groupId>org.apache.spark</groupId>
                <artifactId>spark-streaming_2.10</artifactId>
                <version>${spark.version}</version>  <--- Missing
                <scope>runtime</scope>
                <exclusions>
                  <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>jul-to-slf4j</artifactId>
                  </exclusion>
                </exclusions>
              </dependency>
      

      Quickstart fails with:

      lcwik@lcwik0:~/release/word-count-beam$ mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount      -Dexec.args="--runner=SparkRunner --inputFile=pom.xml --output=counts" -Pspark-runner
      [INFO] Scanning for projects...
      [ERROR] [ERROR] Some problems were encountered while processing the POMs:
      [ERROR] 'dependencies.dependency.version' for org.apache.spark:spark-streaming_2.10:jar is missing. @ line 241, column 21
       @ 
      [ERROR] The build could not read 1 project -> [Help 1]
      [ERROR]   
      [ERROR]   The project org.example:word-count-beam:0.1 (/usr/local/google/home/lcwik/release/word-count-beam/pom.xml) has 1 error
      [ERROR]     'dependencies.dependency.version' for org.apache.spark:spark-streaming_2.10:jar is missing. @ line 241, column 21
      [ERROR] 
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR] 
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
      

      I generated the archetype pom.xml with:

      mvn archetype:generate       -DarchetypeGroupId=org.apache.beam       -DarchetypeArtifactId=beam-sdks-java-maven-archetypes-examples       -DarchetypeVersion=2.1.0       -DgroupId=org.example       -DartifactId=word-count-beam       -Dversion="0.1"       -Dpackage=org.apache.beam.examples -DinteractiveMode=false
      

      after adding https://repository.apache.org/content/repositories/orgapachebeam-1019/ as a repo in my settings.xml

      Attachments

        Activity

          People

            lcwik Luke Cwik
            lcwik Luke Cwik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: