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 2021/09/05 01:58:48 UTC

[GitHub] [hudi] fengjian428 opened a new issue #3603: [SUPPORT] delta streamer Failed to archive commits

fengjian428 opened a new issue #3603:
URL: https://github.com/apache/hudi/issues/3603


   **_Tips before filing an issue_**
   
   - Have you gone through our [FAQs](https://cwiki.apache.org/confluence/display/HUDI/FAQ)?
   
   - Join the mailing list to engage in conversations and get faster support at dev-subscribe@hudi.apache.org.
   
   - If you have triaged this as a bug, then file an [issue](https://issues.apache.org/jira/projects/HUDI/issues) directly.
   
   **Describe the problem you faced**
   
   A clear and concise description of the problem.
   
   **To Reproduce**
   
   Steps to reproduce the behavior:
   
   1. initial cow table with SqlSource
   2. consume from kafka with KafkaSource
   
   after few commits success, I got a  Failed to archive commits error
   
   **Environment Description**
   
   * Hudi version : 0.9
   
   * Spark version : 2.4.7
   
   * Hive version :2.3.8
   
   * Hadoop version :
   
   * Storage (HDFS/S3/GCS..) :HDFS
   
   * Running on Docker? (yes/no) :NO
   
   
   **Additional context**
   
   Add any other context about the problem here.
   
   **Stacktrace**
   
   ```21/09/05 09:39:33 ERROR Client: Application diagnostics message: User class threw exception: org.apache.hudi.exception.HoodieException: org.apache.hudi.exception.HoodieException: Failed to archive commits
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.lambda$sync$1(HoodieDeltaStreamer.java:175)
   	at org.apache.hudi.common.util.Option.ifPresent(Option.java:96)
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.sync(HoodieDeltaStreamer.java:170)
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.main(HoodieDeltaStreamer.java:511)
   	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:685)
   Caused by: java.util.concurrent.ExecutionException: org.apache.hudi.exception.HoodieException: Failed to archive commits
   	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
   	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
   	at org.apache.hudi.async.HoodieAsyncService.waitForShutdown(HoodieAsyncService.java:90)
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer.lambda$sync$1(HoodieDeltaStreamer.java:173)
   	... 8 more
   Caused by: org.apache.hudi.exception.HoodieException: Failed to archive commits
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer$DeltaSyncService.lambda$startService$0(HoodieDeltaStreamer.java:659)
   	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
   	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: org.apache.hudi.exception.HoodieCommitException: Failed to archive commits
   	at org.apache.hudi.table.HoodieTimelineArchiveLog.archive(HoodieTimelineArchiveLog.java:318)
   	at org.apache.hudi.table.HoodieTimelineArchiveLog.archiveIfRequired(HoodieTimelineArchiveLog.java:128)
   	at org.apache.hudi.client.AbstractHoodieWriteClient.postCommit(AbstractHoodieWriteClient.java:439)
   	at org.apache.hudi.client.AbstractHoodieWriteClient.commitStats(AbstractHoodieWriteClient.java:191)
   	at org.apache.hudi.client.SparkRDDWriteClient.commit(SparkRDDWriteClient.java:124)
   	at org.apache.hudi.utilities.deltastreamer.DeltaSync.writeToSink(DeltaSync.java:516)
   	at org.apache.hudi.utilities.deltastreamer.DeltaSync.syncOnce(DeltaSync.java:303)
   	at org.apache.hudi.utilities.deltastreamer.HoodieDeltaStreamer$DeltaSyncService.lambda$startService$0(HoodieDeltaStreamer.java:635)
   	... 4 more
   Caused by: java.lang.NullPointerException: null of string of map of union in field extraMetadata of org.apache.hudi.avro.model.HoodieCommitMetadata of union in field hoodieCommitMetadata of org.apache.hudi.avro.model.HoodieArchivedMetaEntry
   	at org.apache.avro.generic.GenericDatumWriter.npe(GenericDatumWriter.java:145)
   	at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:139)
   	at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:75)
   	at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:62)
   	at org.apache.hudi.common.table.log.block.HoodieAvroDataBlock.serializeRecords(HoodieAvroDataBlock.java:106)
   	at org.apache.hudi.common.table.log.block.HoodieDataBlock.getContentBytes(HoodieDataBlock.java:97)
   	at org.apache.hudi.common.table.log.HoodieLogFormatWriter.appendBlocks(HoodieLogFormatWriter.java:164)
   	at org.apache.hudi.common.table.log.HoodieLogFormatWriter.appendBlock(HoodieLogFormatWriter.java:142)
   	at org.apache.hudi.table.HoodieTimelineArchiveLog.writeToFile(HoodieTimelineArchiveLog.java:334)
   	at org.apache.hudi.table.HoodieTimelineArchiveLog.archive(HoodieTimelineArchiveLog.java:307)
   	... 11 more
   Caused by: java.lang.NullPointerException
   	at org.apache.avro.io.Encoder.writeString(Encoder.java:121)
   	at org.apache.avro.generic.GenericDatumWriter.writeString(GenericDatumWriter.java:267)
   	at org.apache.avro.generic.GenericDatumWriter.writeString(GenericDatumWriter.java:262)
   	at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:128)
   	at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:75)
   	at org.apache.avro.generic.GenericDatumWriter.writeMap(GenericDatumWriter.java:234)
   	at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:121)
   	at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:75)
   	at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:125)
   	at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:75)
   	at org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:166)
   	at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:156)
   	at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:118)
   	at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:75)
   	at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:125)
   	at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:75)
   	at org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:166)
   	at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:156)
   	at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:118)
   	... 19 more
   
   Exception in thread "main" org.apache.spark.SparkException: Application application_1630669697430_602018 finished with failed status
   	at org.apache.spark.deploy.yarn.Client.run(Client.scala:1150)
   	at org.apache.spark.deploy.yarn.YarnClusterApplication.start(Client.scala:1530)
   	at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:845)
   	at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:161)
   	at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:184)
   	at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:86)
   	at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:920)
   	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:929)
   	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)```
   
   


-- 
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@hudi.apache.org

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



[GitHub] [hudi] vinothchandar commented on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
vinothchandar commented on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-926332955


   @fengjian428 any updates ?
   


-- 
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@hudi.apache.org

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



[GitHub] [hudi] nsivabalan edited a comment on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
nsivabalan edited a comment on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-931267143


   I do see from [code](https://github.com/apache/hudi/blob/47ed91799943271f219419cf209793a98b3f09b5/hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java#L506) that we do add entry to extra metadata as below
   ```
   HashMap<String, String> checkpointCommitMetadata = new HashMap<>();
         checkpointCommitMetadata.put(CHECKPOINT_KEY, checkpointStr);
         if (cfg.checkpoint != null) {
           checkpointCommitMetadata.put(CHECKPOINT_RESET_KEY, cfg.checkpoint);
         }
   ```
   
   So, entire map is not null for sure. Can you enable logs and see whats the checkpointStr after reading from source. may be its null w/ SqlSource in this case. 
   Also, have you set --commit-on-errors config in deltastreamer by any chance? 


-- 
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@hudi.apache.org

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



[GitHub] [hudi] nsivabalan commented on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-961620056


   @fengjian428 : hey, is there any updates for us. We can try to reproduce if you are stuck with the issue. 


-- 
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@hudi.apache.org

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



[GitHub] [hudi] nsivabalan closed issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
nsivabalan closed issue #3603:
URL: https://github.com/apache/hudi/issues/3603


   


-- 
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@hudi.apache.org

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



[GitHub] [hudi] nsivabalan commented on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-987593906


   Will close it out if we don't hear from you in a day or two. please do let us know if you are having the issue still. 


-- 
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@hudi.apache.org

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



[GitHub] [hudi] nsivabalan commented on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-919655568


   quick question. Were you running hudi w/ 080 and you did not face any issue and you are trying out 090 and running into this issue ? or are you trying out hudi for first time. trying to rule out any env or schema specific issues. 


-- 
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@hudi.apache.org

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



[GitHub] [hudi] nsivabalan commented on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-961620056


   @fengjian428 : hey, is there any updates for us. We can try to reproduce if you are stuck with the issue. 


-- 
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@hudi.apache.org

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



[GitHub] [hudi] nsivabalan commented on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-931261175


   @fengjian428 : looks like its related to null in extra metadata. would you mind trying out the patch given by Sagar [here](https://github.com/codope/hudi/commit/750a3315badeb362d3b57cfc016e3661f4e25564). Solution you proposed will not archive only. May be it could solve the problem at hand, but don't think thats the right fix.
   Would appreciate if you can try it out and let us know how it goes. 
   


-- 
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@hudi.apache.org

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



[GitHub] [hudi] nsivabalan commented on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-931267143


   I do see from code that we do add entry to extra metadata as below
   ```
   HashMap<String, String> checkpointCommitMetadata = new HashMap<>();
         checkpointCommitMetadata.put(CHECKPOINT_KEY, checkpointStr);
         if (cfg.checkpoint != null) {
           checkpointCommitMetadata.put(CHECKPOINT_RESET_KEY, cfg.checkpoint);
         }
   ```
   
   Can you enable logs and see whats the checkpointStr after reading from source. may be its null w/ SqlSource in this case. 
   Also, have you set --commit-on-errors config in deltastreamer by any chance? 


-- 
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@hudi.apache.org

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



[GitHub] [hudi] nsivabalan commented on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-961620056


   @fengjian428 : hey, is there any updates for us. We can try to reproduce if you are stuck with the issue. 


-- 
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@hudi.apache.org

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



[GitHub] [hudi] fengjian428 commented on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
fengjian428 commented on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-919697392


   > quick question. Were you running hudi w/ 080 and you did not face any issue and you are trying out 090 and running into this issue ?   Yes
   
   


-- 
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@hudi.apache.org

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



[GitHub] [hudi] codope commented on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
codope commented on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-920110356


   @fengjian428 I could not reproduce the issue. I have the same setup i.e. deltastreamer continuous job consuming from Kafka. Though my schema in extraMetadata is simple one. There is a similar issue #3559  with 0.8.0. Based on this [SO answer](https://stackoverflow.com/questions/26720257/nullpointerexception-in-avro-reflectdatumwriter), I think we need to use ReflectDatumWriter to allow nulls. Could you please try [this patch](https://github.com/codope/hudi/commit/750a3315badeb362d3b57cfc016e3661f4e25564) in your environment? If it works, then I'll upstream the change.


-- 
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@hudi.apache.org

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



[GitHub] [hudi] fengjian428 commented on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
fengjian428 commented on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-926477428


   > @fengjian428 any updates ?
   
   ![image](https://user-images.githubusercontent.com/4403474/134650502-346bb3a9-144c-4716-a7fc-cf185916c441.png)
   I set isFailOnTimelineArchivingEnabled false, and surround writeToFile with try catch, then solve this problem


-- 
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@hudi.apache.org

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



[GitHub] [hudi] nsivabalan commented on issue #3603: [SUPPORT] delta streamer Failed to archive commits

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on issue #3603:
URL: https://github.com/apache/hudi/issues/3603#issuecomment-946369090


   @fengjian428 : hey, can you give us any updates. 


-- 
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@hudi.apache.org

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