@Override public AllocateResponse allocate(AllocateRequest request) throws YarnException, IOException { AllocateRequestProto requestProto = ((AllocateRequestPBImpl) request).getProto(); try { return new AllocateResponsePBImpl(proxy.allocate(null, requestProto)); } catch (ServiceException e) { RPCUtil.unwrapAndThrowException(e); return null; } }
public AllocateRequestPBImpl() { builder = AllocateRequestProto.newBuilder(); }
public AllocateRequestPBImpl(AllocateRequestProto proto) { this.proto = proto; viaProto = true; }
public AllocateRequestProto getProto() { mergeLocalToProto(); proto = viaProto ? proto : builder.build(); viaProto = true; return proto; }
private void maybeInitBuilder() { if (viaProto || builder == null) { builder = AllocateRequestProto.newBuilder(proto); } viaProto = false; }
@Test public void testAllocateRequestPBImpl() throws Exception { validatePBImplRecord(AllocateRequestPBImpl.class, AllocateRequestProto.class); }