You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/04/07 20:10:43 UTC

[GitHub] [incubator-seatunnel] realdengziqi opened a new issue, #1673: [Bug] [Module Name] Bug title

realdengziqi opened a new issue, #1673:
URL: https://github.com/apache/incubator-seatunnel/issues/1673

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
   
   
   ### What happened
   
   When outputting data to doris, a ClassCastException was encountered. batch is an ArrayList, it cannot be cast to CharSequence type. So I solved it with the toArray method and will submit a PR later.
   
   ### SeaTunnel Version
   
   dev
   
   ### SeaTunnel Config
   
   ```conf
   env {
   	execution.parallelism = 1
   }
   
   source {
       KafkaTableStream {
   	    consumer.bootstrap.servers = "hadoop102:9092"
   	    consumer.group.id = "seatunnel5"
   	    topics = test
   	    result_table_name = test
   	    format.type = json
   	    schema = "{\"session_id\":\"string\",\"video_count\":\"int\",\"duration_time\":\"long\",\"user_id\":\"string\",\"user_age\":\"int\",\"city\":\"string\",\"session_start_time\":\"datetime\",\"session_end_time\":\"datetime\"}"
   	    format.ignore-parse-errors = "true"
   	}
   }
   
   transform{
   	sql {
   		sql = "select user_id,city,user_age as age,video_count as video_sum,duration_time as max_duration_time,duration_time as min_duration_time,session_end_time as last_session_date from test"
   		result_table_name = test2
   	}
   }
   
   sink{
   	DorisSink {
   		source_table_name = test2
       	fenodes = "hadoop102:8030"
       	database = test_db
       	table = example_user_video
       	user = atguigu
       	password = 123321
       	batch_size = 50
       	doris.column_separator="\t"
       	doris.columns="user_id,city,age,video_sum,max_duration_time,min_duration_time,last_session_date"
   	}
   }
   ```
   
   
   ### Running Command
   
   ```shell
   bin/start-seatunnel-flink.sh --config config/example04.conf
   ```
   
   
   ### Error Exception
   
   ```log
   at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
           at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
           at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
   Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.CharSequence
           at org.apache.seatunnel.flink.doris.sink.DorisOutputFormat.flush(DorisOutputFormat.java:210)
           at org.apache.seatunnel.flink.doris.sink.DorisOutputFormat.writeRecord(DorisOutputFormat.java:149)
           at org.apache.seatunnel.flink.doris.sink.DorisSinkFunction.invoke(DorisSinkFunction.java:51)
           at org.apache.flink.streaming.api.operators.StreamSink.processElement(StreamSink.java:54)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:71)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:46)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:26)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:50)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:28)
           at org.apache.flink.streaming.api.operators.StreamMap.processElement(StreamMap.java:38)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:71)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:46)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:26)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:50)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:28)
           at org.apache.flink.streaming.api.operators.StreamMap.processElement(StreamMap.java:38)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:71)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:46)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:26)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:50)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:28)
           at org.apache.flink.streaming.api.operators.StreamMap.processElement(StreamMap.java:38)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:71)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:46)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:26)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:50)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:28)
           at org.apache.flink.streaming.api.operators.StreamFilter.processElement(StreamFilter.java:39)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:71)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:46)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:26)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:50)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:28)
           at org.apache.flink.streaming.api.operators.StreamMap.processElement(StreamMap.java:38)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:71)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:46)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:26)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:50)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:28)
           at org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:50)
           at org.apache.flink.table.runtime.CRowWrappingCollector.collect(CRowWrappingCollector.scala:37)
           at org.apache.flink.table.runtime.CRowWrappingCollector.collect(CRowWrappingCollector.scala:28)
           at DataStreamCalcRule$42.processElement(Unknown Source)
           at org.apache.flink.table.runtime.CRowProcessRunner.processElement(CRowProcessRunner.scala:69)
           at org.apache.flink.table.runtime.CRowProcessRunner.processElement(CRowProcessRunner.scala:35)
           at org.apache.flink.streaming.api.operators.ProcessOperator.processElement(ProcessOperator.java:66)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:71)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:46)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:26)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:50)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:28)
           at org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:50)
           at org.apache.flink.table.runtime.CRowWrappingCollector.collect(CRowWrappingCollector.scala:37)
           at org.apache.flink.table.runtime.CRowWrappingCollector.collect(CRowWrappingCollector.scala:28)
           at DataStreamSourceConversion$29.processElement(Unknown Source)
           at org.apache.flink.table.runtime.CRowOutputProcessRunner.processElement(CRowOutputProcessRunner.scala:70)
           at org.apache.flink.streaming.api.operators.ProcessOperator.processElement(ProcessOperator.java:66)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.pushToOperator(CopyingChainingOutput.java:71)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:46)
           at org.apache.flink.streaming.runtime.tasks.CopyingChainingOutput.collect(CopyingChainingOutput.java:26)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:50)
           at org.apache.flink.streaming.api.operators.CountingOutput.collect(CountingOutput.java:28)
           at org.apache.flink.streaming.api.operators.StreamSourceContexts$ManualWatermarkContext.processAndCollectWithTimestamp(StreamSourceContexts.java:322)
           at org.apache.flink.streaming.api.operators.StreamSourceContexts$WatermarkContext.collectWithTimestamp(StreamSourceContexts.java:426)
           at org.apache.flink.streaming.connectors.kafka.internals.AbstractFetcher.emitRecordsWithTimestamps(AbstractFetcher.java:365)
           at org.apache.flink.streaming.connectors.kafka.internals.KafkaFetcher.partitionConsumerRecordsHandler(KafkaFetcher.java:183)
           at org.apache.flink.streaming.connectors.kafka.internals.KafkaFetcher.runFetchLoop(KafkaFetcher.java:142)
           at org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumerBase.run(FlinkKafkaConsumerBase.java:826)
           at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:110)
           at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:66)
           at org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:269)
   ```
   
   
   ### Flink or Spark Version
   
   flink v1.13.0
   
   ### Java or Scala Version
   
   jdk1.8.0_212
   scala-2.12.11
   
   ### Screenshots
   
   ![image](https://user-images.githubusercontent.com/42276568/162287115-fef9989b-6431-443b-9f9f-cfa01c7b5031.png)
   
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] CalvinKirs closed issue #1673: [Bug] [connetor] When outputting data to doris, a ClassCastException was encountered.

Posted by GitBox <gi...@apache.org>.
CalvinKirs closed issue #1673: [Bug] [connetor] When outputting data to doris, a ClassCastException was encountered.
URL: https://github.com/apache/incubator-seatunnel/issues/1673


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] cresentboy commented on issue #1673: [Bug] [connetor] When outputting data to doris, a ClassCastException was encountered.

Posted by GitBox <gi...@apache.org>.
cresentboy commented on issue #1673:
URL: https://github.com/apache/incubator-seatunnel/issues/1673#issuecomment-1109242213

   打个卡


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org