Java Code Examples for org.apache.hadoop.yarn.api.impl.pb.service.ApplicationMasterProtocolPBServiceImpl

Following code examples demonstrate how to use org.apache.hadoop.yarn.api.impl.pb.service.ApplicationMasterProtocolPBServiceImpl from hadoop. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.apache.hadoop.yarn.api.impl.pb.service.ApplicationMasterProtocolPBServiceImpl and various code implementation of this class.
Example 1
Project : hadoop Source File : DistributedSchedulingService.java View Source Code on GitHub

  @Override
  public Server getServer(YarnRPC rpc, Configuration serverConf,
      InetSocketAddress addr, AMRMTokenSecretManager secretManager) {
    Server server = rpc.getServer(DistributedSchedulerProtocol.class, this,
        addr, serverConf, secretManager,
        serverConf.getInt(YarnConfiguration.RM_SCHEDULER_CLIENT_THREAD_COUNT,
            YarnConfiguration.DEFAULT_RM_SCHEDULER_CLIENT_THREAD_COUNT));
    ((RPC.Server) server).addProtocol(RPC.RpcKind.RPC_PROTOCOL_BUFFER,
        ApplicationMasterProtocolPB.class,
        ApplicationMasterProtocolService.newReflectiveBlockingService(
            new ApplicationMasterProtocolPBServiceImpl(this)));
    return server;
  }
			
Example 2
Project : hadoop Source File : OpportunisticContainerAllocatorAMService.java View Source Code on GitHub

  @Override
  public Server getServer(YarnRPC rpc, Configuration serverConf,
      InetSocketAddress addr, AMRMTokenSecretManager secretManager) {
    if (YarnConfiguration.isDistSchedulingEnabled(serverConf)) {
      Server server = rpc.getServer(DistributedSchedulingAMProtocol.class, this,
          addr, serverConf, secretManager,
          serverConf.getInt(YarnConfiguration.RM_SCHEDULER_CLIENT_THREAD_COUNT,
              YarnConfiguration.DEFAULT_RM_SCHEDULER_CLIENT_THREAD_COUNT));
      ((RPC.Server) server).addProtocol(RPC.RpcKind.RPC_PROTOCOL_BUFFER,
          ApplicationMasterProtocolPB.class,
          ApplicationMasterProtocolService.newReflectiveBlockingService(
              new ApplicationMasterProtocolPBServiceImpl(this)));
      return server;
    }
    return super.getServer(rpc, serverConf, addr, secretManager);
  }