fx19880617 opened a new pull request #5305: URL: https://github.com/apache/incubator-pinot/pull/5305
Fix the issue that `pinot-admin.sh` only return message for success request, not for failed request. Current: ``` bin/pinot-admin.sh AddTable -tableConfigFile /Users/xiangfu/workspace/incubator-pinot/quickStartData1587879675942/baseballStats_offline_table_config.json -schemaFile /Users/xiangfu/workspace/incubator-pinot/quickStartData1587879675942/baseballStats_schema.json -controllerHost 127.0.0.1 -controllerPort 9000 -exec Executing command: AddTable -tableConfigFile /Users/xiangfu/workspace/incubator-pinot/quickStartData1587879675942/baseballStats_offline_table_config.json -schemaFile /Users/xiangfu/workspace/incubator-pinot/quickStartData1587879675942/baseballStats_schema.json -controllerHost 127.0.0.1 -controllerPort 9000 -exec Sending request: http://127.0.0.1:9000/schemas to controller: localhost, version: Unknown Exception caught: java.io.IOException: Server returned HTTP response code: 409 for URL: http://127.0.0.1:9000/tables at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900) ~[?:1.8.0_232] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) ~[?:1.8.0_232] at org.apache.pinot.tools.admin.command.AbstractBaseAdminCommand.sendRequest(AbstractBaseAdminCommand.java:85) ~[pinot-all-0.4.0-SNAPSHOT-jar-with-dependencies.jar:0.4.0-SNAPSHOT-80a943501464d983396ae935b1ca7061d94ade37] at org.apache.pinot.tools.admin.command.AbstractBaseAdminCommand.sendPostRequest(AbstractBaseAdminCommand.java:63) ~[pinot-all-0.4.0-SNAPSHOT-jar-with-dependencies.jar:0.4.0-SNAPSHOT-80a943501464d983396ae935b1ca7061d94ade37] at org.apache.pinot.tools.admin.command.AddTableCommand.sendTableCreationRequest(AddTableCommand.java:138) ~[pinot-all-0.4.0-SNAPSHOT-jar-with-dependencies.jar:0.4.0-SNAPSHOT-80a943501464d983396ae935b1ca7061d94ade37] at org.apache.pinot.tools.admin.command.AddTableCommand.execute(AddTableCommand.java:163) ~[pinot-all-0.4.0-SNAPSHOT-jar-with-dependencies.jar:0.4.0-SNAPSHOT-80a943501464d983396ae935b1ca7061d94ade37] at org.apache.pinot.tools.admin.PinotAdministrator.execute(PinotAdministrator.java:158) [pinot-all-0.4.0-SNAPSHOT-jar-with-dependencies.jar:0.4.0-SNAPSHOT-80a943501464d983396ae935b1ca7061d94ade37] at org.apache.pinot.tools.admin.PinotAdministrator.main(PinotAdministrator.java:170) [pinot-all-0.4.0-SNAPSHOT-jar-with-dependencies.jar:0.4.0-SNAPSHOT-80a943501464d983396ae935b1ca7061d94ade37] ``` After fix: ``` ➜ bin/pinot-admin.sh AddTable -tableConfigFile /Users/xiangfu/workspace/incubator-pinot/quickStartData1587879675942/baseballStats_offline_table_config.json -schemaFile /Users/xiangfu/workspace/incubator-pinot/quickStartData1587879675942/baseballStats_schema.json -controllerHost 127.0.0.1 -controllerPort 9000 -exec Executing command: AddTable -tableConfigFile /Users/xiangfu/workspace/incubator-pinot/quickStartData1587879675942/baseballStats_offline_table_config.json -schemaFile /Users/xiangfu/workspace/incubator-pinot/quickStartData1587879675942/baseballStats_schema.json -controllerHost 127.0.0.1 -controllerPort 9000 -exec Sending request: http://127.0.0.1:9000/schemas to controller: localhost, version: Unknown {"code":409,"error":"Table baseballStats1_OFFLINE already exists"} ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
