in src/main/java/org/apache/doris/kafka/connector/converter/schema/SchemaChangeManager.java [159:178]
private Map<String, Object> handleResponse(HttpUriRequest request, String responseEntity) {
try (CloseableHttpClient httpclient = HttpClients.createDefault()) {
CloseableHttpResponse response = httpclient.execute(request);
final int statusCode = response.getStatusLine().getStatusCode();
final String reasonPhrase = response.getStatusLine().getReasonPhrase();
if (statusCode == HTTP_OK && response.getEntity() != null) {
responseEntity = EntityUtils.toString(response.getEntity());
return objectMapper.readValue(responseEntity, Map.class);
} else {
throw new SchemaChangeException(
"Failed to schemaChange, status: "
+ statusCode
+ ", reason: "
+ reasonPhrase);
}
} catch (Exception e) {
LOG.error("SchemaChange request error,", e);
throw new SchemaChangeException("SchemaChange request error with " + e.getMessage());
}
}