private static Properties loadClientProperties ( List < ConfigProperty > properties , BiFunction < PropertyKey , String , String > logMessage ) { Properties props = new Properties ( ) ; for ( ConfigProperty property : properties ) { String name = property . getName ( ) ; // TODO(binfan): support propagating unsetting properties from master if ( PropertyKey . isValid ( name ) && property . hasValue ( ) ) { PropertyKey key = PropertyKey . fromString ( name ) ; if ( ! GrpcUtils . contains ( key . getScope ( ) , Scope . CLIENT ) ) { // Only propagate client properties. continue ; } String value = property . getValue ( ) ; props . put ( key , value ) ; LOG . debug ( logMessage . apply ( key , value ) ) ; } } return props ; }
Loads client scope properties from the property list returned by grpc .