public static EvaluatorDescriptorInfo toEvaluatorDescriptorInfo ( final EvaluatorDescriptor descriptor ) { if ( descriptor == null ) { return null ; } EvaluatorDescriptorInfo . NodeDescriptorInfo nodeDescriptorInfo = descriptor . getNodeDescriptor ( ) == null ? null : EvaluatorDescriptorInfo . NodeDescriptorInfo . newBuilder ( ) . setHostName ( descriptor . getNodeDescriptor ( ) . getName ( ) ) . setId ( descriptor . getNodeDescriptor ( ) . getId ( ) ) . setIpAddress ( descriptor . getNodeDescriptor ( ) . getInetSocketAddress ( ) . getAddress ( ) . getHostAddress ( ) ) . setPort ( descriptor . getNodeDescriptor ( ) . getInetSocketAddress ( ) . getPort ( ) ) . setRackName ( descriptor . getNodeDescriptor ( ) . getRackDescriptor ( ) == null ? "" : descriptor . getNodeDescriptor ( ) . getRackDescriptor ( ) . getName ( ) ) . build ( ) ; return EvaluatorDescriptorInfo . newBuilder ( ) . setCores ( descriptor . getNumberOfCores ( ) ) . setMemory ( descriptor . getMemory ( ) ) . setRuntimeName ( descriptor . getRuntimeName ( ) ) . setNodeDescriptorInfo ( nodeDescriptorInfo ) . build ( ) ; }
Create an evaluator descriptor info from an EvalautorDescriptor object .