Package com.netflix.genie.common.exceptions

Examples of com.netflix.genie.common.exceptions.GenieNotFoundException


            for (final Command cmd : cmdList) {
                cluster.removeCommand(cmd);
            }
            return cluster.getCommands();
        } else {
            throw new GenieNotFoundException("No cluster with id " + id + " exists.");
        }
    }
View Full Code Here


        if (cluster != null) {
            final Command cmd = this.commandRepo.findOne(cmdId);
            if (cmd != null) {
                cluster.removeCommand(cmd);
            } else {
                throw new GenieNotFoundException("No command with id " + cmdId + " exists.");
            }
            return cluster.getCommands();
        } else {
            throw new GenieNotFoundException("No cluster with id " + id + " exists.");
        }
    }
View Full Code Here

        final Cluster cluster = this.clusterRepo.findOne(id);
        if (cluster != null) {
            cluster.getTags().addAll(tags);
            return cluster.getTags();
        } else {
            throw new GenieNotFoundException("No cluster with id " + id + " exists.");
        }
    }
View Full Code Here

        final Cluster cluster = this.clusterRepo.findOne(id);
        if (cluster != null) {
            return cluster.getTags();
        } else {
            throw new GenieNotFoundException("No cluster with id " + id + " exists.");
        }
    }
View Full Code Here

        final Cluster cluster = this.clusterRepo.findOne(id);
        if (cluster != null) {
            cluster.setTags(tags);
            return cluster.getTags();
        } else {
            throw new GenieNotFoundException("No cluster with id " + id + " exists.");
        }
    }
View Full Code Here

        final Cluster cluster = this.clusterRepo.findOne(id);
        if (cluster != null) {
            cluster.getTags().clear();
            return cluster.getTags();
        } else {
            throw new GenieNotFoundException("No cluster with id " + id + " exists.");
        }
    }
View Full Code Here

            if (StringUtils.isNotBlank(tag)) {
                cluster.getTags().remove(tag);
            }
            return cluster.getTags();
        } else {
            throw new GenieNotFoundException("No cluster with id " + id + " exists.");
        }
    }
View Full Code Here

        LOG.debug("called for id: " + id);
        final Job job = this.jobRepo.findOne(id);

        // do some basic error handling
        if (job == null) {
            throw new GenieNotFoundException("No job exists for id " + id + ". Unable to kill.");
        }

        // check if it is done already
        if (job.getStatus() == JobStatus.SUCCEEDED
                || job.getStatus() == JobStatus.KILLED
View Full Code Here

    @Override
    @Transactional(rollbackFor = GenieException.class)
    public JobStatus finalizeJob(final String id, final int exitCode) throws GenieException {
        final Job job = this.jobRepo.findOne(id);
        if (job == null) {
            throw new GenieNotFoundException("No job with id " + id + " exists");
        }
        job.setExitCode(exitCode);

        // We check if status code is killed. The kill thread sets this, but just to make sure we set
        // it here again to prevent a race condition problem. This just makes the status message as
View Full Code Here

    /**
     * Test 404.
     */
    @Test
    public void testGenieNotFoundException() {
        final GenieException ge = new GenieNotFoundException(ERROR_MESSAGE);
        final Response response = this.mapper.toResponse(ge);
        Assert.assertEquals(HttpURLConnection.HTTP_NOT_FOUND, response.getStatus());
        Assert.assertNotNull(response.getEntity());
        Assert.assertEquals(ERROR_MESSAGE, response.getEntity());
    }
View Full Code Here

TOP

Related Classes of com.netflix.genie.common.exceptions.GenieNotFoundException

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.