You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/09/15 03:06:00 UTC

[GitHub] [hudi] liujinhui1994 opened a new pull request #2090: [HUDI-1282] Should check whether the topic exists before deltastrmer consumes Kafka

liujinhui1994 opened a new pull request #2090:
URL: https://github.com/apache/hudi/pull/2090


   ## *Tips*
   - *Thank you very much for contributing to Apache Hudi.*
   - *Please review https://hudi.apache.org/contributing.html before opening a pull request.*
   
   ## What is the purpose of the pull request
   
   
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.


----------------------------------------------------------------
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.

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



[GitHub] [hudi] yanghua merged pull request #2090: [HUDI-1282] Check whether the topic exists before deltastrmer consumes Kafka

Posted by GitBox <gi...@apache.org>.
yanghua merged pull request #2090:
URL: https://github.com/apache/hudi/pull/2090


   


----------------------------------------------------------------
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.

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



[GitHub] [hudi] liujinhui1994 commented on pull request #2090: [HUDI-1282] Should check whether the topic exists before deltastrmer consumes Kafka

Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on pull request #2090:
URL: https://github.com/apache/hudi/pull/2090#issuecomment-692434773


   `2020-09-15 09:53:50 ERROR Driver yarn.ApplicationMaster:94 - User class threw exception: org.apache.hudi.exception.HoodieException: org.apache.hudi.exception.HoodieException
   org.apache.hudi.exception.HoodieException: org.apache.hudi.exception.HoodieException
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.lambda$sync$1(HoodieDeltaStreamer.java:152)
   	at org.apache.hudi.common.util.Option.ifPresent(Option.java:96)
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.sync(HoodieDeltaStreamer.java:147)
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.main(HoodieDeltaStreamer.java:464)
   	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.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:673)
   Caused by: java.util.concurrent.ExecutionException: org.apache.hudi.exception.HoodieException
   	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
   	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
   	at org.apache.hudi.async.AbstractAsyncService.waitForShutdown(AbstractAsyncService.java:79)
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.lambda$sync$1(HoodieDeltaStreamer.java:150)
   	... 8 more
   Caused by: org.apache.hudi.exception.HoodieException
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer$DeltaSyncService.lambda$startService$0(HoodieDeltaStreamer.java:595)
   	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
   	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)
   Caused by: java.lang.NullPointerException
   	at org.apache.hudi.utilities.sources.helpers.KafkaOffsetGen.getNextOffsetRanges(KafkaOffsetGen.java:179)
   	at org.apache.hudi.utilities.sources.JsonKafkaSource.fetchNewData(JsonKafkaSource.java:68)
   	at org.apache.hudi.utilities.sources.Source.fetchNext(Source.java:75)
   	at org.apache.hudi.utilities.deltastreamer.SourceFormatAdapter.fetchNewDataInAvroFormat(SourceFormatAdapter.java:60)
   	at org.apache.hudi.utilities.deltastreamer.DeltaSync.readFromSource(DeltaSync.java:336)
   	at org.apache.hudi.utilities.deltastreamer.DeltaSync.syncOnce(DeltaSync.java:237)
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer$DeltaSyncService.lambda$startService$0(HoodieDeltaStreamer.java:579)`


----------------------------------------------------------------
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.

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



[GitHub] [hudi] liujinhui1994 removed a comment on pull request #2090: [HUDI-1282] Should check whether the topic exists before deltastrmer consumes Kafka

Posted by GitBox <gi...@apache.org>.
liujinhui1994 removed a comment on pull request #2090:
URL: https://github.com/apache/hudi/pull/2090#issuecomment-692435981


   @vinothchandar @yanghua 


----------------------------------------------------------------
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.

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



[GitHub] [hudi] liujinhui1994 removed a comment on pull request #2090: [HUDI-1282] Should check whether the topic exists before deltastrmer consumes Kafka

Posted by GitBox <gi...@apache.org>.
liujinhui1994 removed a comment on pull request #2090:
URL: https://github.com/apache/hudi/pull/2090#issuecomment-692434773


   `2020-09-15 09:53:50 ERROR Driver yarn.ApplicationMaster:94 - User class threw exception: org.apache.hudi.exception.HoodieException: org.apache.hudi.exception.HoodieException
   org.apache.hudi.exception.HoodieException: org.apache.hudi.exception.HoodieException
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.lambda$sync$1(HoodieDeltaStreamer.java:152)
   	at org.apache.hudi.common.util.Option.ifPresent(Option.java:96)
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.sync(HoodieDeltaStreamer.java:147)
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.main(HoodieDeltaStreamer.java:464)
   	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.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:673)
   Caused by: java.util.concurrent.ExecutionException: org.apache.hudi.exception.HoodieException
   	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
   	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
   	at org.apache.hudi.async.AbstractAsyncService.waitForShutdown(AbstractAsyncService.java:79)
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.lambda$sync$1(HoodieDeltaStreamer.java:150)
   	... 8 more
   Caused by: org.apache.hudi.exception.HoodieException
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer$DeltaSyncService.lambda$startService$0(HoodieDeltaStreamer.java:595)
   	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
   	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)
   Caused by: java.lang.NullPointerException
   	at org.apache.hudi.utilities.sources.helpers.KafkaOffsetGen.getNextOffsetRanges(KafkaOffsetGen.java:179)
   	at org.apache.hudi.utilities.sources.JsonKafkaSource.fetchNewData(JsonKafkaSource.java:68)
   	at org.apache.hudi.utilities.sources.Source.fetchNext(Source.java:75)
   	at org.apache.hudi.utilities.deltastreamer.SourceFormatAdapter.fetchNewDataInAvroFormat(SourceFormatAdapter.java:60)
   	at org.apache.hudi.utilities.deltastreamer.DeltaSync.readFromSource(DeltaSync.java:336)
   	at org.apache.hudi.utilities.deltastreamer.DeltaSync.syncOnce(DeltaSync.java:237)
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer$DeltaSyncService.lambda$startService$0(HoodieDeltaStreamer.java:579)`


----------------------------------------------------------------
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.

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



[GitHub] [hudi] liujinhui1994 commented on pull request #2090: [HUDI-1282] Should check whether the topic exists before deltastrmer consumes Kafka

Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on pull request #2090:
URL: https://github.com/apache/hudi/pull/2090#issuecomment-692436132


   What do you think?
   @vinothchandar @yanghua 


----------------------------------------------------------------
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.

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



[GitHub] [hudi] liujinhui1994 commented on pull request #2090: [HUDI-1282] Should check whether the topic exists before deltastrmer consumes Kafka

Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on pull request #2090:
URL: https://github.com/apache/hudi/pull/2090#issuecomment-692435981


   @vinothchandar @yanghua 


----------------------------------------------------------------
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.

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



[GitHub] [hudi] yanghua commented on a change in pull request #2090: [HUDI-1282] Should check whether the topic exists before deltastrmer consumes Kafka

Posted by GitBox <gi...@apache.org>.
yanghua commented on a change in pull request #2090:
URL: https://github.com/apache/hudi/pull/2090#discussion_r488538950



##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/KafkaOffsetGen.java
##########
@@ -172,6 +172,9 @@ public KafkaOffsetGen(TypedProperties props) {
     Map<TopicPartition, Long> fromOffsets;
     Map<TopicPartition, Long> toOffsets;
     try (KafkaConsumer consumer = new KafkaConsumer(kafkaParams)) {
+      if (!checkTopicExists(consumer)) {
+        throw new HoodieException("topic does not exist :" + topicName);

Review comment:
       -> `Kafka topic : xxx does not exist.`




----------------------------------------------------------------
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.

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