private static FairSchedulerProtocol createClient ( String target , Configuration conf ) throws IOException { InetSocketAddress addr = NetUtils . createSocketAddr ( target ) ; UserGroupInformation ugi = UserGroupInformation . getCurrentUGI ( ) ; LOG . info ( "Connecting to " + addr ) ; return ( FairSchedulerProtocol ) RPC . getProxy ( FairSchedulerProtocol . class , FairSchedulerProtocol . versionID , addr , ugi , conf , NetUtils . getSocketFactory ( conf , FairSchedulerProtocol . class ) ) ; }
Create a FariScheduler RPC client