public static TopologyMaster . ExceptionLogResponse toProtobuf ( ExceptionResponse response ) { TopologyMaster . ExceptionLogResponse . Builder builder = TopologyMaster . ExceptionLogResponse . newBuilder ( ) ; // default OK if we have response to build already builder . setStatus ( Common . Status . newBuilder ( ) . setStatus ( Common . StatusCode . OK ) ) ; for ( ExceptionDatum e : response . getExceptionDatapointList ( ) ) { TopologyMaster . TmasterExceptionLog . Builder exceptionBuilder = TopologyMaster . TmasterExceptionLog . newBuilder ( ) ; // ExceptionDatapoint exceptionBuilder . setComponentName ( e . getComponentName ( ) ) ; exceptionBuilder . setHostname ( e . getHostname ( ) ) ; exceptionBuilder . setInstanceId ( e . getInstanceId ( ) ) ; // ExceptionData exceptionBuilder . setStacktrace ( e . getStackTrace ( ) ) ; exceptionBuilder . setLasttime ( e . getLastTime ( ) ) ; exceptionBuilder . setFirsttime ( e . getFirstTime ( ) ) ; exceptionBuilder . setCount ( e . getCount ( ) ) ; exceptionBuilder . setLogging ( e . getLogging ( ) ) ; builder . addExceptions ( exceptionBuilder ) ; } return builder . build ( ) ; }
compatible with org . apache . heron . proto . tmaster . TopologyMaster . ExceptionLogResponse