com.netflix.genie.common.internal.jobs.JobConstants Maven / Gradle / Ivy
/*
*
* Copyright 2016 Netflix, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.netflix.genie.common.internal.jobs;
import java.util.TimeZone;
/**
* A class holding some constants to be used everywhere.
*
* @author amsharma
* @author tgianos
* @author mprimi
* @since 3.0.0
*/
public final class JobConstants {
/**
* The header to use to mark a forwarded from another Genie node.
*/
public static final String GENIE_FORWARDED_FROM_HEADER = "Genie-Forwarded-From";
/**
* The launcher script name that genie creates to setup a job for running.
**/
public static final String GENIE_JOB_LAUNCHER_SCRIPT = "run";
/**
* File Path prefix to be used while creating paths for dependency files downloaded by Genie to local dir.
**/
public static final String DEPENDENCY_FILE_PATH_PREFIX = "dependencies";
/**
* File Path prefix to be used while creating paths for config files downloaded by Genie to local dir.
**/
public static final String CONFIG_FILE_PATH_PREFIX = "config";
/**
* Stderr Filename generated by Genie after running a job.
**/
public static final String STDERR_LOG_FILE_NAME = "stderr";
/**
* Stdout Filename generated by Genie after running a job.
**/
public static final String STDOUT_LOG_FILE_NAME = "stdout";
/**
* Filename for logfile generated during setup (sourcing of entities setup files).
*/
public static final String GENIE_SETUP_LOG_FILE_NAME = "setup.log";
/**
* Filename for environment variables dumped after setup.
*/
public static final String GENIE_AGENT_ENV_FILE_NAME = "env.log";
/**
* Genie Agent log file name (after it is relocated inside the job directory).
*/
public static final String GENIE_AGENT_LOG_FILE_NAME = "agent.log";
/**
* File Path prefix to be used while creating directories for application files to local dir.
**/
public static final String APPLICATION_PATH_VAR = "applications";
/**
* File Path prefix to be used while creating directories for command files to local dir.
**/
public static final String COMMAND_PATH_VAR = "command";
/**
* File Path prefix to be used while creating directories for cluster files to local dir.
**/
public static final String CLUSTER_PATH_VAR = "cluster";
/**
* File Path prefix to be used while creating working directory for jobs.
**/
public static final String GENIE_PATH_VAR = "genie";
/**
* File Path prefix to be used while creating working directory for jobs.
**/
public static final String LOGS_PATH_VAR = "logs";
/**
* Environment variable for Genie job working directory.
**/
public static final String GENIE_JOB_DIR_ENV_VAR = "GENIE_JOB_DIR";
/**
* Environment variable for Genie cluster directory.
**/
public static final String GENIE_CLUSTER_DIR_ENV_VAR = "GENIE_CLUSTER_DIR";
/**
* Environment variable for Genie cluster id.
*/
public static final String GENIE_CLUSTER_ID_ENV_VAR = "GENIE_CLUSTER_ID";
/**
* Environment variable for the Genie cluster name.
*/
public static final String GENIE_CLUSTER_NAME_ENV_VAR = "GENIE_CLUSTER_NAME";
/**
* Environment variable for the Genie cluster tags.
*/
public static final String GENIE_CLUSTER_TAGS_ENV_VAR = "GENIE_CLUSTER_TAGS";
/**
* Environment variable for Genie command directory.
**/
public static final String GENIE_COMMAND_DIR_ENV_VAR = "GENIE_COMMAND_DIR";
/**
* Environment variable for Genie command id.
*/
public static final String GENIE_COMMAND_ID_ENV_VAR = "GENIE_COMMAND_ID";
/**
* Environment variable for the Genie command name.
*/
public static final String GENIE_COMMAND_NAME_ENV_VAR = "GENIE_COMMAND_NAME";
/**
* Environment variable for the Genie command tags.
*/
public static final String GENIE_COMMAND_TAGS_ENV_VAR = "GENIE_COMMAND_TAGS";
/**
* Environment variable for Genie application directory.
**/
public static final String GENIE_APPLICATION_DIR_ENV_VAR = "GENIE_APPLICATION_DIR";
/**
* Environment variable for Genie Job ID.
*/
public static final String GENIE_JOB_ID_ENV_VAR = "GENIE_JOB_ID";
/**
* Environment variable for Genie Job Name.
*/
public static final String GENIE_JOB_NAME_ENV_VAR = "GENIE_JOB_NAME";
/**
* Environment variable for Genie Job Memory.
*/
public static final String GENIE_JOB_MEMORY_ENV_VAR = "GENIE_JOB_MEMORY";
/**
* Environment variable for Genie job tags provided by the user.
*/
public static final String GENIE_JOB_TAGS_ENV_VAR = "GENIE_JOB_TAGS";
/**
* Environment variable for Genie Job grouping.
*/
public static final String GENIE_JOB_GROUPING_ENV_VAR = "GENIE_JOB_GROUPING";
/**
* Environment variable for Genie Job grouping instance.
*/
public static final String GENIE_JOB_GROUPING_INSTANCE_ENV_VAR = "GENIE_JOB_GROUPING_INSTANCE";
/**
* Environment variable for the Genie command tags in the job request.
*/
public static final String GENIE_REQUESTED_COMMAND_TAGS_ENV_VAR = "GENIE_REQUESTED_COMMAND_TAGS";
/**
* Environment variable for the Genie cluster criteria tags in the job request.
*/
public static final String GENIE_REQUESTED_CLUSTER_TAGS_ENV_VAR = "GENIE_REQUESTED_CLUSTER_TAGS";
/**
* Environment variable for Genie version.
*/
public static final String GENIE_VERSION_ENV_VAR = "GENIE_VERSION";
/**
* Environment variable for the Genie username the job request.
*/
public static final String GENIE_USER_ENV_VAR = "GENIE_USER";
/**
* Environment variable for the Genie user group the job request.
*/
public static final String GENIE_USER_GROUP_ENV_VAR = "GENIE_USER_GROUP";
/**
* UTC timezone.
*/
public static final TimeZone UTC = TimeZone.getTimeZone("UTC");
/**
* The property name to check whether new job submissions should be allowed.
*/
public static final String JOB_SUBMISSION_ENABLED_PROPERTY_KEY = "genie.jobs.submission.enabled";
/**
* The property name to check for the message to send back to the request user if jobs are currently disabled.
*/
public static final String JOB_SUBMISSION_DISABLED_MESSAGE_KEY = "genie.jobs.submission.disabledMessage";
/**
* The default message to send back to users when the jobs are disabled if there was none other set.
*/
public static final String JOB_SUBMISSION_DISABLED_DEFAULT_MESSAGE
= "Job submission is currently disabled. Please try again later.";
/**
* The name of the setup file (for entities that have one) when downloaded in the job directory.
*/
public static final String GENIE_ENTITY_SETUP_SCRIPT_FILE_NAME = "genie_setup.sh";
/**
* The name of the file left behind if the runfile fails during setup (sourcing entities setup scripts).
*/
public static final String GENIE_SETUP_ERROR_FILE_NAME = "setup_failed.txt";
/**
* Protected constructor for utility class.
*/
protected JobConstants() {
}
}