/// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/> public override GetClusterNodesResponse GetClusterNodes(GetClusterNodesRequest request ) { this._enclosing.ResetStartFailoverFlag(true); // make sure failover has been triggered NUnit.Framework.Assert.IsTrue(this._enclosing.WaittingForFailOver()); // create GetClusterNodesResponse with fake ClusterNodeLists GetClusterNodesResponse response = GetClusterNodesResponse.NewInstance(this._enclosing .CreateFakeNodeReports()); return(response); }
/// <exception cref="Org.Apache.Hadoop.Yarn.Exceptions.YarnException"/> /// <exception cref="System.IO.IOException"/> public override IList <NodeReport> GetNodeReports(params NodeState[] states) { EnumSet <NodeState> statesSet = (states.Length == 0) ? EnumSet.AllOf <NodeState>() : EnumSet.NoneOf <NodeState>(); foreach (NodeState state in states) { statesSet.AddItem(state); } GetClusterNodesRequest request = GetClusterNodesRequest.NewInstance(statesSet); GetClusterNodesResponse response = rmClient.GetClusterNodes(request); return(response.GetNodeReports()); }
/// <exception cref="Com.Google.Protobuf.ServiceException"/> public virtual YarnServiceProtos.GetClusterNodesResponseProto GetClusterNodes(RpcController controller, YarnServiceProtos.GetClusterNodesRequestProto proto) { GetClusterNodesRequestPBImpl request = new GetClusterNodesRequestPBImpl(proto); try { GetClusterNodesResponse response = real.GetClusterNodes(request); return(((GetClusterNodesResponsePBImpl)response).GetProto()); } catch (YarnException e) { throw new ServiceException(e); } catch (IOException e) { throw new ServiceException(e); } }