You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "xuzifu666 (via GitHub)" <gi...@apache.org> on 2024/03/17 05:05:46 UTC

[I] [SUPPORT] Insert overwrite with replacement instant cannot execute archive [hudi]

xuzifu666 opened a new issue, #10873:
URL: https://github.com/apache/hudi/issues/10873

   **_Tips before filing an issue_**
   
   - Have you gone through our [FAQs](https://hudi.apache.org/learn/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. insert overwrite a table partition with 100times with replacement instant
   2. timeline had not execute archived all the time
   3. impact query table due to scan timeline instants
   
   **Expected behavior**
   
   execute archive in a regular time
   
   **Environment Description**
   
   * Hudi version : 0.14.0
   
   * Spark version : 3.2.0
   
   * Storage (HDFS/S3/GCS..) : HDFS
   
   
   
   
   **Additional context**
   
   Add any other context about the problem here.
   
   **Stacktrace**
   
   ```Add the stacktrace of the error.```
   
   


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

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


Re: [I] [SUPPORT] Insert overwrite with replacement instant cannot execute archive [hudi]

Posted by "ad1happy2go (via GitHub)" <gi...@apache.org>.
ad1happy2go commented on issue #10873:
URL: https://github.com/apache/hudi/issues/10873#issuecomment-2002570828

   @xuzifu666 When I tried the below code, it was properly archiving. Can you check below or provide your table/writer configurations.
   
   ```
   fake = Faker()
   data = [{"transactionId": fake.uuid4(), "EventTime": "2014-01-01 23:00:01","storeNbr" : "1",
            "FullName": fake.name(), "Address": fake.address(),
            "CompanyName": fake.company(), "JobTitle": fake.job(),
            "EmailAddress": fake.email(), "PhoneNumber": fake.phone_number(),
            "RandomText": fake.sentence(), "City": "US",
            "State": "NYC", "Country": "US"} for _ in range(5)]
   
   hudi_options = {
       "hoodie.datasource.write.keygenerator.class": "org.apache.hudi.keygen.ComplexKeyGenerator",
       "hoodie.datasource.write.recordkey.field": "transactionId,storeNbr,EventTime",
       "hoodie.datasource.write.precombine.field": "Country",
       "hoodie.table.name": "huditransaction",
       "hoodie.datasource.write.operation" : "insert_overwrite",
       "hoodie.datasource.write.partitionpath.field" : "city"
   }
   
   pandas_df = pd.DataFrame(data)
   df = spark.createDataFrame(pandas_df).withColumn("EventTime", expr("cast(EventTime as timestamp)"))
   
   for i in range(1,100):
       (df.write.format("hudi").options(**hudi_options).mode("append").save(PATH))
   ```
   
   
   <img width="1694" alt="image" src="https://github.com/apache/hudi/assets/63430370/052419d1-2d9e-4d75-b588-fd1c887fee4f">
   


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


Re: [I] [SUPPORT] Insert overwrite with replacement instant cannot execute archive [hudi]

Posted by "ad1happy2go (via GitHub)" <gi...@apache.org>.
ad1happy2go commented on issue #10873:
URL: https://github.com/apache/hudi/issues/10873#issuecomment-2005742951

   Sorry @xuzifu666 . Didn't understood. Do you want to say it should archive or not?


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


Re: [I] [SUPPORT] Insert overwrite with replacement instant cannot execute archive [hudi]

Posted by "xuzifu666 (via GitHub)" <gi...@apache.org>.
xuzifu666 commented on issue #10873:
URL: https://github.com/apache/hudi/issues/10873#issuecomment-2004120534

   > yes there was no commit which was archiving.
   
   Hi, @ad1happy2go this case is alse archived?


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


Re: [I] [SUPPORT] Insert overwrite with replacement instant cannot execute archive [hudi]

Posted by "xuzifu666 (via GitHub)" <gi...@apache.org>.
xuzifu666 commented on issue #10873:
URL: https://github.com/apache/hudi/issues/10873#issuecomment-2020193029

   > Sorry @xuzifu666 . Didn't understood. Do you want to say it should archive or not?
   
   No problem,only want to confirm with you,thanks for your reply. Can close 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


Re: [I] [SUPPORT] Insert overwrite with replacement instant cannot execute archive [hudi]

Posted by "ad1happy2go (via GitHub)" <gi...@apache.org>.
ad1happy2go commented on issue #10873:
URL: https://github.com/apache/hudi/issues/10873#issuecomment-2004127645

   No it's not archiving, But Why you think they should be archived. As all these commits are still valid and should be read in this case, so they should be active only. 


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


Re: [I] [SUPPORT] Insert overwrite with replacement instant cannot execute archive [hudi]

Posted by "xuzifu666 (via GitHub)" <gi...@apache.org>.
xuzifu666 closed issue #10873: [SUPPORT] Insert overwrite with replacement instant cannot execute archive
URL: https://github.com/apache/hudi/issues/10873


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


Re: [I] [SUPPORT] Insert overwrite with replacement instant cannot execute archive [hudi]

Posted by "xuzifu666 (via GitHub)" <gi...@apache.org>.
xuzifu666 commented on issue #10873:
URL: https://github.com/apache/hudi/issues/10873#issuecomment-2004342507

   > No it's not archiving, But Why you think they should be archived. As all these commits are still valid and should be read in this case, so they should be active only.
   
   yes it is not should archive


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


Re: [I] [SUPPORT] Insert overwrite with replacement instant cannot execute archive [hudi]

Posted by "ad1happy2go (via GitHub)" <gi...@apache.org>.
ad1happy2go commented on issue #10873:
URL: https://github.com/apache/hudi/issues/10873#issuecomment-2004095974

   @xuzifu666 In case if you saying this to update above code - 
   
   ```
   for i in range(1,100):
       df = df.withColumn("city", lit(i))
       (df.write.format("hudi").options(**hudi_options).mode("append").save(PATH))
   ```
   
   With above change, yes there was no commit which was archiving. But I am thinking why they will be even archived, as all partitions data will still be valid and all the commits are valid and should be active.
   
   


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


Re: [I] [SUPPORT] Insert overwrite with replacement instant cannot execute archive [hudi]

Posted by "xuzifu666 (via GitHub)" <gi...@apache.org>.
xuzifu666 commented on issue #10873:
URL: https://github.com/apache/hudi/issues/10873#issuecomment-2002776170

   > @xuzifu666 When I tried the below code, it was properly archiving. Can you check below or provide your table/writer configurations.
   > 
   > ```
   > fake = Faker()
   > data = [{"transactionId": fake.uuid4(), "EventTime": "2014-01-01 23:00:01","storeNbr" : "1",
   >          "FullName": fake.name(), "Address": fake.address(),
   >          "CompanyName": fake.company(), "JobTitle": fake.job(),
   >          "EmailAddress": fake.email(), "PhoneNumber": fake.phone_number(),
   >          "RandomText": fake.sentence(), "City": "US",
   >          "State": "NYC", "Country": "US"} for _ in range(5)]
   > 
   > hudi_options = {
   >     "hoodie.datasource.write.keygenerator.class": "org.apache.hudi.keygen.ComplexKeyGenerator",
   >     "hoodie.datasource.write.recordkey.field": "transactionId,storeNbr,EventTime",
   >     "hoodie.datasource.write.precombine.field": "Country",
   >     "hoodie.table.name": "huditransaction",
   >     "hoodie.datasource.write.operation" : "insert_overwrite",
   >     "hoodie.datasource.write.partitionpath.field" : "city"
   > }
   > 
   > pandas_df = pd.DataFrame(data)
   > df = spark.createDataFrame(pandas_df).withColumn("EventTime", expr("cast(EventTime as timestamp)"))
   > 
   > for i in range(1,100):
   >     (df.write.format("hudi").options(**hudi_options).mode("append").save(PATH))
   > ```
   > 
   > <img alt="image" width="1694" src="https://private-user-images.githubusercontent.com/63430370/313497000-052419d1-2d9e-4d75-b588-fd1c887fee4f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTA3MzAwMjUsIm5iZiI6MTcxMDcyOTcyNSwicGF0aCI6Ii82MzQzMDM3MC8zMTM0OTcwMDAtMDUyNDE5ZDEtMmQ5ZS00ZDc1LWI1ODgtZmQxYzg4N2ZlZTRmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzE4VDAyNDIwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMwZWVkZDViYzdlNWI4ZGFkZmViYmM0ZGE3ODExOWQ5YjIzY2IxM2JkZDllOTFiMjc0MTJmZWY4MDM4ZWY2NGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.eweItACh8rn1PMFa5pZKpbZ9_YIeUOuosA7QbClldOM">
   
   @ad1happy2go Hi,you can set partition key 'city' different in range(1,100),it would not archive,please try it again,thanks.


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


Re: [I] [SUPPORT] Insert overwrite with replacement instant cannot execute archive [hudi]

Posted by "xuzifu666 (via GitHub)" <gi...@apache.org>.
xuzifu666 commented on issue #10873:
URL: https://github.com/apache/hudi/issues/10873#issuecomment-2002309506

   @jonvex @ad1happy2go could you look into this 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