/*
* Copyright 2017 LinkedIn Corp.
*
* 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 azkaban;
/**
* Constants
*
* Global place for storing constants.
* Conventions:
* - All internal constants to be put in the root level ie. {@link Constants} class
* - All Configuration keys to be put in {@link ConfigurationKeys} class
* - Flow level Properties keys go to {@link FlowProperties}
* - Job level Properties keys go to {@link JobProperties}
*/publicclassConstants{
// Names and paths of various file names to configure Azkabanpublicstaticfinal String AZKABAN_PROPERTIES_FILE = "azkaban.properties";
publicstaticfinal String AZKABAN_PRIVATE_PROPERTIES_FILE = "azkaban.private.properties";
publicstaticfinal String DEFAULT_CONF_PATH = "conf";
publicstaticfinal String AZKABAN_EXECUTOR_PORT_FILENAME = "executor.port";
publicstaticfinal String AZKABAN_SERVLET_CONTEXT_KEY = "azkaban_app";
// Internal username used to perform SLA actionpublicstaticfinal String AZKABAN_SLA_CHECKER_USERNAME = "azkaban_sla";
// Memory check retry interval when OOM in mspublicstaticfinallong MEMORY_CHECK_INTERVAL_MS = 1000 * 60 * 1;
// Max number of memory check retrypublicstaticfinalint MEMORY_CHECK_RETRY_LIMIT = 720;
publicstaticfinalint DEFAULT_PORT_NUMBER = 8081;
publicstaticfinalint DEFAULT_SSL_PORT_NUMBER = 8443;
publicstaticfinalint DEFAULT_JETTY_MAX_THREAD_COUNT = 20;
// One Schedule's default End Time: 01/01/2050, 00:00:00, UTCpublicstaticfinallong DEFAULT_SCHEDULE_END_EPOCH_TIME = 2524608000000L;
publicstaticclassConfigurationKeys{
// These properties are configurable through azkaban.propertiespublicstaticfinal String AZKABAN_PID_FILENAME = "azkaban.pid.filename";
// Defines a list of external links, each referred to as a topicpublicstaticfinal String AZKABAN_SERVER_EXTERNAL_TOPICS = "azkaban.server.external.topics";
// External URL template of a given topic, specified in the list defined abovepublicstaticfinal String AZKABAN_SERVER_EXTERNAL_TOPIC_URL = "azkaban.server.external.${topic}.url";
// Designates one of the external link topics to correspond to an execution analyzerpublicstaticfinal String AZKABAN_SERVER_EXTERNAL_ANALYZER_TOPIC = "azkaban.server.external.analyzer.topic";
publicstaticfinal String AZKABAN_SERVER_EXTERNAL_ANALYZER_LABEL = "azkaban.server.external.analyzer.label";
// Designates one of the external link topics to correspond to a job log viewerpublicstaticfinal String AZKABAN_SERVER_EXTERNAL_LOGVIEWER_TOPIC = "azkaban.server.external.logviewer.topic";
publicstaticfinal String AZKABAN_SERVER_EXTERNAL_LOGVIEWER_LABEL = "azkaban.server.external.logviewer.label";
// Configures the Kafka appender for logging user jobs, specified for the exec serverpublicstaticfinal String AZKABAN_SERVER_LOGGING_KAFKA_BROKERLIST = "azkaban.server.logging.kafka.brokerList";
publicstaticfinal String AZKABAN_SERVER_LOGGING_KAFKA_TOPIC = "azkaban.server.logging.kafka.topic";
// Represent the class name of azkaban metrics reporter.publicstaticfinal String CUSTOM_METRICS_REPORTER_CLASS_NAME = "azkaban.metrics.reporter.name";
// Represent the metrics server URL.publicstaticfinal String METRICS_SERVER_URL = "azkaban.metrics.server.url";
publicstaticfinal String IS_METRICS_ENABLED = "azkaban.is.metrics.enabled";
// Hostname for the host, if not specified, canonical hostname will be usedpublicstaticfinal String AZKABAN_SERVER_HOST_NAME = "azkaban.server.hostname";
// List of users we prevent azkaban from running flows as. (ie: root, azkaban)publicstaticfinal String BLACK_LISTED_USERS = "azkaban.server.blacklist.users";
// Path name of execute-as-user executablepublicstaticfinal String AZKABAN_SERVER_NATIVE_LIB_FOLDER = "azkaban.native.lib";
// Name of *nix group associated with the process running Azkabanpublicstaticfinal String AZKABAN_SERVER_GROUP_NAME = "azkaban.group.name";
// Legacy configs section, new configs should follow the naming convention of azkaban.server.<rest of the name> for server configs.// The property is used for the web server to get the host name of the executor when running in SOLO mode.publicstaticfinal String EXECUTOR_HOST = "executor.host";
// Max flow running time in mins, server will kill flows running longer than this setting.// if not set or <= 0, then there's no restriction on running time.publicstaticfinal String AZKABAN_MAX_FLOW_RUNNING_MINS = "azkaban.server.flow.max.running.minutes";
publicstaticfinal String AZKABAN_STORAGE_TYPE = "azkaban.storage.type";
publicstaticfinal String AZKABAN_STORAGE_LOCAL_BASEDIR = "azkaban.storage.local.basedir";
publicstaticfinal String HADOOP_CONF_DIR_PATH = "hadoop.conf.dir.path";
publicstaticfinal String AZKABAN_STORAGE_HDFS_ROOT_URI = "azkaban.storage.hdfs.root.uri";
publicstaticfinal String AZKABAN_KERBEROS_PRINCIPAL = "azkaban.kerberos.principal";
publicstaticfinal String AZKABAN_KEYTAB_PATH = "azkaban.keytab.path";
publicstaticfinal String PROJECT_TEMP_DIR = "project.temp.dir";
}
publicstaticclassFlowProperties{
// Basic properties of flows as set by the executor serverpublicstaticfinal String AZKABAN_FLOW_PROJECT_NAME = "azkaban.flow.projectname";
publicstaticfinal String AZKABAN_FLOW_FLOW_ID = "azkaban.flow.flowid";
publicstaticfinal String AZKABAN_FLOW_SUBMIT_USER = "azkaban.flow.submituser";
publicstaticfinal String AZKABAN_FLOW_EXEC_ID = "azkaban.flow.execid";
publicstaticfinal String AZKABAN_FLOW_PROJECT_VERSION = "azkaban.flow.projectversion";
}
publicstaticclassJobProperties{
// Job property that enables/disables using Kafka logging of user job logspublicstaticfinal String AZKABAN_JOB_LOGGING_KAFKA_ENABLE = "azkaban.job.logging.kafka.enable";
}
publicstaticclassJobCallbackProperties{
publicstaticfinal String JOBCALLBACK_CONNECTION_REQUEST_TIMEOUT = "jobcallback.connection.request.timeout";
publicstaticfinal String JOBCALLBACK_CONNECTION_TIMEOUT = "jobcallback.connection.timeout";
publicstaticfinal String JOBCALLBACK_SOCKET_TIMEOUT = "jobcallback.socket.timeout";
publicstaticfinal String JOBCALLBACK_RESPONSE_WAIT_TIMEOUT = "jobcallback.response.wait.timeout";
publicstaticfinal String JOBCALLBACK_THREAD_POOL_SIZE = "jobcallback.thread.pool.size";
}
}