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

BigQueryIO MultiPartitionsWriteTables fails with ClassCastException: java.lang.Object cannot be cast to org.apache.beam.sdk.values.KV

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • 2.19.0
    • 2.21.0
    • io-java-gcp
    • None

    Description

      It looks like the coder inference fails for BatchLoad.writeTempTables and selects an avro coder:

      object_value: <
                    type: "org.apache.beam.sdk.coders.AvroCoder"
                    parameters: <
                      name: "type"
                      value: <
                        string_value: "java.lang.Object"
                      >
                    >
                    parameters: <
                      name: "schema"
                      value: <
                        string_value: "{\"type\":\"record\",\"name\":\"Object\",\"namespace\":\"java.lang\",\"fields\":[]}"
                      >
                    >
      

      Full exception:

      exception: "java.lang.ClassCastException: java.lang.Object cannot be cast to org.apache.beam.sdk.values.KV at org.apache.beam.sdk.coders.KvCoder.registerByteSizeObserver(KvCoder.java:36) at org.apache.beam.sdk.coders.IterableLikeCoder.registerByteSizeObserver(IterableLikeCoder.java:191) at org.apache.beam.sdk.coders.IterableLikeCoder.registerByteSizeObserver(IterableLikeCoder.java:60) at org.apache.beam.sdk.util.WindowedValue$FullWindowedValueCoder.registerByteSizeObserver(WindowedValue.java:623) at org.apache.beam.sdk.util.WindowedValue$FullWindowedValueCoder.registerByteSizeObserver(WindowedValue.java:539) at org.apache.beam.runners.dataflow.worker.IntrinsicMapTaskExecutorFactory$ElementByteSizeObservableCoder.registerByteSizeObserver(IntrinsicMapTaskExecutorFactory.java:400)
      

      Attachments

        Issue Links

          Activity

            People

              lcwik Luke Cwik
              lcwik Luke Cwik
              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