Package com.sequenceiq.cloudbreak.domain

Examples of com.sequenceiq.cloudbreak.domain.Stack


            }
        }
    }

    public Stack updateStackResources(Long stackId, Set<Resource> resources) {
        Stack stack = stackRepository.findById(stackId);
        MDCBuilder.buildMdcContext(stack);
        int attempt = 1;
        try {
            return doUpdateResources(stackId, resources);
        } catch (OptimisticLockException | OptimisticLockingFailureException e) {
View Full Code Here


            }
        }
    }

    public Stack updateAmbariIp(Long stackId, String ambariIp) {
        Stack stack = stackRepository.findById(stackId);
        MDCBuilder.buildMdcContext(stack);
        int attempt = 1;
        try {
            return doUpdateAmbariIp(stackId, ambariIp);
        } catch (OptimisticLockException | OptimisticLockingFailureException e) {
View Full Code Here

            }
        }
    }

    public Stack updateStackCluster(Long stackId, Cluster cluster) {
        Stack stack = stackRepository.findById(stackId);
        MDCBuilder.buildMdcContext(stack);
        int attempt = 1;
        try {
            return doUpdateStackCluster(stackId, cluster);
        } catch (OptimisticLockException | OptimisticLockingFailureException e) {
View Full Code Here

            }
        }
    }

    public Stack updateStackCreateComplete(Long stackId) {
        Stack stack = stackRepository.findById(stackId);
        MDCBuilder.buildMdcContext(stack);
        int attempt = 1;
        try {
            return doUpdateStackCreateComplete(stackId);
        } catch (OptimisticLockException | OptimisticLockingFailureException e) {
View Full Code Here

            }
        }
    }

    public Stack updateMetadataReady(Long stackId, boolean ready) {
        Stack stack = stackRepository.findById(stackId);
        MDCBuilder.buildMdcContext(stack);
        int attempt = 1;
        try {
            return doUpdateMetadataReady(stackId, ready);
        } catch (OptimisticLockException | OptimisticLockingFailureException e) {
View Full Code Here

            }
        }
    }

    public Stack updateNodeCount(Long stackId, Integer nodeCount) {
        Stack stack = stackRepository.findById(stackId);
        MDCBuilder.buildMdcContext(stack);
        int attempt = 1;
        try {
            return doUpdateNodeCount(stackId, nodeCount);
        } catch (OptimisticLockException | OptimisticLockingFailureException e) {
View Full Code Here

            }
        }
    }

    private Stack doUpdateStackStatus(Long stackId, Status status, String statusReason) {
        Stack stack = stackRepository.findById(stackId);
        MDCBuilder.buildMdcContext(stack);
        if (status != null) {
            stack.setStatus(status);
        }
        if (statusReason != null) {
            stack.setStatusReason(statusReason);
        }
        stack = stackRepository.save(stack);
        LOGGER.info("Updated stack: [status: '{}', statusReason: '{}'].", status.name(), statusReason);

        cloudbreakEventService.fireCloudbreakEvent(stackId, status.name(), statusReason);
View Full Code Here

        cloudbreakEventService.fireCloudbreakEvent(stackId, status.name(), statusReason);
        return stack;
    }

    private Stack doUpdateStackStatusReason(Long stackId, String statusReason) {
        Stack stack = stackRepository.findById(stackId);
        MDCBuilder.buildMdcContext(stack);
        if (statusReason != null) {
            stack.setStatusReason(statusReason);
        }
        stack = stackRepository.save(stack);
        LOGGER.info("Updated stack: [statusReason: '{}'].", statusReason);
        return stack;
    }
View Full Code Here

        LOGGER.info("Updated stack: [statusReason: '{}'].", statusReason);
        return stack;
    }

    private Stack doUpdateMetaData(Long stackId, Set<InstanceMetaData> instanceMetaData) {
        Stack stack = stackRepository.findById(stackId);
        MDCBuilder.buildMdcContext(stack);
        stack.setInstanceMetaData(instanceMetaData);
        stack = stackRepository.save(stack);
        LOGGER.info("Updated stack metadata.");
        return stack;
    }
View Full Code Here

        LOGGER.info("Updated stack metadata.");
        return stack;
    }

    private Stack doUpdateAmbariIp(Long stackId, String ambariIp) {
        Stack stack = stackRepository.findById(stackId);
        MDCBuilder.buildMdcContext(stack);
        stack.setAmbariIp(ambariIp);
        stack = stackRepository.save(stack);
        LOGGER.info("Updated stack: [ambariIp: '{}'].", ambariIp);
        return stack;
    }
View Full Code Here

TOP

Related Classes of com.sequenceiq.cloudbreak.domain.Stack

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.