mirror of
https://github.com/alibaba/DataX.git
synced 2025-05-03 05:50:21 +08:00
format stream load response message
This commit is contained in:
parent
f6d21f112d
commit
b6a1fe153e
@ -61,18 +61,18 @@ public class DorisStreamLoadObserver {
|
|||||||
.toString();
|
.toString();
|
||||||
LOG.info("Start to join batch data: rows[{}] bytes[{}] label[{}].", data.getRows().size(), data.getBytes(), data.getLabel());
|
LOG.info("Start to join batch data: rows[{}] bytes[{}] label[{}].", data.getRows().size(), data.getBytes(), data.getLabel());
|
||||||
Map<String, Object> loadResult = put(loadUrl, data.getLabel(), addRows(data.getRows(), data.getBytes().intValue()));
|
Map<String, Object> loadResult = put(loadUrl, data.getLabel(), addRows(data.getRows(), data.getBytes().intValue()));
|
||||||
LOG.info("StreamLoad response :{}",JSON.toJSONString(loadResult));
|
LOG.info("StreamLoad response :{}",JSON.toJSONString(loadResult, JSONWriter.Feature.PrettyFormat));
|
||||||
final String keyStatus = "Status";
|
final String keyStatus = "Status";
|
||||||
if (null == loadResult || !loadResult.containsKey(keyStatus)) {
|
if (null == loadResult || !loadResult.containsKey(keyStatus)) {
|
||||||
throw new IOException("Unable to flush data to Doris: unknown result status.");
|
throw new IOException("Unable to flush data to Doris: unknown result status.");
|
||||||
}
|
}
|
||||||
LOG.debug("StreamLoad response:{}",JSON.toJSONString(loadResult));
|
LOG.debug("StreamLoad response:{}",JSON.toJSONString(loadResult, JSONWriter.Feature.PrettyFormat));
|
||||||
if (RESULT_FAILED.equals(loadResult.get(keyStatus))) {
|
if (RESULT_FAILED.equals(loadResult.get(keyStatus))) {
|
||||||
throw new IOException(
|
throw new IOException(
|
||||||
new StringBuilder("Failed to flush data to Doris.\n").append(JSON.toJSONString(loadResult)).toString()
|
new StringBuilder("Failed to flush data to Doris.\n").append(JSON.toJSONString(loadResult)).toString()
|
||||||
);
|
);
|
||||||
} else if (RESULT_LABEL_EXISTED.equals(loadResult.get(keyStatus))) {
|
} else if (RESULT_LABEL_EXISTED.equals(loadResult.get(keyStatus))) {
|
||||||
LOG.debug("StreamLoad response:{}",JSON.toJSONString(loadResult));
|
LOG.debug("StreamLoad response:{}",JSON.toJSONString(loadResult, JSONWriter.Feature.PrettyFormat));
|
||||||
checkStreamLoadState(host, data.getLabel());
|
checkStreamLoadState(host, data.getLabel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user