harshitbol opened a new issue #1600:
URL: https://github.com/apache/incubator-hudi/issues/1600


   **_Tips before filing an issue_**
   
   - Have you gone through our 
[FAQs](https://cwiki.apache.org/confluence/display/HUDI/FAQ)?
   yes
   - Join the mailing list to engage in conversations and get faster support at 
[email protected].
   
   - 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**
   S3 eventual consistency issue with aws glue
   A clear and concise description of the problem.
   
   **To Reproduce**
   
   Steps to reproduce the behavior:
   
   1. created dev endpoint in aws glue.
   
   2.ssh to pyspark repl
   `ssh [email protected] -t gluepyspark3 --packages 
org.apache.hudi:hudi-spark-bundle_2.11:0.5.1-incubating,org.apache.spark:spark-avro_2.11:2.4.4,org.apache.httpcomponents:httpclient:4.5.2
 --conf 'spark.serializer=org.apache.spark.serializer.KryoSerializer' `
   3.
   `tableName = 'member'
   hudi_options = {
     'hoodie.table.name': tableName,
     'hoodie.datasource.write.recordkey.field': 'member_id',
     'hoodie.datasource.write.table.name': tableName,
     'hoodie.datasource.write.operation': 'bulk_insert',
     'hoodie.datasource.write.precombine.field': 'updated_ts',
     'hoodie.upsert.shuffle.parallelism': 2,
     'hoodie.insert.shuffle.parallelism': 2,
     'hoodie.datasource.write.table.type': 'COPY_ON_WRITE',
   }
   
   
df.write.format("hudi").options(**hudi_options).mode("overwrite").save(s3_path)
   
   `
   
   4. Got exception when saving file in S3Caused by: 
org.apache.hudi.exception.HoodieException: 
java.util.concurrent.ExecutionException: 
org.apache.hudi.exception.HoodieInsertException: Failed to close the Insert 
Handle for path 
s3://hudi-devv4/member/2/24f1ead9-9da1-43d9-b865-291312efcabe-0_928-7-972_20200507180439.parquet
        at 
org.apache.hudi.common.util.queue.BoundedInMemoryExecutor.execute(BoundedInMemoryExecutor.java:143)
        at 
org.apache.hudi.func.CopyOnWriteLazyInsertIterable.computeNext(CopyOnWriteLazyInsertIterable.java:101)
        ... 25 more
   Caused by: java.util.concurrent.ExecutionException: 
org.apache.hudi.exception.HoodieInsertException: Failed to close the Insert 
Handle for path 
s3://hudi-devv4/member/2/24f1ead9-9da1-43d9-b865-291312efcabe-0_928-7-972_20200507180439.parquet
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at 
org.apache.hudi.common.util.queue.BoundedInMemoryExecutor.execute(BoundedInMemoryExecutor.java:141)
        ... 26 more
   Caused by: org.apache.hudi.exception.HoodieInsertException: Failed to close 
the Insert Handle for path 
s3://hudi-devv4/member/2/24f1ead9-9da1-43d9-b865-291312efcabe-0_928-7-972_20200507180439.parquet
        at 
org.apache.hudi.io.HoodieCreateHandle.close(HoodieCreateHandle.java:183)
        at 
org.apache.hudi.func.CopyOnWriteLazyInsertIterable$CopyOnWriteInsertHandler.finish(CopyOnWriteLazyInsertIterable.java:158)
        at 
org.apache.hudi.common.util.queue.BoundedInMemoryQueueConsumer.consume(BoundedInMemoryQueueConsumer.java:41)
        at 
org.apache.hudi.common.util.queue.BoundedInMemoryExecutor.lambda$null$2(BoundedInMemoryExecutor.java:121)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        ... 3 more
   Caused by: java.io.FileNotFoundException: No such file or directory 
's3://hudi-devv4/member/2/24f1ead9-9da1-43d9-b865-291312efcabe-0_928-7-972_20200507180439.parquet'
        at 
com.amazon.ws.emr.hadoop.fs.s3n.S3NativeFileSystem.getFileStatus(S3NativeFileSystem.java:808)
        at 
com.amazon.ws.emr.hadoop.fs.EmrFileSystem.getFileStatus(EmrFileSystem.java:548)
        at 
org.apache.hudi.common.io.storage.HoodieWrapperFileSystem.getFileStatus(HoodieWrapperFileSystem.java:308)
        at org.apache.hudi.common.util.FSUtils.getFileSize(FSUtils.java:147)
        at 
org.apache.hudi.io.HoodieCreateHandle.close(HoodieCreateHandle.java:169)
   
   
   **Expected behavior**
   It should allow to save file in S3
   
   A clear and concise description of what you expected to happen.
   
   **Environment Description**
   AWS
   * Hudi version :
   hudi-spark-bundle_2.11:0.5.1
   * Spark version :
   2.4.4
   * Hive version :
   
   * Hadoop version :
   2.8.5-amzn-1
   
   * Storage (HDFS/S3/GCS..) :
   S3
   * Running on Docker? (yes/no) :
   no, repl mode on aws endpoint.
   
   **Additional context**
   
   Add any other context about the problem here.
   
   **Stacktrace**
   
   ```Add the stacktrace of the error.```
   (218 + 8) / 1500]2020-05-07 18:16:10,441 WARN  [task-result-getter-2] 
scheduler.TaskSetManager (Logging.scala:logWarning(66)) - Lost task 218.0 in 
stage 7.0 (TID 261, ip-155-0-6-128.us-west-2.compute.internal, executor 2): 
java.lang.RuntimeException: org.apache.hudi.exception.HoodieException: 
org.apache.hudi.exception.HoodieException: 
java.util.concurrent.ExecutionException: 
org.apache.hudi.exception.HoodieInsertException: Failed to close the Insert 
Handle for path 
s3://hudi-devv4/member/2/c1f0b30a-1f73-4087-bf91-d9f768a49d42-0_218-7-261_20200507181532.parquet
        at 
