Examples of InternalServerException


Examples of com.sequenceiq.cloudbreak.controller.InternalServerException

    }

    protected void waitUntilComplete(AzureClient azureClient, String requestId) {
        boolean finished = azureClient.waitUntilComplete(requestId);
        if (!finished) {
            throw new InternalServerException("Azure resource timeout");
        }
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.InternalServerException

    }

    protected void httpResponseExceptionHandler(HttpResponseException ex, String resourceName, String user, Stack stack) {
        MDCBuilder.buildMdcContext(stack);
        if (ex.getStatusCode() != NOT_FOUND) {
            throw new InternalServerException(ex.getMessage());
        } else {
            LOGGER.error(String.format("Azure resource not found with %s name for %s user.", resourceName, user));
        }
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.InternalServerException

    }

    protected void waitUntilComplete(AzureClient azureClient, String requestId) {
        boolean finished = azureClient.waitUntilComplete(requestId);
        if (!finished) {
            throw new InternalServerException("Azure resource timeout");
        }
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.InternalServerException

    protected void exceptionHandler(GoogleJsonResponseException ex, String name, Stack stack) {
        MDCBuilder.buildMdcContext(stack);
        if (ex.getDetails().get("code").equals(NOT_FOUND)) {
            LOGGER.info(String.format("Resource was delete with name: %s", name));
        } else {
            throw new InternalServerException(ex.getMessage());
        }
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.InternalServerException

    protected void exceptionHandler(GoogleJsonResponseException ex, String name, Stack stack) {
        MDCBuilder.buildMdcContext(stack);
        if (ex.getDetails().get("code").equals(NOT_FOUND)) {
            LOGGER.info(String.format("Resource was delete with name: %s", name));
        } else {
            throw new InternalServerException(ex.getMessage());
        }
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.InternalServerException

        }
    }

    @Override
    public void handleTimeout(AmbariClient t) {
        throw new InternalServerException(String.format("Operation timed out. Ambari server could not start %s", t.getAmbari().getUri()));
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.InternalServerException

        MDCBuilder.buildMdcContext(stack);
        AmbariClient ambariClient = createAmbariClient(ambariIp);
        try {
            String clusterJson = ambariClient.getClusterAsJson();
            if (clusterJson == null) {
                throw new InternalServerException(String.format("Cluster response coming from Ambari server was null. [Ambari Server IP: '%s']", ambariIp));
            }
            return clusterJson;
        } catch (HttpResponseException e) {
            if ("Not Found".equals(e.getMessage())) {
                throw new NotFoundException("Ambari blueprint not found.", e);
            } else {
                throw new InternalServerException("Something went wrong", e);
            }
        }
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.InternalServerException

                if (hostGroup.path("name").asText().equals(hostgroup)) {
                    return true;
                }
            }
        } catch (IOException e) {
            throw new InternalServerException("Unhandled exception occured while reading blueprint: " + e.getMessage(), e);
        }
        return false;
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.InternalServerException

    }

    private void waitForFinishing(AzureClient azureClient, String requestId) {
        boolean finished = azureClient.waitUntilComplete(requestId);
        if (!finished) {
            throw new InternalServerException("Azure resource timeout");
        }
    }
View Full Code Here

Examples of com.sequenceiq.cloudbreak.controller.InternalServerException

    }

    private void waitForFinishing(AzureClient azureClient, String requestId) {
        boolean finished = azureClient.waitUntilComplete(requestId);
        if (!finished) {
            throw new InternalServerException("Azure resource timeout");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.