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

Java SDK Harness throws NPE for VoidCoder as key coder

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.23.0
    • sdk-java-harness

    Description

      When using VoidCoder as the key coder, NullPointerException will be thrown for processing element.

      java.lang.NullPointerException
      	at org.apache.beam.model.fnexecution.v1.BeamFnApi$StateKey$BagUserState$Builder.setKey(BeamFnApi.java:39390)
      	at org.apache.beam.fn.harness.state.FnApiStateAccessor.createBagUserStateKey(FnApiStateAccessor.java:444)
      	at org.apache.beam.fn.harness.state.FnApiStateAccessor.bindValue(FnApiStateAccessor.java:195)
      	at org.apache.beam.sdk.state.StateSpecs$ValueStateSpec.bind(StateSpecs.java:327)
      	at org.apache.beam.sdk.state.StateSpecs$ValueStateSpec.bind(StateSpecs.java:317)
      	at org.apache.beam.fn.harness.FnApiDoFnRunner$ProcessBundleContext.state(FnApiDoFnRunner.java:1432)
      	at org.apache.beam.sdk.transforms.ParDoTest$TimerTests$TwoTimerTest$1$DoFnInvoker.invokeProcessElement(Unknown Source)
      	at org.apache.beam.fn.harness.FnApiDoFnRunner.processElementForParDo(FnApiDoFnRunner.java:740)
      	at org.apache.beam.fn.harness.FnApiDoFnRunner.access$700(FnApiDoFnRunner.java:132)
      	at org.apache.beam.fn.harness.FnApiDoFnRunner$Factory.lambda$createRunnerForPTransform$1(FnApiDoFnRunner.java:203)
      	at org.apache.beam.fn.harness.data.PCollectionConsumerRegistry$MetricTrackingFnDataReceiver.accept(PCollectionConsumerRegistry.java:216)
      	at org.apache.beam.fn.harness.data.PCollectionConsumerRegistry$MetricTrackingFnDataReceiver.accept(PCollectionConsumerRegistry.java:179)
      	at org.apache.beam.fn.harness.BeamFnDataReadRunner.forwardElementToConsumer(BeamFnDataReadRunner.java:204)
      	at org.apache.beam.fn.harness.data.QueueingBeamFnDataClient.drainAndBlock(QueueingBeamFnDataClient.java:106)
      	at org.apache.beam.fn.harness.control.ProcessBundleHandler.processBundle(ProcessBundleHandler.java:295)
      	at org.apache.beam.fn.harness.control.BeamFnControlClient.delegateOnInstructionRequestType(BeamFnControlClient.java:173)
      	at org.apache.beam.fn.harness.control.BeamFnControlClient.lambda$processInstructionRequests$0(BeamFnControlClient.java:157)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

      This fails validate runner tests such as https://github.com/apache/beam/blob/03d99dfa359f44a29a772fcc8ec8b0a237cab113/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java#L4120 on dataflow runner with beam_fn_api.

      Attachments

        Issue Links

          Activity

            People

              yichi Yichi Zhang
              yichi Yichi Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h