Skip to content

Commit

Permalink
api path change
Browse files Browse the repository at this point in the history
  • Loading branch information
gnehil committed Aug 9, 2024
1 parent b97a67c commit eb722af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.doris.client;

import org.apache.doris.common.Constants;
import org.apache.doris.common.LoadInfo;
import org.apache.doris.common.ResponseEntity;
import org.apache.doris.common.meta.LoadInfoResponse;
Expand Down Expand Up @@ -67,7 +68,7 @@ public static class FeClient {

public static final String BASE_URL = "http://%s%s";

public static final String INGESTION_LOAD_URL_PATTERN = "/api/ingestion_load/%s/%s";
public static final String INGESTION_LOAD_URL_PATTERN = "/api/ingestion_load/%s/%s/%s";

public static final String CREATE_ACTION = "_create";

Expand Down Expand Up @@ -99,7 +100,7 @@ private String parseAuth(String user, String password) {
public LoadMeta createIngestionLoad(String db, Map<String, List<String>> tableToPartition, String label,
Map<String, String> properties) throws SparkLoadException {
try {
String path = String.format(INGESTION_LOAD_URL_PATTERN, db, CREATE_ACTION);
String path = String.format(INGESTION_LOAD_URL_PATTERN, Constants.DEFAULT_CATALOG, db, CREATE_ACTION);
HttpPost httpPost = new HttpPost();
addCommonHeaders(httpPost);
Map<String, Object> params = new HashMap<>();
Expand Down Expand Up @@ -156,7 +157,7 @@ private String executeRequest(HttpRequestBase req, String apiPath, Map<String, S
public void updateIngestionLoad(String db, Long loadId, Map<String, String> statusInfo)
throws SparkLoadException {

String path = String.format(INGESTION_LOAD_URL_PATTERN, db, UPDATE_ACTION);
String path = String.format(INGESTION_LOAD_URL_PATTERN, Constants.DEFAULT_CATALOG, db, UPDATE_ACTION);
HttpPost httpPost = new HttpPost();
addCommonHeaders(httpPost);
Map<String, Object> params = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ public interface Constants {
String HADOOP_KERBEROS_PRINCIPAL = "hadoop.kerberos.principal";
String HADOOP_KERBEROS_KEYTAB = "hadoop.kerberos.keytab";

String DEFAULT_CATALOG = "internal";

}

0 comments on commit eb722af

Please sign in to comment.