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

WordCount: Metrics error in the DirectRunner

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 0.4.0
    • runner-direct
    • None

    Description

      I'm following the Beam quickstart to analyze the pom.xml for the examples archetype in the DirectRunner:

      Generate the project:

      mvn archetype:generate \
            -DarchetypeRepository=https://repository.apache.org/content/groups/snapshots \                          
            -DarchetypeGroupId=org.apache.beam \
            -DarchetypeArtifactId=beam-sdks-java-maven-archetypes-examples \
            -DarchetypeVersion=LATEST \
            -DgroupId=org.example \
            -DartifactId=word-count-beam \
            -Dversion="0.1" \
            -Dpackage=org.apache.beam.examples \
            -DinteractiveMode=false
      

      Count words in the pom.xml:

      mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount \
           -Dexec.args="--inputFile=pom.xml --output=direct/counts" -Pdirect-runner
      

      The logs:

      INFO] --- exec-maven-plugin:1.4.0:java (default-cli) @ word-count-beam ---
      Dec 07, 2016 9:42:03 PM org.apache.beam.sdk.io.FileBasedSource expandFilePattern
      INFO: Matched 1 files for pattern pom.xml
      Dec 07, 2016 9:42:03 PM org.apache.beam.sdk.metrics.MetricsEnvironment getCurrentContainer
      SEVERE: Unable to update metrics on the current thread. Most likely caused by using metrics outside the managed work-execution thread.
      Dec 07, 2016 9:42:03 PM org.apache.beam.sdk.io.Write$Bound$1 processElement
      INFO: Initializing write operation org.apache.beam.sdk.io.TextIO$TextSink$TextWriteOperation@26bbd1cf
      Dec 07, 2016 9:42:04 PM org.apache.beam.sdk.io.Write$Bound$WriteBundles processElement
      INFO: Opening writer for write operation org.apache.beam.sdk.io.TextIO$TextSink$TextWriteOperation@19371061
      Dec 07, 2016 9:42:04 PM org.apache.beam.sdk.io.Write$Bound$WriteBundles processElement
      INFO: Opening writer for write operation org.apache.beam.sdk.io.TextIO$TextSink$TextWriteOperation@19371061
      Dec 07, 2016 9:42:04 PM org.apache.beam.sdk.io.Write$Bound$WriteBundles processElement
      INFO: Opening writer for write operation org.apache.beam.sdk.io.TextIO$TextSink$TextWriteOperation@19371061
      Dec 07, 2016 9:42:04 PM org.apache.beam.sdk.io.Write$Bound$WriteBundles processElement
      INFO: Opening writer for write operation org.apache.beam.sdk.io.TextIO$TextSink$TextWriteOperation@19371061
      Dec 07, 2016 9:42:04 PM org.apache.beam.sdk.io.Write$Bound$2 processElement
      INFO: Finalizing write operation org.apache.beam.sdk.io.TextIO$TextSink$TextWriteOperation@3701012a.
      

      Presumably, this SEVERE warning is indicative of a bug (or should be masked).

      Attachments

        Issue Links

          Activity

            People

              bchambers Ben Chambers
              dhalperi Dan Halperin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Stop watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment