pramodbiligiri commented on PR #7868:
URL: https://github.com/apache/hudi/pull/7868#issuecomment-1422276111
Added support for showing inflight restores. Below CLI session demonstrates
all the use cases of this overall feature:
hudi-cli> connect --path
/tmp/junit1696417734320078758/TestRestoresCommand_test_table/
Metadata for table TestRestoresCommand_test_table loaded
hudi:TestRestoresCommand_test_table->show restores
```
╔═══════════════════╤══════════════════╤══════════════════════╤═══════════════╗
║ Instant │ Restored Instant │ Time taken in millis │ Restore
State ║
╠═══════════════════╪══════════════════╪══════════════════════╪═══════════════╣
║ 20230208132601135 │ 103 │ 2802 │ COMPLETED
║
╚═══════════════════╧══════════════════╧══════════════════════╧═══════════════╝
```
hudi:TestRestoresCommand_test_table-> show restores --inflight
```
╔═══════════════════╤══════════════════╤══════════════════════╤═══════════════╗
║ Instant │ Restored Instant │ Time taken in millis │ Restore
State ║
╠═══════════════════╪══════════════════╪══════════════════════╪═══════════════╣
║ 20230208132601135 │ 103 │ 2802 │ COMPLETED
║
╟───────────────────┼──────────────────┼──────────────────────┼───────────────╢
║ 20230208132612262 │ 106 │ │ INFLIGHT
║
╚═══════════════════╧══════════════════╧══════════════════════╧═══════════════╝
```
You can validate the above two CLI outputs by looking at the file listing
below:
$ ls -tl
/tmp/junit1696417734320078758/TestRestoresCommand_test_table/.hoodie/
```
0 Feb 8 13:26 20230208132612262.restore.inflight
631 Feb 8 13:26 20230208132612262.restore.requested
2106 Feb 8 13:26 20230208132601135.restore
0 Feb 8 13:26 20230208132601135.restore.inflight
631 Feb 8 13:26 20230208132601135.restore.requested
```
After finishing the restores, both are shown as COMPLETED as seen below:
hudi:TestRestoresCommand_test_table->show restores --inflight
```
╔═══════════════════╤══════════════════╤══════════════════════╤═══════════════╗
║ Instant │ Restored Instant │ Time taken in millis │ Restore
State ║
╠═══════════════════╪══════════════════╪══════════════════════╪═══════════════╣
║ 20230208132601135 │ 103 │ 2802 │ COMPLETED
║
╟───────────────────┼──────────────────┼──────────────────────┼───────────────╢
║ 20230208132612262 │ 106 │ 371157 │ COMPLETED
║
╚═══════════════════╧══════════════════╧══════════════════════╧═══════════════╝
```
Details for a single COMPLETED restore:
hudi:TestRestoresCommand_test_table->show restore --instant 20230208132601135
```
╔═══════════════════╤══════════════════╤══════════════════════╤═══════════════╗
║ Instant │ Restored Instant │ Time taken in millis │ Restore
State ║
╠═══════════════════╪══════════════════╪══════════════════════╪═══════════════╣
║ 20230208132601135 │ 103 │ 2802 │ COMPLETED
║
╚═══════════════════╧══════════════════╧══════════════════════╧═══════════════╝
```
Drawn from a different run: Details for a single INFLIGHT restore:
hudi:TestRestoresCommand_test_table->show restore --instant 20230208133608462
```
╔═══════════════════╤══════════════════╤══════════════════════╤═══════════════╗
║ Instant │ Restored Instant │ Time taken in millis │ Restore
State ║
╠═══════════════════╪══════════════════╪══════════════════════╪═══════════════╣
║ 20230208133608462 │ 103 │ │ INFLIGHT
║
╚═══════════════════╧══════════════════╧══════════════════════╧═══════════════╝
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]