Commit 81c0cca1 authored by liaozan's avatar liaozan 🏀

Add log for starrocks

parent 37995567
...@@ -28,17 +28,26 @@ public class StarrocksStreamLoadHandler { ...@@ -28,17 +28,26 @@ public class StarrocksStreamLoadHandler {
} }
public <T> void upsertBatch(List<T> entityList, List<String> columns) { public <T> void upsertBatch(List<T> entityList, List<String> columns) {
log.info("Starrocks upsert, dataSize: {}, sample data: {}", entityList.size(), entityList.get(0));
String content = JacksonUtils.toJsonString(entityList); String content = JacksonUtils.toJsonString(entityList);
String upsertResult = createUpsertRequest(content, columns).execute().body(); String upsertResult = createUpsertRequest(content, columns).execute().body();
log.debug("Starrocks streamLoad upsert result: {}", upsertResult);
if (log.isDebugEnabled()) {
log.debug("Starrocks streamLoad upsert result: {}", upsertResult);
}
checkResponse(upsertResult); checkResponse(upsertResult);
} }
public <T> void deleteBatch(List<T> entityList) { public <T> void deleteBatch(List<T> entityList) {
log.info("Starrocks delete, dataSize: {}, sample data: {}", entityList.size(), entityList.get(0));
String content = JacksonUtils.toJsonString(entityList); String content = JacksonUtils.toJsonString(entityList);
String deleteResult = createCommonRequest(content).header("columns", "__op='delete'").execute().body(); String deleteResult = createCommonRequest(content).header("columns", "__op='delete'").execute().body();
log.debug("Starrocks streamLoad delete result: {}", deleteResult);
if (log.isDebugEnabled()) {
log.debug("Starrocks streamLoad delete result: {}", deleteResult);
}
checkResponse(deleteResult); checkResponse(deleteResult);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment