thswlsqls opened a new issue, #8607:
URL: https://github.com/apache/paimon/issues/8607

   **Search before asking**
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   **Paimon version**
   master @ 7e396cff8 (2.0-SNAPSHOT)
   
   **Compute Engine**
   Flink
   
   **Minimal reproduce step**
   Run the `migrate_table` (or `migrate_database`) action without the optional 
`--parallelism` argument:
   ```
   <flink> run paimon-flink-action.jar migrate_table \
     --warehouse <warehouse> --source_type hive --table default.T
   ```
   `MigrateTableActionFactory.create()` 
(paimon-flink/paimon-flink-common/.../action/MigrateTableActionFactory.java 
line 44) unconditionally calls `Integer parallelism = 
Integer.parseInt(params.get(PARALLELISM))`. When `--parallelism` is omitted, 
`params.get(PARALLELISM)` is null, so `Integer.parseInt(null)` throws 
`NumberFormatException`. `MigrateDatabaseActionFactory` has the identical bug.
   
   **What doesn't meet your expectations?**
   `--parallelism` is optional: the downstream 
`MigrateTableProcedure`/`MigrateDatabaseProcedure` already treat a null 
parallelism as "use `Runtime.getRuntime().availableProcessors()`". The action 
crashes before ever reaching that logic, and neither factory's `printHelp()` 
even lists `--parallelism`. Sibling factories (`CloneActionFactory`, 
`ExpireSnapshotsActionFactory`) guard optional integers with `params.has(...) ? 
parseInt(...) : null`.
   
   **Anything else?**
   The `--parallelism` handling was added in migrate PR #4177 without the null 
guard; this is an incomplete-fix follow-up.
   
   **Are you willing to submit a PR?**
   - [x] I'm willing to submit a PR!
   


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

Reply via email to