use of com.creditease.uav.invokechain.data.Span in project uavstack by uavorg.
the class InvokeChainDataCollectHandler method handle.
@Override
public void handle(CollectDataFrame frame) {
if (this.log.isDebugEnable()) {
this.log.debug(this, frame.toJSONString());
}
String appUUID = frame.getTarget();
// cm.beginBatch();
BulkRequestBuilder bulkRequest = client.getClient().prepareBulk();
for (Line line : frame.getLines()) {
String content = line.getContent();
Span span = new Span(content);
pushLatestIVCDataToCache(appUUID, span);
pushSpanToBulkRequest(appUUID, frame.getAppgroup(), span, bulkRequest);
}
// cm.submitBatch();
BulkResponse bulkResponse = bulkRequest.get();
if (bulkResponse.hasFailures()) {
log.err(this, "INSERT InvokeChain Data to ES FAIL: " + bulkResponse.buildFailureMessage());
}
}
Aggregations