You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "jerry-024 (via GitHub)" <gi...@apache.org> on 2025/06/05 03:13:37 UTC
[PR] [core]fix: rest catalog options uri schema is empty [paimon]
jerry-024 opened a new pull request, #5695:
URL: https://github.com/apache/paimon/pull/5695
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #xxx
<!-- What is the purpose of the change -->
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core]fix: rest catalog options uri schema could be empty [paimon]
Posted by "jerry-024 (via GitHub)" <gi...@apache.org>.
jerry-024 closed pull request #5695: [core]fix: rest catalog options uri schema could be empty
URL: https://github.com/apache/paimon/pull/5695
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core]fix: rest catalog options uri schema could be empty [paimon]
Posted by "jerry-024 (via GitHub)" <gi...@apache.org>.
jerry-024 commented on code in PR #5695:
URL: https://github.com/apache/paimon/pull/5695#discussion_r2128256175
##########
paimon-api/src/main/java/org/apache/paimon/rest/HttpClient.java:
##########
@@ -171,8 +180,7 @@ public <T extends RESTResponse> T delete(
}
@VisibleForTesting
- protected static String getRequestUrl(
- String uri, String path, Map<String, String> queryParams) {
+ protected String getRequestUrl(String path, Map<String, String> queryParams) {
Review Comment:
As we will check url when init client. So here just use client's uri.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core]fix: rest catalog options uri schema could be empty [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #5695:
URL: https://github.com/apache/paimon/pull/5695
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core]fix: rest catalog options uri schema could be empty [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #5695:
URL: https://github.com/apache/paimon/pull/5695#discussion_r2128167156
##########
paimon-api/src/main/java/org/apache/paimon/rest/HttpClient.java:
##########
@@ -173,6 +182,9 @@ public <T extends RESTResponse> T delete(
@VisibleForTesting
protected static String getRequestUrl(
String uri, String path, Map<String, String> queryParams) {
+ if (!uri.startsWith("http://") && !uri.startsWith("https://")) {
Review Comment:
We don't need this check.
##########
paimon-api/src/main/java/org/apache/paimon/rest/HttpClient.java:
##########
@@ -68,11 +68,20 @@ public class HttpClient implements RESTClient {
private ErrorHandler errorHandler;
public HttpClient(String uri) {
- if (uri != null && uri.endsWith("/")) {
- this.uri = uri.substring(0, uri.length() - 1);
+ String serverUri;
+ if (StringUtils.isNotEmpty(uri)) {
+ if (uri.endsWith("/")) {
+ serverUri = uri.substring(0, uri.length() - 1);
+ } else {
+ serverUri = uri;
+ }
+ if (!uri.startsWith("http://") && !uri.startsWith("https://")) {
+ serverUri = String.format("http://%s", serverUri);
+ }
} else {
- this.uri = uri;
+ throw new IllegalArgumentException("uri is empty which must be define");
Review Comment:
be defined?
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org