org.apache.hudi.func.LazyIterableIterator.next(LazyIterableIterator.java:121)
        at 
scala.collection.convert.Wrappers$JIteratorWrapper.next(Wrappers.scala:43)
        at scala.collection.Iterator$$anon$12.nextCur(Iterator.scala:435)
        at scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:441)
        at 
org.apache.spark.storage.memory.MemoryStore.putIterator(MemoryStore.scala:221)
        at 
org.apache.spark.storage.memory.MemoryStore.putIteratorAsBytes(MemoryStore.scala:349)
        at 
org.apache.spark.storage.BlockManager$$anonfun$doPutIterator$1.apply(BlockManager.scala:1182)
        at 
org.apache.spark.storage.BlockManager$$anonfun$doPutIterator$1.apply(BlockManager.scala:1156)
        at org.apache.spark.storage.BlockManager.doPut(BlockManager.scala:1091)
        at 
org.apache.spark.storage.BlockManager.doPutIterator(BlockManager.scala:1156)
        at 
org.apache.spark.storage.BlockManager.getOrElseUpdate(BlockManager.scala:882)
        at org.apache.spark.rdd.RDD.getOrCompute(RDD.scala:335)
        at org.apache.spark.rdd.RDD.iterator(RDD.scala:286)
        at 
org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
        at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:324)
        at org.apache.spark.rdd.RDD.iterator(RDD.scala:288)
        at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
        at org.apache.spark.scheduler.Task.run(Task.scala:121)
        at 
org.apache.spark.executor.Executor$TaskRunner$$anonfun$10.apply(Executor.scala:408)
        at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1360)
        at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:414)
        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.HoodieException: 
org.apache.hudi.exception.HoodieException: 
java.util.concurrent.ExecutionException: 
org.apache.hudi.exception.HoodieInsertException: Failed to close the Insert 
Handle for path 
s3://hudi-devv4/member/2/c1f0b30a-1f73-4087-bf91-d9f768a49d42-0_218-7-261_20200507181532.parquet
        at 
org.apache.hudi.func.CopyOnWriteLazyInsertIterable.computeNext(CopyOnWriteLazyInsertIterable.java:105)
        at 
org.apache.hudi.func.CopyOnWriteLazyInsertIterable.computeNext(CopyOnWriteLazyInsertIterable.java:44)
        at 
org.apache.hudi.func.LazyIterableIterator.next(LazyIterableIterator.java:119)
        ... 23 more
   Caused by: org.apache.hudi.exception.HoodieException: 
java.util.concurrent.ExecutionException: 
org.apache.hudi.exception.HoodieInsertException: Failed to close the Insert 
Handle for path 
s3://hudi-devv4/member/2/c1f0b30a-1f73-4087-bf91-d9f768a49d42-0_218-7-261_20200507181532.parquet
        at 
org.apache.hudi.common.util.queue.BoundedInMemoryExecutor.execute(BoundedInMemoryExecutor.java:143)
        at 
org.apache.hudi.func.CopyOnWriteLazyInsertIterable.computeNext(CopyOnWriteLazyInsertIterable.java:101)
        ... 25 more
   Caused by: java.util.concurrent.ExecutionException: 
org.apache.hudi.exception.HoodieInsertException: Failed to close the Insert 
Handle for path 
s3://hudi-devv4/member/2/c1f0b30a-1f73-4087-bf91-d9f768a49d42-0_218-7-261_20200507181532.parquet
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at 
org.apache.hudi.common.util.queue.BoundedInMemoryExecutor.execute(BoundedInMemoryExecutor.java:141)
        ... 26 more
   Caused by: org.apache.hudi.exception.HoodieInsertException: Failed to close 
the Insert Handle for path 
s3://hudi-devv4/member/2/c1f0b30a-1f73-4087-bf91-d9f768a49d42-0_218-7-261_20200507181532.parquet
        at 
org.apache.hudi.io.HoodieCreateHandle.close(HoodieCreateHandle.java:183)
        at 
org.apache.hudi.func.CopyOnWriteLazyInsertIterable$CopyOnWriteInsertHandler.finish(CopyOnWriteLazyInsertIterable.java:158)
        at 
org.apache.hudi.common.util.queue.BoundedInMemoryQueueConsumer.consume(BoundedInMemoryQueueConsumer.java:41)
        at 
org.apache.hudi.common.util.queue.BoundedInMemoryExecutor.lambda$null$2(BoundedInMemoryExecutor.java:121)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        ... 3 more
   Caused by: java.io.FileNotFoundException: No such file or directory 
's3://hudi-devv4/member/2/c1f0b30a-1f73-4087-bf91-d9f768a49d42-0_218-7-261_20200507181532.parquet'
        at 
com.amazon.ws.emr.hadoop.fs.s3n.S3NativeFileSystem.getFileStatus(S3NativeFileSystem.java:808)
        at 
com.amazon.ws.emr.hadoop.fs.EmrFileSystem.getFileStatus(EmrFileSystem.java:548)
        at 
org.apache.hudi.common.io.storage.HoodieWrapperFileSystem.getFileStatus(HoodieWrapperFileSystem.java:308)
        at org.apache.hudi.common.util.FSUtils.getFileSize(FSUtils.java:147)
        at 
org.apache.hudi.io.HoodieCreateHandle.close(HoodieCreateHandle.java:169)
        ... 7 more
   
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to