Examples of GenieServerException


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

        if (userJobDir.exists()) {
            final String msg = "User staging directory already exists";
            this.jobService.setJobStatus(this.job.getId(), JobStatus.FAILED, msg);
            LOG.error(this.job.getStatusMsg() + ": "
                    + userJobDir.getAbsolutePath());
            throw new GenieServerException(msg);
        }

        // create the working directory
        final boolean resMkDir = userJobDir.mkdirs();
        if (!resMkDir) {
            String msg = "User staging directory can't be created";
            this.jobService.setJobStatus(this.job.getId(), JobStatus.FAILED, msg);
            LOG.error(this.job.getStatusMsg() + ": "
                    + userJobDir.getAbsolutePath());
            throw new GenieServerException(msg);
        }

        return userJobDir;
    }
View Full Code Here

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

            f.setAccessible(true);
            return f.getInt(proc);
        } catch (final IllegalAccessException | IllegalArgumentException | NoSuchFieldException | SecurityException e) {
            String msg = "Can't get process id for job";
            LOG.error(msg, e);
            throw new GenieServerException(msg, e);
        }
    }
View Full Code Here

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

                .getConfigInstance()
                .getString("netflix.genie.server.hadoop.home");
        if (hadoopHome == null || !new File(hadoopHome).exists()) {
            final String msg = "Property netflix.genie.server.hadoop.home is not set correctly";
            LOG.error(msg);
            throw new GenieServerException(msg);
        }
        processEnv.put("HADOOP_HOME", hadoopHome);

        // populate the CP timeout and other options. Yarn jobs would use
        // hadoop fs -cp to copy files. Prepare the copy command with the combination
View Full Code Here

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

            if (hadoopHome == null || !new File(hadoopHome).exists()) {
                String msg = "This genie instance doesn't support Hadoop version: "
                        + hadoopVersion;
                LOG.error(msg);
                throw new GenieServerException(msg);
            }

            LOG.info("Overriding HADOOP_HOME from cluster config to: "
                    + hadoopHome);
            processEnv.put("HADOOP_HOME", hadoopHome);
        } else {
            // set the default hadoop home
            hadoopHome = ConfigurationManager
                    .getConfigInstance()
                    .getString("netflix.genie.server.hadoop.home");
            if (hadoopHome == null || !new File(hadoopHome).exists()) {
                final String msg = "Property netflix.genie.server.hadoop.home is not set correctly";
                LOG.error(msg);
                throw new GenieServerException(msg);
            }
            processEnv.put("HADOOP_HOME", hadoopHome);
        }

        // populate the CP timeout and other options. Yarn jobs would use
View Full Code Here

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

                final String genieHome = ConfigurationManager.getConfigInstance()
                        .getString("netflix.genie.server.sys.home");
                if (genieHome == null || genieHome.isEmpty()) {
                    final String msg = "Property netflix.genie.server.sys.home is not set correctly";
                    LOG.error(msg);
                    throw new GenieServerException(msg);
                }
                Runtime.getRuntime().exec(
                        genieHome + File.separator + "jobkill.sh " + processId);
            } catch (final GenieException | IOException e) {
                final String msg = "Failed to kill the job";
                LOG.error(msg, e);
                throw new GenieServerException(msg, e);
            }
        } else {
            final String msg = "Could not get process id";
            LOG.error(msg);
            throw new GenieServerException(msg);
        }
    }
View Full Code Here

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

            LOG.info("Successfully launched the job with PID = " + pid);
        } catch (final IOException e) {
            final String msg = "Failed to launch the job";
            LOG.error(msg, e);
            this.jobService.setJobStatus(this.job.getId(), JobStatus.FAILED, msg);
            throw new GenieServerException(msg, e);
        }
    }
View Full Code Here

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

                .getConfigInstance()
                .getString("netflix.genie.server.sys.home");
        if (StringUtils.isBlank(genieHome)) {
            final String msg = "Property netflix.genie.server.sys.home is not set correctly";
            LOG.error(msg);
            throw new GenieServerException(msg);
        }
        processBuilder.environment().put("XS_SYSTEM_HOME", genieHome);

        // set the archive location
        // unless user has explicitly requested for it to be disabled
View Full Code Here

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

                .getConfigInstance()
                .getString("netflix.genie.server.sys.home");
        if (StringUtils.isBlank(genieHome)) {
            final String msg = "Property netflix.genie.server.sys.home is not set correctly";
            LOG.error(msg);
            throw new GenieServerException(msg);
        }
        return genieHome;
    }
View Full Code Here

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

                             new FileOutputStream(this.jobDir + File.separator + attachment.getName())) {
                    output.write(attachment.getData());
                } catch (final IOException e) {
                    final String msg = "Unable to copy attachment correctly: " + attachment.getName();
                    LOG.error(msg);
                    throw new GenieServerException(msg, e);
                }
            }
        }
    }
View Full Code Here

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

                .getConfigInstance()
                .getString("netflix.genie.server.user.working.dir");
        if (StringUtils.isBlank(baseUserWorkingDir)) {
            final String msg = "Property netflix.genie.server.user.working.dir is not set";
            LOG.error(msg);
            throw new GenieServerException(msg);
        }
        return baseUserWorkingDir;
    }
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.