[
https://issues.apache.org/jira/browse/HUDI-3161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Forward Xu updated HUDI-3161:
-----------------------------
Description:
example
{code:java}
// code placeholder
# Produce1
call show_commits_metadata(table => 'test_hudi_table');
commit_time action partition file_id previous_commit num_writes
num_inserts num_deletes num_update_writes total_errors
total_log_blocks total_corrupt_logblocks total_rollback_blocks
total_log_records total_updated_records_compacted total_bytes_written
20220109225319449 commit dt=2021-05-03
d0073a12-085d-4f49-83e9-402947e7e90a-0 null 1 1 0 0
0 0 0 0 0 0 435349
20220109225311742 commit dt=2021-05-02
b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0 20220109214830592 1 1
0 0 0 0 0 0 0 0 435340
20220109225301429 commit dt=2021-05-01
0d7298b3-6b55-4cff-8d7d-b0772358b78a-0 20220109214830592 1 1
0 0 0 0 0 0 0 0 435340
20220109214830592 commit dt=2021-05-01
0d7298b3-6b55-4cff-8d7d-b0772358b78a-0 20220109191631015 0 0
1 0 0 0 0 0 0 0 432653
20220109214830592 commit dt=2021-05-02
b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0 20220109191648181 0 0
1 0 0 0 0 0 0 0 432653
20220109191648181 commit dt=2021-05-02
b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0 null 1 1 0 0
0 0 0 0 0 0 435341
20220109191631015 commit dt=2021-05-01
0d7298b3-6b55-4cff-8d7d-b0772358b78a-0 null 1 1 0 0
0 0 0 0 0 0 435341
Time taken: 0.844 seconds, Fetched 7 row(s)
# Produce2
call rollback_to_instant(table => 'test_hudi_table', instant_time =>
'20220109225319449');
rollback_result
true
Time taken: 5.038 seconds, Fetched 1 row(s)
{code}
was:
example
{code:java}
// code placeholder
# Produce1
call call show_commits(table => 'test_hudi_table');
commit_time total_bytes_written total_files_added
total_files_updated total_partitions_written total_records_written
total_update_records_written total_errors
20220109225319449 435349 1 0 1 1 0 0
20220109225311742 435340 0 1 1 1 0 0
20220109225301429 435340 0 1 1 1 0 0
20220109214830592 865306 0 2 2 0 0 0
20220109191648181 435341 1 0 1 1 0 0
20220109191631015 435341 1 0 1 1 0 0
Time taken: 0.141 seconds, Fetched 6 row(s)
# Produce2
call show_commits_metadata(table => 'test_hudi_table');
commit_time action partition file_id previous_commit num_writes
num_inserts num_deletes num_update_writes total_errors
total_log_blocks total_corrupt_logblocks total_rollback_blocks
total_log_records total_updated_records_compacted total_bytes_written
20220109225319449 commit dt=2021-05-03
d0073a12-085d-4f49-83e9-402947e7e90a-0 null 1 1 0 0
0 0 0 0 0 0 435349
20220109225311742 commit dt=2021-05-02
b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0 20220109214830592 1 1
0 0 0 0 0 0 0 0 435340
20220109225301429 commit dt=2021-05-01
0d7298b3-6b55-4cff-8d7d-b0772358b78a-0 20220109214830592 1 1
0 0 0 0 0 0 0 0 435340
20220109214830592 commit dt=2021-05-01
0d7298b3-6b55-4cff-8d7d-b0772358b78a-0 20220109191631015 0 0
1 0 0 0 0 0 0 0 432653
20220109214830592 commit dt=2021-05-02
b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0 20220109191648181 0 0
1 0 0 0 0 0 0 0 432653
20220109191648181 commit dt=2021-05-02
b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0 null 1 1 0 0
0 0 0 0 0 0 435341
20220109191631015 commit dt=2021-05-01
0d7298b3-6b55-4cff-8d7d-b0772358b78a-0 null 1 1 0 0
0 0 0 0 0 0 435341
Time taken: 0.844 seconds, Fetched 7 row(s)
# Produce3
call rollback_to_instant(table => 'test_hudi_table', instant_time =>
'20220109225319449');
rollback_result
true
Time taken: 5.038 seconds, Fetched 1 row(s)
{code}
> Add Call Produce Command for spark sql
> --------------------------------------
>
> Key: HUDI-3161
> URL: https://issues.apache.org/jira/browse/HUDI-3161
> Project: Apache Hudi
> Issue Type: New Feature
> Components: Spark Integration
> Reporter: Forward Xu
> Assignee: Forward Xu
> Priority: Major
> Labels: pull-request-available
>
> example
> {code:java}
> // code placeholder
> # Produce1
> call show_commits_metadata(table => 'test_hudi_table');
> commit_time action partition file_id previous_commit num_writes
> num_inserts num_deletes num_update_writes total_errors
> total_log_blocks total_corrupt_logblocks total_rollback_blocks
> total_log_records total_updated_records_compacted total_bytes_written
> 20220109225319449 commit dt=2021-05-03
> d0073a12-085d-4f49-83e9-402947e7e90a-0 null 1 1 0 0
> 0 0 0 0 0 0 435349
> 20220109225311742 commit dt=2021-05-02
> b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0 20220109214830592 1 1
> 0 0 0 0 0 0 0 0 435340
> 20220109225301429 commit dt=2021-05-01
> 0d7298b3-6b55-4cff-8d7d-b0772358b78a-0 20220109214830592 1 1
> 0 0 0 0 0 0 0 0 435340
> 20220109214830592 commit dt=2021-05-01
> 0d7298b3-6b55-4cff-8d7d-b0772358b78a-0 20220109191631015 0 0
> 1 0 0 0 0 0 0 0 432653
> 20220109214830592 commit dt=2021-05-02
> b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0 20220109191648181 0 0
> 1 0 0 0 0 0 0 0 432653
> 20220109191648181 commit dt=2021-05-02
> b3b32bac-8a44-4c4d-b433-0cb1bf620f23-0 null 1 1 0 0
> 0 0 0 0 0 0 435341
> 20220109191631015 commit dt=2021-05-01
> 0d7298b3-6b55-4cff-8d7d-b0772358b78a-0 null 1 1 0 0
> 0 0 0 0 0 0 435341
> Time taken: 0.844 seconds, Fetched 7 row(s)
> # Produce2
> call rollback_to_instant(table => 'test_hudi_table', instant_time =>
> '20220109225319449');
> rollback_result
> true
> Time taken: 5.038 seconds, Fetched 1 row(s)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)