@Override public String toString() { return TextFormat.shortDebugString(getProto()); }
@Override public int hashCode() { return getProto().hashCode(); }
@Override public int hashCode() { return getProto().hashCode(); }
@Override public int hashCode() { return getProto().hashCode(); }
@Override public String toString() { return TextFormat.shortDebugString(getProto()); }
@Override public String toString() { return TextFormat.shortDebugString(getProto()); }
@Override public AllocateResponseProto allocate(RpcController arg0, AllocateRequestProto proto) throws ServiceException { AllocateRequestPBImpl request = new AllocateRequestPBImpl(proto); try { AllocateResponse response = real.allocate(request); return ((AllocateResponsePBImpl)response).getProto(); } catch (YarnException e) { throw new ServiceException(e); } catch (IOException e) { throw new ServiceException(e); } }
@Override public AllocateResponseProto allocate(RpcController arg0, AllocateRequestProto proto) throws ServiceException { AllocateRequestPBImpl request = new AllocateRequestPBImpl(proto); try { AllocateResponse response = real.allocate(request); return ((AllocateResponsePBImpl)response).getProto(); } catch (YarnException e) { throw new ServiceException(e); } catch (IOException e) { throw new ServiceException(e); } }
@Override public AllocateResponseProto allocate(RpcController arg0, AllocateRequestProto proto) throws ServiceException { AllocateRequestPBImpl request = new AllocateRequestPBImpl(proto); try { AllocateResponse response = real.allocate(request); return ((AllocateResponsePBImpl)response).getProto(); } catch (YarnException e) { throw new ServiceException(e); } catch (IOException e) { throw new ServiceException(e); } }
@SuppressWarnings("deprecation") @Test public void testAllocateResponseWithoutIncDecContainers() { AllocateResponse r = AllocateResponse.newInstance(3, new ArrayList<ContainerStatus>(), new ArrayList<Container>(), new ArrayList<NodeReport>(), null, AMCommand.AM_RESYNC, 3, null, new ArrayList<NMToken>(), null, null); // serde AllocateResponseProto p = ((AllocateResponsePBImpl) r).getProto(); r = new AllocateResponsePBImpl(p); // check value Assert.assertEquals(0, r.getIncreasedContainers().size()); Assert.assertEquals(0, r.getDecreasedContainers().size()); } }
AllocateResponseProto p = ((AllocateResponsePBImpl) r).getProto(); r = new AllocateResponsePBImpl(p);