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

Flink (1.12) Beam (2.30) word count example missing a dependency for the uber jar

Details

    • Bug
    • Status: Open
    • P3
    • Resolution: Unresolved
    • 2.30.0
    • None
    • examples-java, website
    • None

    Description

      https://beam.apache.org/documentation/runners/flink/#flink-version-compatibility

      The word count example generated by the mvn archetype command is missing a dependency to run successfully with Flink.

          <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-jaxb-annotations -->
          <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-jaxb-annotations</artifactId>
            <version>2.12.4</version>
          </dependency>
      

      This won't become apparent until one tries to run the packaged uber jar in a Flink cluster (1.12 in my case) and gets the following error:

      tianzi@tz-yarn-m:~$ flink run -c org.apache.beam.examples.WordCount word-count-beam-bundled-0.1.jar --runner=FlinkRunner
      SLF4J: Class path contains multiple SLF4J bindings.
      SLF4J: Found binding in [jar:file:/usr/lib/flink/lib/log4j-slf4j-impl-2.12.1.jar!/org/slf4j/impl/StaticL
      oggerBinder.class]
      SLF4J: Found binding in [jar:file:/usr/lib/hadoop/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLog
      gerBinder.class]
      SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
      2021-07-09 16:45:28,061 INFO  org.apache.flink.yarn.cli.FlinkYarnSessionCli                [] - Found Ya
      rn properties file under /tmp/.yarn-properties-tianzi.
      2021-07-09 16:45:28,061 INFO  org.apache.flink.yarn.cli.FlinkYarnSessionCli                [] - Found Ya
      rn properties file under /tmp/.yarn-properties-tianzi.
      java.util.ServiceConfigurationError: com.fasterxml.jackson.databind.Module: Provider com.fasterxml.jacks
      on.module.jaxb.JaxbAnnotationModule not a subtype
              at java.util.ServiceLoader.fail(ServiceLoader.java:239)
              at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
              at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:376)
              at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
              at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
              at com.fasterxml.jackson.databind.ObjectMapper.findModules(ObjectMapper.java:1081)
              at org.apache.beam.sdk.options.PipelineOptionsFactory.<clinit>(PipelineOptionsFactory.java:478)
              at org.apache.beam.examples.WordCount.main(WordCount.java:196)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:349)
              at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedPro
      gram.java:219)
              at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114)
              at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:812)
              at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:246)
              at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1054)
              at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1132)
              at java.security.AccessController.doPrivileged(Native Method)
              at javax.security.auth.Subject.doAs(Subject.java:422)
              at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1762)
              at org.apache.flink.runtime.security.contexts.HadoopSecurityContext.runSecured(HadoopSecurityCon
      text.java:41)
              at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1132)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tianzi Tianzi Cai
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 40m
                  2h 40m