Package org.apache.oozie.client.rest

Examples of org.apache.oozie.client.rest.JsonBean


     * @param em
     * @throws CommandException
     */
    public void generateEvents(CoordinatorJobBean coordJob, Date startTime) throws CommandException {
        for(UpdateEntry entry : updateList){
            JsonBean actionBean = entry.getBean();
            if (actionBean instanceof CoordinatorActionBean) {
                CoordinatorActionBean caBean = (CoordinatorActionBean) actionBean;
                caBean.setJobId(coordJob.getId());
                CoordinatorXCommand.generateEvent(caBean, coordJob.getUser(), coordJob.getAppName(), startTime);
            }
View Full Code Here


            sendJsonResponse(response, HttpServletResponse.SC_OK, json);
        }
        else if (resource.equals(RestConstants.ADMIN_JMS_INFO)) {
            String timeZoneId = request.getParameter(RestConstants.TIME_ZONE_PARAM) == null ? "GMT" : request
                    .getParameter(RestConstants.TIME_ZONE_PARAM);
            JsonBean jmsBean = getJMSConnectionInfo(request, response);
            sendJsonResponse(response, HttpServletResponse.SC_OK, jmsBean, timeZoneId);
        }
        else if (resource.equals(RestConstants.ADMIN_AVAILABLE_OOZIE_SERVERS_RESOURCE)) {
            JSONObject json = new JSONObject();
            json.putAll(getOozieURLs());
View Full Code Here

            throw new XServletException(HttpServletResponse.SC_UNAUTHORIZED, ex);
        }

        if (show == null || show.equals(RestConstants.JOB_SHOW_INFO)) {
            stopCron();
            JsonBean job = null;
            try {
                job = getJob(request, response);
            }
            catch (BaseEngineException e) {
                // TODO Auto-generated catch block
View Full Code Here

    @Override
    protected JsonBean getJob(HttpServletRequest request, HttpServletResponse response) throws XServletException,
            IOException {
        DagEngine dagEngine = Services.get().get(DagEngineService.class).getDagEngine(getUser(request));

        JsonBean jobBean = null;
        String jobId = getResourceName(request);
        try {
            jobBean = (JsonBean) dagEngine.getJob(jobId);
        }
        catch (DagEngineException ex) {
View Full Code Here

        super(INSTRUMENTATION_NAME);
    }

    @Override
    protected JsonBean getWorkflowJob(HttpServletRequest request, HttpServletResponse response) throws XServletException {
        JsonBean jobBean = super.getWorkflowJobBean(request, response);
        return jobBean;
    }
View Full Code Here

        return jobBean;
    }

    @Override
    protected JsonBean getWorkflowAction(HttpServletRequest request, HttpServletResponse response) throws XServletException {
        JsonBean actionBean = super.getWorkflowActionBean(request, response);
        return actionBean;
    }
View Full Code Here

            sendJsonResponse(response, HttpServletResponse.SC_OK, json);
        }
        else if (resource.equals(RestConstants.ADMIN_JMS_INFO)) {
            String timeZoneId = request.getParameter(RestConstants.TIME_ZONE_PARAM) == null ? "GMT" : request
                    .getParameter(RestConstants.TIME_ZONE_PARAM);
            JsonBean jmsBean = getJMSConnectionInfo(request, response);
            sendJsonResponse(response, HttpServletResponse.SC_OK, jmsBean, timeZoneId);
        }

    }
View Full Code Here

            throw new XServletException(HttpServletResponse.SC_UNAUTHORIZED, ex);
        }

        if (show == null || show.equals(RestConstants.JOB_SHOW_INFO)) {
            stopCron();
            JsonBean job = null;
            try {
                job = getJob(request, response);
            }
            catch (BaseEngineException e) {
                // TODO Auto-generated catch block
View Full Code Here

        byte[] b = new byte[101];
        while (is.readLine(b, 0, 100) != -1) {
            XLog.getLog(getClass()).warn("Printing :" + new String(b));
        }

        JsonBean jobBean = null;
        String jobId = getResourceName(request);
        if (jobId.endsWith("-B")) {
            jobBean = getBundleJob(request, response);
        }
        else {
View Full Code Here

     * @param response servlet response
     * @return JsonBean WorkflowJobBean
     * @throws XServletException
     */
    private JsonBean getWorkflowJob(HttpServletRequest request, HttpServletResponse response) throws XServletException {
        JsonBean jobBean = null;
        String jobId = getResourceName(request);
        String startStr = request.getParameter(RestConstants.OFFSET_PARAM);
        String lenStr = request.getParameter(RestConstants.LEN_PARAM);
        int start = (startStr != null) ? Integer.parseInt(startStr) : 1;
        start = (start < 1) ? 1 : start;
View Full Code Here

TOP

Related Classes of org.apache.oozie.client.rest.JsonBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.