@Override public Set<String> getHostNames() { initNodeToAttributes(); return this.hostNames; }
private void mergeLocalToProto() { if (viaProto) { maybeInitBuilder(); } mergeLocalToBuilder(); proto = builder.build(); viaProto = true; }
@Override public void setHostNames(Set<String> hostnames) { maybeInitBuilder(); if (hostNames == null) { builder.clearHostnames(); } this.hostNames = hostnames; }
public GetNodesToAttributesRequestProto getProto() { mergeLocalToProto(); proto = viaProto ? proto : builder.build(); viaProto = true; return proto; }
@Override public GetNodesToAttributesResponseProto getNodesToAttributes( RpcController controller, YarnServiceProtos.GetNodesToAttributesRequestProto proto) throws ServiceException { GetNodesToAttributesRequestPBImpl req = new GetNodesToAttributesRequestPBImpl(proto); try { GetNodesToAttributesResponse resp = real.getNodesToAttributes(req); return ((GetNodesToAttributesResponsePBImpl) resp).getProto(); } catch (YarnException ye) { throw new ServiceException(ye); } catch (IOException ie) { throw new ServiceException(ie); } } }
@Override public String toString() { return TextFormat.shortDebugString(getProto()); }
@Override public int hashCode() { return getProto().hashCode(); }
@Override public GetNodesToAttributesResponse getNodesToAttributes( GetNodesToAttributesRequest request) throws YarnException, IOException { YarnServiceProtos.GetNodesToAttributesRequestProto requestProto = ((GetNodesToAttributesRequestPBImpl) request).getProto(); try { return new GetNodesToAttributesResponsePBImpl( proxy.getNodesToAttributes(null, requestProto)); } catch (ServiceException e) { RPCUtil.unwrapAndThrowException(e); return null; } } }