@Override public Messages.ComponentInformationProto getLiveComponent(Messages.GetLiveComponentRequestProto request) throws IOException { String name = request.getName(); try { return marshall(state.getComponentInformation(name)); } catch (YarnRuntimeException e) { throw new FileNotFoundException("Unknown component: " + name); } }
@Override public Messages.ComponentInformationProto getLiveComponent(Messages.GetLiveComponentRequestProto request) throws IOException { String name = request.getName(); try { return marshall(state.getComponentInformation(name)); } catch (YarnRuntimeException e) { throw new FileNotFoundException("Unknown component: " + name); } }
@GET @Path(LIVE_COMPONENTS + "/{component}") @Produces({APPLICATION_JSON}) public ComponentInformation getLiveComponent( @PathParam("component") String component) { markGet(SLIDER_SUBPATH_APPLICATION, LIVE_COMPONENTS); try { return state.getComponentInformation(component); } catch (YarnRuntimeException e) { throw new NotFoundException("Unknown component: " + component); } catch (Exception e) { throw buildException(LIVE_CONTAINERS +"/" + component, e); } }
@GET @Path(LIVE_COMPONENTS + "/{component}") @Produces({APPLICATION_JSON}) public ComponentInformation getLiveComponent( @PathParam("component") String component) { markGet(SLIDER_SUBPATH_APPLICATION, LIVE_COMPONENTS); try { return state.getComponentInformation(component); } catch (YarnRuntimeException e) { throw new NotFoundException("Unknown component: " + component); } catch (Exception e) { throw buildException(LIVE_CONTAINERS +"/" + component, e); } }