use of com.navercorp.pinpoint.collector.cluster.route.StreamEvent in project pinpoint by naver.
the class ClusterPointRouter method handleStreamRouteCreate.
private StreamCode handleStreamRouteCreate(TCommandTransfer request, StreamCreatePacket packet, ServerStreamChannelContext streamChannelContext) {
byte[] payload = ((TCommandTransfer) request).getPayload();
TBase<?, ?> command = deserialize(payload);
if (command == null) {
return StreamCode.TYPE_UNKNOWN;
}
TCommandTransferResponse response = streamRouteHandler.onRoute(new StreamEvent((TCommandTransfer) request, streamChannelContext, command));
TRouteResult routeResult = response.getRouteResult();
if (routeResult != TRouteResult.OK) {
logger.warn("handleStreamRouteCreate failed. command:{}, routeResult:{}", command, routeResult);
return convertToStreamCode(routeResult);
}
return StreamCode.OK;
}
Aggregations