private void mergeLocalToBuilder() { if (this.completionEvents != null) { addCompletionEventsToProto(); } }
@Override public List<TaskAttemptCompletionEvent> getCompletionEventList() { initCompletionEvents(); return this.completionEvents; } @Override
private void mergeLocalToProto() { if (viaProto) maybeInitBuilder(); mergeLocalToBuilder(); proto = builder.build(); viaProto = true; }
@Override public GetTaskAttemptCompletionEventsResponse getTaskAttemptCompletionEvents( GetTaskAttemptCompletionEventsRequest request) throws IOException { GetTaskAttemptCompletionEventsRequestProto requestProto = ((GetTaskAttemptCompletionEventsRequestPBImpl)request).getProto(); try { return new GetTaskAttemptCompletionEventsResponsePBImpl(proxy.getTaskAttemptCompletionEvents(null, requestProto)); } catch (ServiceException e) { throw unwrapAndThrowException(e); } }
private void initCompletionEvents() { if (this.completionEvents != null) { return; } GetTaskAttemptCompletionEventsResponseProtoOrBuilder p = viaProto ? proto : builder; List<TaskAttemptCompletionEventProto> list = p.getCompletionEventsList(); this.completionEvents = new ArrayList<TaskAttemptCompletionEvent>(); for (TaskAttemptCompletionEventProto c : list) { this.completionEvents.add(convertFromProtoFormat(c)); } }
public GetTaskAttemptCompletionEventsResponseProto getProto() { mergeLocalToProto(); proto = viaProto ? proto : builder.build(); viaProto = true; return proto; }
@Override public GetTaskAttemptCompletionEventsResponseProto getTaskAttemptCompletionEvents( RpcController controller, GetTaskAttemptCompletionEventsRequestProto proto) throws ServiceException { GetTaskAttemptCompletionEventsRequest request = new GetTaskAttemptCompletionEventsRequestPBImpl(proto); try { GetTaskAttemptCompletionEventsResponse response = real.getTaskAttemptCompletionEvents(request); return ((GetTaskAttemptCompletionEventsResponsePBImpl)response).getProto(); } catch (IOException e) { throw new ServiceException(e); } }
private void addCompletionEventsToProto() { maybeInitBuilder(); builder.clearCompletionEvents(); if (completionEvents == null) return; Iterable<TaskAttemptCompletionEventProto> iterable = new Iterable<TaskAttemptCompletionEventProto>() { @Override public Iterator<TaskAttemptCompletionEventProto> iterator() { return new Iterator<TaskAttemptCompletionEventProto>() { Iterator<TaskAttemptCompletionEvent> iter = completionEvents.iterator(); @Override public boolean hasNext() { return iter.hasNext(); } @Override public TaskAttemptCompletionEventProto next() { return convertToProtoFormat(iter.next()); } @Override public void remove() { throw new UnsupportedOperationException(); } }; } }; builder.addAllCompletionEvents(iterable); } @Override
@Override public GetTaskAttemptCompletionEventsResponse getTaskAttemptCompletionEvents( GetTaskAttemptCompletionEventsRequest request) throws IOException { GetTaskAttemptCompletionEventsRequestProto requestProto = ((GetTaskAttemptCompletionEventsRequestPBImpl)request).getProto(); try { return new GetTaskAttemptCompletionEventsResponsePBImpl(proxy.getTaskAttemptCompletionEvents(null, requestProto)); } catch (ServiceException e) { throw unwrapAndThrowException(e); } }
private void initCompletionEvents() { if (this.completionEvents != null) { return; } GetTaskAttemptCompletionEventsResponseProtoOrBuilder p = viaProto ? proto : builder; List<TaskAttemptCompletionEventProto> list = p.getCompletionEventsList(); this.completionEvents = new ArrayList<TaskAttemptCompletionEvent>(); for (TaskAttemptCompletionEventProto c : list) { this.completionEvents.add(convertFromProtoFormat(c)); } }
public GetTaskAttemptCompletionEventsResponseProto getProto() { mergeLocalToProto(); proto = viaProto ? proto : builder.build(); viaProto = true; return proto; }
@Override public GetTaskAttemptCompletionEventsResponseProto getTaskAttemptCompletionEvents( RpcController controller, GetTaskAttemptCompletionEventsRequestProto proto) throws ServiceException { GetTaskAttemptCompletionEventsRequest request = new GetTaskAttemptCompletionEventsRequestPBImpl(proto); try { GetTaskAttemptCompletionEventsResponse response = real.getTaskAttemptCompletionEvents(request); return ((GetTaskAttemptCompletionEventsResponsePBImpl)response).getProto(); } catch (IOException e) { throw new ServiceException(e); } }
private void addCompletionEventsToProto() { maybeInitBuilder(); builder.clearCompletionEvents(); if (completionEvents == null) return; Iterable<TaskAttemptCompletionEventProto> iterable = new Iterable<TaskAttemptCompletionEventProto>() { @Override public Iterator<TaskAttemptCompletionEventProto> iterator() { return new Iterator<TaskAttemptCompletionEventProto>() { Iterator<TaskAttemptCompletionEvent> iter = completionEvents.iterator(); @Override public boolean hasNext() { return iter.hasNext(); } @Override public TaskAttemptCompletionEventProto next() { return convertToProtoFormat(iter.next()); } @Override public void remove() { throw new UnsupportedOperationException(); } }; } }; builder.addAllCompletionEvents(iterable); } @Override
@Override public List<TaskAttemptCompletionEvent> getCompletionEventList() { initCompletionEvents(); return this.completionEvents; } @Override
private void mergeLocalToProto() { if (viaProto) maybeInitBuilder(); mergeLocalToBuilder(); proto = builder.build(); viaProto = true; }
private void mergeLocalToBuilder() { if (this.completionEvents != null) { addCompletionEventsToProto(); } }
@Override public GetTaskAttemptCompletionEventsResponse getTaskAttemptCompletionEvents( GetTaskAttemptCompletionEventsRequest request) throws IOException { GetTaskAttemptCompletionEventsRequestProto requestProto = ((GetTaskAttemptCompletionEventsRequestPBImpl)request).getProto(); try { return new GetTaskAttemptCompletionEventsResponsePBImpl(proxy.getTaskAttemptCompletionEvents(null, requestProto)); } catch (ServiceException e) { throw unwrapAndThrowException(e); } }
private void initCompletionEvents() { if (this.completionEvents != null) { return; } GetTaskAttemptCompletionEventsResponseProtoOrBuilder p = viaProto ? proto : builder; List<TaskAttemptCompletionEventProto> list = p.getCompletionEventsList(); this.completionEvents = new ArrayList<TaskAttemptCompletionEvent>(); for (TaskAttemptCompletionEventProto c : list) { this.completionEvents.add(convertFromProtoFormat(c)); } }
public GetTaskAttemptCompletionEventsResponseProto getProto() { mergeLocalToProto(); proto = viaProto ? proto : builder.build(); viaProto = true; return proto; }
@Override public GetTaskAttemptCompletionEventsResponseProto getTaskAttemptCompletionEvents( RpcController controller, GetTaskAttemptCompletionEventsRequestProto proto) throws ServiceException { GetTaskAttemptCompletionEventsRequest request = new GetTaskAttemptCompletionEventsRequestPBImpl(proto); try { GetTaskAttemptCompletionEventsResponse response = real.getTaskAttemptCompletionEvents(request); return ((GetTaskAttemptCompletionEventsResponsePBImpl)response).getProto(); } catch (IOException e) { throw new ServiceException(e); } }