Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[KYUUBI #5761] Pretty ProcBuilder generated command
# 🔍 Description ## Issue References 🔗 This PR aims to pretty the generated commands by `ProcBuilder`. ## Describe Your Solution 🔧 Optimized the format rules. ## Types of changes 🔖 - [x] Improvement (non-breaking change) - [ ] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ Example with generated Hive engine bootstrap command: ``` 00:44:48.326 KyuubiSessionManager-exec-pool: Thread-42 INFO EngineRef: Launching engine: /home/chengpan/.sdkman/candidates/java/current/bin/java -Xmx1g -cp /home/chengpan/Projects/apache-kyuubi/externals/kyuubi-hive-sql-engine/target/kyuubi-hive-sql-engine_2.12-1.9.0-SNAPSHOT.jar:/home/chengpan/app/apache-hive-2.3.9-bin/conf:/home/chengpan/app/apache-hive-2.3.9-bin/lib/*:/home/chengpan/Projects/apa che-kyuubi/externals/kyuubi-hive-sql-engine/target/scala-2.12/jars/* org.apache.kyuubi.engine.hive.HiveSQLEngine --conf kyuubi.session.user=chengpanproxy --conf kyuubi.engine.id=991b68ac-11fe-4e0e-a043-7c8c8e1fb761 --conf hadoop.proxyuser.chengpan.groups=* --conf hadoop.proxyuser.chengpan.hosts=* --conf hive.engine.name=kyuubi_CONNECTION_HIVE_SQL_chengpanproxy_991b68ac-11fe-4e0e-a043-7c8c8e1fb761 --conf hive.server2.proxy.user=chengpanproxy --conf hive.server2.thrift.resultset.default.fetch.size=1000 --conf javax.jdo.option.ConnectionURL=jdbc:derby:;databaseName=/home/chengpan/Projects/apache-kyuubi/integration-tests/kyuubi-hive-it/target/tmp/KyuubiOperationHiveEnginePerConnectionSuite-67853d06-09da-4c39-8a3c-41315119a1f7;create=true --conf kyuubi.client.ipAddress=127.0.1.1 --conf kyuubi.client.version=1.9.0-SNAPSHOT --conf kyuubi.engine.credentials=SERUUwAAAA== --conf kyuubi.engine.operation.log.dir.root=target/engine_operation_logs --conf kyuubi.engine.share.level=connection --conf kyuubi.engine.submit.time=1700757888303 --conf kyuubi.engine.type=HIVE_SQL --conf kyuubi.engineEnv.KYUUBI_HOME=/home/chengpan/Projects/apache-kyuubi/ --conf kyuubi.frontend.protocols=THRIFT_BINARY --conf kyuubi.ha.addresses=10.221.99.150:42613 --conf kyuubi.ha.engine.ref.id=991b68ac-11fe-4e0e-a043-7c8c8e1fb761 --conf kyuubi.ha.namespace=/kyuubi_1.9.0-SNAPSHOT_CONNECTION_HIVE_SQL/chengpanproxy/991b68ac-11fe-4e0e-a043-7c8c8e1fb761 --conf kyuubi.ha.zookeeper.auth.type=NONE --conf kyuubi.ha.zookeeper.connection.retry.policy=ONE_TIME --conf kyuubi.metrics.json.location=/home/chengpan/Projects/apache-kyuubi/integration-tests/kyuubi-hive-it/target/metrics --conf kyuubi.server.ipAddress=127.0.0.1 --conf kyuubi.session.connection.url=localhost:38775 --conf kyuubi.session.engine.check.interval=PT1S --conf kyuubi.session.engine.idle.timeout=PT30S --conf kyuubi.session.real.user=chengpan --conf kyuubi.zookeeper.embedded.client.port=0 --conf kyuubi.zookeeper.embedded.data.dir=/home/chengpan/Projects/apache-kyuubi/integration-tests/kyuubi-hive-it/target/tmp/kyuubi-b343702d-5e9a-49e8-81db-4c7b6b2da270 --conf spark.sql.catalogImplementation=in-memory --conf spark.ui.enabled=false ``` #### Behavior With This Pull Request 🎉 Example with generated Hive engine bootstrap command: ``` 00:33:08.584 KyuubiSessionManager-exec-pool: Thread-42 INFO EngineRef: Launching engine: /home/chengpan/.sdkman/candidates/java/current/bin/java \ -Xmx1g \ -cp /home/chengpan/Projects/apache-kyuubi/externals/kyuubi-hive-sql-engine/target/kyuubi-hive-sql-engine_2.12-1.9.0-SNAPSHOT.jar:/home/chengpan/app/apache-hive-2.3.9-bin/conf:/home/chengpan/app/apache-hive-2.3.9-bin/lib/*:/home/chengpan/Projects/apache-kyuubi/externals/kyuubi-hive-sql-engine/target/scala-2.12/jars/* org.apache.kyuubi.engine.hive.HiveSQLEngine \ --conf kyuubi.session.user=chengpanproxy \ --conf kyuubi.engine.id=4c4e090a-04fc-479c-9e95-b2484c073eff \ --conf hadoop.proxyuser.chengpan.groups=* \ --conf hadoop.proxyuser.chengpan.hosts=* \ --conf hive.engine.name=kyuubi_CONNECTION_HIVE_SQL_chengpanproxy_4c4e090a-04fc-479c-9e95-b2484c073eff \ --conf hive.server2.proxy.user=chengpanproxy \ --conf hive.server2.thrift.resultset.default.fetch.size=1000 \ --conf javax.jdo.option.ConnectionURL=jdbc:derby:;databaseName=/home/chengpan/Projects/apache-kyuubi/integration-tests/kyuubi-hive-it/target/tmp/KyuubiOperationHiveEnginePerConnectionSuite-a2c9b027-42a5-4dc3-a2ce-021bc7046dda;create=true \ --conf kyuubi.client.ipAddress=127.0.1.1 \ --conf kyuubi.client.version=1.9.0-SNAPSHOT \ --conf kyuubi.engine.credentials=SERUUwAAAA== \ --conf kyuubi.engine.operation.log.dir.root=target/engine_operation_logs \ --conf kyuubi.engine.share.level=connection \ --conf kyuubi.engine.submit.time=1700757188556 \ --conf kyuubi.engine.type=HIVE_SQL \ --conf kyuubi.engineEnv.KYUUBI_HOME=/home/chengpan/Projects/apache-kyuubi/ \ --conf kyuubi.frontend.protocols=THRIFT_BINARY \ --conf kyuubi.ha.addresses=10.221.99.150:38083 \ --conf kyuubi.ha.engine.ref.id=4c4e090a-04fc-479c-9e95-b2484c073eff \ --conf kyuubi.ha.namespace=/kyuubi_1.9.0-SNAPSHOT_CONNECTION_HIVE_SQL/chengpanproxy/4c4e090a-04fc-479c-9e95-b2484c073eff \ --conf kyuubi.ha.zookeeper.auth.type=NONE \ --conf kyuubi.ha.zookeeper.connection.retry.policy=ONE_TIME \ --conf kyuubi.metrics.json.location=/home/chengpan/Projects/apache-kyuubi/integration-tests/kyuubi-hive-it/target/metrics \ --conf kyuubi.server.ipAddress=127.0.0.1 \ --conf kyuubi.session.connection.url=localhost:38545 \ --conf kyuubi.session.engine.check.interval=PT1S \ --conf kyuubi.session.engine.idle.timeout=PT30S \ --conf kyuubi.session.real.user=chengpan \ --conf kyuubi.zookeeper.embedded.client.port=0 \ --conf kyuubi.zookeeper.embedded.data.dir=/home/chengpan/Projects/apache-kyuubi/integration-tests/kyuubi-hive-it/target/tmp/kyuubi-1f99fdd6-c042-4377-a320-b056139cada1 \ --conf spark.sql.catalogImplementation=in-memory \ --conf spark.ui.enabled=false ``` #### Related Unit Tests See code diff. --- # Checklists ## 📝 Author Self Checklist - [x] My code follows the [style guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html) of this project - [x] I have performed a self-review - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) ## 📝 Committer Pre-Merge Checklist - [ ] Pull request title is okay. - [ ] No license issues. - [ ] Milestone correctly set? - [ ] Test coverage is ok - [ ] Assignees are selected. - [ ] Minimum number of approvals - [ ] No changes are requested **Be nice. Be informative.** Closes #5761 from pan3793/pretty-cmd. Closes #5761 e8d830b [Cheng Pan] Pretty ProcBuilder generated command Authored-by: Cheng Pan <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
- Loading branch information