Constants.java 28.1 KB
Newer Older
L
ligang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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.
 */
Q
qiaozhanwei 已提交
17
package org.apache.dolphinscheduler.common;
L
ligang 已提交
18

19
import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
Q
qiaozhanwei 已提交
20
import org.apache.dolphinscheduler.common.utils.OSUtils;
L
ligang 已提交
21 22 23 24 25 26 27

import java.util.regex.Pattern;

/**
 * Constants
 */
public final class Constants {
28

29 30 31
    private Constants() {
        throw new IllegalStateException("Constants class");
    }
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

    /**
     * quartz config
     */
    public static final String ORG_QUARTZ_JOBSTORE_DRIVERDELEGATECLASS = "org.quartz.jobStore.driverDelegateClass";
    public static final String ORG_QUARTZ_SCHEDULER_INSTANCENAME = "org.quartz.scheduler.instanceName";
    public static final String ORG_QUARTZ_SCHEDULER_INSTANCEID = "org.quartz.scheduler.instanceId";
    public static final String ORG_QUARTZ_SCHEDULER_MAKESCHEDULERTHREADDAEMON = "org.quartz.scheduler.makeSchedulerThreadDaemon";
    public static final String ORG_QUARTZ_JOBSTORE_USEPROPERTIES = "org.quartz.jobStore.useProperties";
    public static final String ORG_QUARTZ_THREADPOOL_CLASS = "org.quartz.threadPool.class";
    public static final String ORG_QUARTZ_THREADPOOL_THREADCOUNT = "org.quartz.threadPool.threadCount";
    public static final String ORG_QUARTZ_THREADPOOL_MAKETHREADSDAEMONS = "org.quartz.threadPool.makeThreadsDaemons";
    public static final String ORG_QUARTZ_THREADPOOL_THREADPRIORITY = "org.quartz.threadPool.threadPriority";
    public static final String ORG_QUARTZ_JOBSTORE_CLASS = "org.quartz.jobStore.class";
    public static final String ORG_QUARTZ_JOBSTORE_TABLEPREFIX = "org.quartz.jobStore.tablePrefix";
    public static final String ORG_QUARTZ_JOBSTORE_ISCLUSTERED = "org.quartz.jobStore.isClustered";
    public static final String ORG_QUARTZ_JOBSTORE_MISFIRETHRESHOLD = "org.quartz.jobStore.misfireThreshold";
    public static final String ORG_QUARTZ_JOBSTORE_CLUSTERCHECKININTERVAL = "org.quartz.jobStore.clusterCheckinInterval";
50
    public static final String ORG_QUARTZ_JOBSTORE_ACQUIRETRIGGERSWITHINLOCK = "org.quartz.jobStore.acquireTriggersWithinLock";
51 52 53 54 55 56 57 58 59 60 61 62 63 64
    public static final String ORG_QUARTZ_JOBSTORE_DATASOURCE = "org.quartz.jobStore.dataSource";
    public static final String ORG_QUARTZ_DATASOURCE_MYDS_CONNECTIONPROVIDER_CLASS = "org.quartz.dataSource.myDs.connectionProvider.class";

    /**
     * quartz config default value
     */
    public static final String QUARTZ_TABLE_PREFIX = "QRTZ_";
    public static final String QUARTZ_MISFIRETHRESHOLD = "60000";
    public static final String QUARTZ_CLUSTERCHECKININTERVAL = "5000";
    public static final String QUARTZ_DATASOURCE = "myDs";
    public static final String QUARTZ_THREADCOUNT = "25";
    public static final String QUARTZ_THREADPRIORITY = "5";
    public static final String QUARTZ_INSTANCENAME = "DolphinScheduler";
    public static final String QUARTZ_INSTANCEID = "AUTO";
65
    public static final String QUARTZ_ACQUIRETRIGGERSWITHINLOCK = "true";
66

L
ligang 已提交
67 68 69
    /**
     * common properties path
     */
70
    public static final String COMMON_PROPERTIES_PATH = "/common.properties";
L
ligang 已提交
71 72 73 74 75 76

    /**
     * fs.defaultFS
     */
    public static final String FS_DEFAULTFS = "fs.defaultFS";

journey2018's avatar
journey2018 已提交
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93

    /**
     * fs s3a endpoint
     */
    public static final String FS_S3A_ENDPOINT = "fs.s3a.endpoint";

    /**
     * fs s3a access key
     */
    public static final String FS_S3A_ACCESS_KEY = "fs.s3a.access.key";

    /**
     * fs s3a secret key
     */
    public static final String FS_S3A_SECRET_KEY = "fs.s3a.secret.key";


L
ligang 已提交
94
    /**
95
     * yarn.resourcemanager.ha.rm.ids
L
ligang 已提交
96 97
     */
    public static final String YARN_RESOURCEMANAGER_HA_RM_IDS = "yarn.resourcemanager.ha.rm.ids";
98 99
    public static final String YARN_RESOURCEMANAGER_HA_XX = "xx";

L
ligang 已提交
100 101 102 103 104 105

    /**
     * yarn.application.status.address
     */
    public static final String YARN_APPLICATION_STATUS_ADDRESS = "yarn.application.status.address";

106 107 108 109 110
    /**
     * yarn.job.history.status.address
     */
    public static final String YARN_JOB_HISTORY_STATUS_ADDRESS = "yarn.job.history.status.address";

L
add  
lgcareer 已提交
111 112 113 114 115
    /**
     * hdfs configuration
     * hdfs.root.user
     */
    public static final String HDFS_ROOT_USER = "hdfs.root.user";
L
ligang 已提交
116 117

    /**
118 119
     * hdfs/s3 configuration
     * resource.upload.path
L
ligang 已提交
120
     */
121
    public static final String RESOURCE_UPLOAD_PATH = "resource.upload.path";
L
ligang 已提交
122 123

    /**
124
     * data basedir path
L
ligang 已提交
125 126 127 128
     */
    public static final String DATA_BASEDIR_PATH = "data.basedir.path";

    /**
129
     * dolphinscheduler.env.path
L
ligang 已提交
130
     */
131
    public static final String DOLPHINSCHEDULER_ENV_PATH = "dolphinscheduler.env.path";
L
ligang 已提交
132

133 134 135 136
    /**
     * environment properties default path
     */
    public static final String ENV_PATH = "env/dolphinscheduler_env.sh";
137 138 139

    /**
     * python home
L
ligang 已提交
140
     */
141
    public static final String PYTHON_HOME="PYTHON_HOME";
L
ligang 已提交
142 143 144 145 146 147

    /**
     * resource.view.suffixs
     */
    public static final String RESOURCE_VIEW_SUFFIXS = "resource.view.suffixs";

148 149
    public static final String RESOURCE_VIEW_SUFFIXS_DEFAULT_VALUE = "txt,log,sh,conf,cfg,py,java,sql,hql,xml,properties";

L
ligang 已提交
150 151 152 153
    /**
     * development.state
     */
    public static final String DEVELOPMENT_STATE = "development.state";
154 155 156 157 158 159
    public static final String DEVELOPMENT_STATE_DEFAULT_VALUE = "true";

    /**
     * string true
     */
    public static final String STRING_TRUE = "true";
L
ligang 已提交
160

161
    /**
162
     * string false
163 164 165
     */
    public static final String STRING_FALSE = "false";

L
ligang 已提交
166
    /**
167
     * resource storage type
L
ligang 已提交
168
     */
169
    public static final String RESOURCE_STORAGE_TYPE = "resource.storage.type";
L
ligang 已提交
170 171 172 173

    /**
     * MasterServer directory registered in zookeeper
     */
Q
qiaozhanwei 已提交
174
    public static final String ZOOKEEPER_DOLPHINSCHEDULER_MASTERS = "/nodes/master";
L
ligang 已提交
175 176 177 178

    /**
     * WorkerServer directory registered in zookeeper
     */
179
    public static final String ZOOKEEPER_DOLPHINSCHEDULER_WORKERS = "/nodes/worker";
L
ligang 已提交
180 181 182 183

    /**
     * all servers directory registered in zookeeper
     */
184
    public static final String ZOOKEEPER_DOLPHINSCHEDULER_DEAD_SERVERS = "/dead-servers";
L
ligang 已提交
185 186 187 188

    /**
     * MasterServer lock directory registered in zookeeper
     */
189
    public static final String ZOOKEEPER_DOLPHINSCHEDULER_LOCK_MASTERS = "/lock/masters";
L
ligang 已提交
190 191 192 193 194


    /**
     * MasterServer failover directory registered in zookeeper
     */
195
    public static final String ZOOKEEPER_DOLPHINSCHEDULER_LOCK_FAILOVER_MASTERS = "/lock/failover/masters";
L
ligang 已提交
196 197 198 199

    /**
     * WorkerServer failover directory registered in zookeeper
     */
200
    public static final String ZOOKEEPER_DOLPHINSCHEDULER_LOCK_FAILOVER_WORKERS = "/lock/failover/workers";
L
ligang 已提交
201

Q
qiaozhanwei 已提交
202 203 204
    /**
     * MasterServer startup  failover runing and fault tolerance process
     */
205
    public static final String ZOOKEEPER_DOLPHINSCHEDULER_LOCK_FAILOVER_STARTUP_MASTERS = "/lock/failover/startup-masters";
Q
qiaozhanwei 已提交
206

L
ligang 已提交
207 208 209 210 211 212

    /**
     * comma ,
     */
    public static final String COMMA = ",";

T
Tboy 已提交
213 214 215 216 217
    /**
     * slash /
     */
    public static final String SLASH = "/";

L
ligang 已提交
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
    /**
     * COLON :
     */
    public static final String COLON = ":";

    /**
     * SINGLE_SLASH /
     */
    public static final String SINGLE_SLASH = "/";

    /**
     * DOUBLE_SLASH //
     */
    public static final String DOUBLE_SLASH = "//";

    /**
     * SEMICOLON ;
     */
    public static final String SEMICOLON = ";";

238
    /**
journey2018's avatar
journey2018 已提交
239
     * EQUAL SIGN
240
     */
journey2018's avatar
journey2018 已提交
241
    public static final String EQUAL_SIGN = "=";
242

L
ligang 已提交
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257

    public static final String WORKER_MAX_CPULOAD_AVG = "worker.max.cpuload.avg";

    public static final String WORKER_RESERVED_MEMORY = "worker.reserved.memory";

    public static final String MASTER_MAX_CPULOAD_AVG = "master.max.cpuload.avg";

    public static final String MASTER_RESERVED_MEMORY = "master.reserved.memory";


    /**
     * date format of yyyy-MM-dd HH:mm:ss
     */
    public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";

journey2018's avatar
journey2018 已提交
258

L
ligang 已提交
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302
    /**
     * date format of yyyyMMddHHmmss
     */
    public static final String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";

    /**
     * http connect time out
     */
    public static final int HTTP_CONNECT_TIMEOUT = 60 * 1000;


    /**
     * http connect request time out
     */
    public static final int HTTP_CONNECTION_REQUEST_TIMEOUT = 60 * 1000;

    /**
     * httpclient soceket time out
     */
    public static final int SOCKET_TIMEOUT = 60 * 1000;

    /**
     * http header
     */
    public static final String HTTP_HEADER_UNKNOWN = "unKnown";

    /**
     * http X-Forwarded-For
     */
    public static final String HTTP_X_FORWARDED_FOR = "X-Forwarded-For";

    /**
     * http X-Real-IP
     */
    public static final String HTTP_X_REAL_IP = "X-Real-IP";

    /**
     * UTF-8
     */
    public static final String UTF_8 = "UTF-8";

    /**
     * user name regex
     */
303
    public static final Pattern REGEX_USER_NAME = Pattern.compile("^[a-zA-Z0-9._-]{3,20}$");
L
ligang 已提交
304 305 306 307

    /**
     * email regex
     */
B
bao liang 已提交
308
    public static final Pattern REGEX_MAIL_NAME = Pattern.compile("^([a-z0-9A-Z]+[_|\\-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$");
L
ligang 已提交
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346

    /**
     * read permission
     */
    public static final int READ_PERMISSION = 2 * 1;


    /**
     * write permission
     */
    public static final int WRITE_PERMISSION = 2 * 2;


    /**
     * execute permission
     */
    public static final int EXECUTE_PERMISSION = 1;

    /**
     * default admin permission
     */
    public static final int DEFAULT_ADMIN_PERMISSION = 7;


    /**
     * all permissions
     */
    public static final int ALL_PERMISSIONS = READ_PERMISSION | WRITE_PERMISSION | EXECUTE_PERMISSION;

    /**
     * max task timeout
     */
    public static final int MAX_TASK_TIMEOUT = 24 * 3600;


    /**
     * master cpu load
     */
347
    public static final int DEFAULT_MASTER_CPU_LOAD = Runtime.getRuntime().availableProcessors() * 2;
L
ligang 已提交
348 349 350 351

    /**
     * master reserved memory
     */
352
    public static final double DEFAULT_MASTER_RESERVED_MEMORY = OSUtils.totalMemorySize() / 10;
L
ligang 已提交
353 354 355 356

    /**
     * worker cpu load
     */
357
    public static final int DEFAULT_WORKER_CPU_LOAD = Runtime.getRuntime().availableProcessors() * 2;
L
ligang 已提交
358 359 360 361

    /**
     * worker reserved memory
     */
362
    public static final double DEFAULT_WORKER_RESERVED_MEMORY = OSUtils.totalMemorySize() / 10;
L
ligang 已提交
363 364 365 366 367 368



    /**
     * default log cache rows num,output when reach the number
     */
369
    public static final int DEFAULT_LOG_ROWS_NUM = 4 * 16;
L
ligang 已提交
370 371

    /**
372
     * log flush interval?output when reach the interval
L
ligang 已提交
373
     */
374
    public static final int DEFAULT_LOG_FLUSH_INTERVAL = 1000;
L
ligang 已提交
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394


    /**
     * time unit secong to minutes
     */
    public static final int SEC_2_MINUTES_TIME_UNIT = 60;


    /***
     *
     * rpc port
     */
    public static final int RPC_PORT = 50051;

    /**
     * forbid running task
     */
    public static final String FLOWNODE_RUN_FLAG_FORBIDDEN = "FORBIDDEN";

    /**
395
     * datasource configuration path
L
ligang 已提交
396
     */
397
    public static final String DATASOURCE_PROPERTIES = "/datasource.properties";
L
ligang 已提交
398 399 400 401 402 403 404 405 406

    public static final String TASK_RECORD_URL = "task.record.datasource.url";

    public static final String TASK_RECORD_FLAG = "task.record.flag";

    public static final String TASK_RECORD_USER = "task.record.datasource.username";

    public static final String TASK_RECORD_PWD = "task.record.datasource.password";

leon-baoliang's avatar
update  
leon-baoliang 已提交
407
    public static final String DEFAULT = "Default";
journey2018's avatar
journey2018 已提交
408
    public static final String USER = "user";
409
    public static final String PASSWORD = "password";
journey2018's avatar
journey2018 已提交
410
    public static final String XXXXXX = "******";
411
    public static final String NULL = "NULL";
412 413
    public static final String THREAD_NAME_MASTER_SERVER = "Master-Server";
    public static final String THREAD_NAME_WORKER_SERVER = "Worker-Server";
leon-baoliang's avatar
update  
leon-baoliang 已提交
414

415
    public static final String TASK_RECORD_TABLE_HIVE_LOG = "eamp_hive_log_hd";
B
baoliang 已提交
416

417
    public static final String TASK_RECORD_TABLE_HISTORY_HIVE_LOG = "eamp_hive_hist_log_hd";
B
baoliang 已提交
418

journey2018's avatar
journey2018 已提交
419

L
ligang 已提交
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514
    /**
     * command parameter keys
     */
    public static final String CMDPARAM_RECOVER_PROCESS_ID_STRING = "ProcessInstanceId";

    public static final String CMDPARAM_RECOVERY_START_NODE_STRING = "StartNodeIdList";

    public static final String CMDPARAM_RECOVERY_WAITTING_THREAD = "WaittingThreadInstanceId";

    public static final String CMDPARAM_SUB_PROCESS = "processInstanceId";

    public static final String CMDPARAM_EMPTY_SUB_PROCESS = "0";

    public static final String CMDPARAM_SUB_PROCESS_PARENT_INSTANCE_ID = "parentProcessInstanceId";

    public static final String CMDPARAM_SUB_PROCESS_DEFINE_ID = "processDefinitionId";

    public static final String CMDPARAM_START_NODE_NAMES = "StartNodeNameList";

    /**
     * complement data start date
     */
    public static final String CMDPARAM_COMPLEMENT_DATA_START_DATE = "complementStartDate";

    /**
     * complement data end date
     */
    public static final String CMDPARAM_COMPLEMENT_DATA_END_DATE = "complementEndDate";

    /**
     * hadoop configuration
     */
    public static final String HADOOP_RM_STATE_ACTIVE = "ACTIVE";

    public static final String HADOOP_RM_STATE_STANDBY = "STANDBY";

    public static final String HADOOP_RESOURCE_MANAGER_HTTPADDRESS_PORT = "resource.manager.httpaddress.port";


    /**
     * data source config
     */

    public static final String SPRING_DATASOURCE_DRIVER_CLASS_NAME = "spring.datasource.driver-class-name";

    public static final String SPRING_DATASOURCE_URL = "spring.datasource.url";

    public static final String SPRING_DATASOURCE_USERNAME = "spring.datasource.username";

    public static final String SPRING_DATASOURCE_PASSWORD = "spring.datasource.password";

    public static final String SPRING_DATASOURCE_VALIDATION_QUERY_TIMEOUT = "spring.datasource.validationQueryTimeout";

    public static final String SPRING_DATASOURCE_INITIAL_SIZE = "spring.datasource.initialSize";

    public static final String SPRING_DATASOURCE_MIN_IDLE = "spring.datasource.minIdle";

    public static final String SPRING_DATASOURCE_MAX_ACTIVE = "spring.datasource.maxActive";

    public static final String SPRING_DATASOURCE_MAX_WAIT = "spring.datasource.maxWait";

    public static final String SPRING_DATASOURCE_TIME_BETWEEN_EVICTION_RUNS_MILLIS = "spring.datasource.timeBetweenEvictionRunsMillis";

    public static final String SPRING_DATASOURCE_TIME_BETWEEN_CONNECT_ERROR_MILLIS = "spring.datasource.timeBetweenConnectErrorMillis";

    public static final String SPRING_DATASOURCE_MIN_EVICTABLE_IDLE_TIME_MILLIS = "spring.datasource.minEvictableIdleTimeMillis";

    public static final String SPRING_DATASOURCE_VALIDATION_QUERY = "spring.datasource.validationQuery";

    public static final String SPRING_DATASOURCE_TEST_WHILE_IDLE = "spring.datasource.testWhileIdle";

    public static final String SPRING_DATASOURCE_TEST_ON_BORROW = "spring.datasource.testOnBorrow";

    public static final String SPRING_DATASOURCE_TEST_ON_RETURN = "spring.datasource.testOnReturn";

    public static final String SPRING_DATASOURCE_POOL_PREPARED_STATEMENTS = "spring.datasource.poolPreparedStatements";

    public static final String SPRING_DATASOURCE_DEFAULT_AUTO_COMMIT = "spring.datasource.defaultAutoCommit";

    public static final String SPRING_DATASOURCE_KEEP_ALIVE = "spring.datasource.keepAlive";

    public static final String SPRING_DATASOURCE_MAX_POOL_PREPARED_STATEMENT_PER_CONNECTION_SIZE = "spring.datasource.maxPoolPreparedStatementPerConnectionSize";

    public static final String DEVELOPMENT = "development";

    public static final String QUARTZ_PROPERTIES_PATH = "quartz.properties";

    /**
     * sleep time
     */
    public static final int SLEEP_TIME_MILLIS = 1000;

    /**
     * heartbeat for zk info length
     */
515
    public static final int HEARTBEAT_FOR_ZOOKEEPER_INFO_LENGTH = 5;
L
ligang 已提交
516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551


    /**
     * hadoop params constant
     */
    /**
     * jar
     */
    public static final String JAR = "jar";

    /**
     * hadoop
     */
    public static final String HADOOP = "hadoop";

    /**
     * -D parameter
     */
    public static final String D = "-D";

    /**
     * -D mapreduce.job.queuename=ququename
     */
    public static final String MR_QUEUE = "mapreduce.job.queuename";


    /**
     * spark params constant
     */
    public static final String MASTER = "--master";

    public static final String DEPLOY_MODE = "--deploy-mode";

    /**
     * --class CLASS_NAME
     */
552
    public static final String MAIN_CLASS = "--class";
L
ligang 已提交
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585

    /**
     * --driver-cores NUM
     */
    public static final String DRIVER_CORES = "--driver-cores";

    /**
     * --driver-memory MEM
     */
    public static final String DRIVER_MEMORY = "--driver-memory";

    /**
     * --num-executors NUM
     */
    public static final String NUM_EXECUTORS = "--num-executors";

    /**
     * --executor-cores NUM
     */
    public static final String EXECUTOR_CORES = "--executor-cores";

    /**
     * --executor-memory MEM
     */
    public static final String EXECUTOR_MEMORY = "--executor-memory";


    /**
     * --queue QUEUE
     */
    public static final String SPARK_QUEUE = "--queue";


586 587 588 589 590 591
    /**
     * --queue --qu
     */
    public static final String FLINK_QUEUE = "--qu";


L
ligang 已提交
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692
    /**
     * exit code success
     */
    public static final int EXIT_CODE_SUCCESS = 0;

    /**
     * exit code kill
     */
    public static final int EXIT_CODE_KILL = 137;

    /**
     * exit code failure
     */
    public static final int EXIT_CODE_FAILURE = -1;

    /**
     * date format of yyyyMMdd
     */
    public static final String PARAMETER_FORMAT_DATE = "yyyyMMdd";

    /**
     * date format of yyyyMMddHHmmss
     */
    public static final String PARAMETER_FORMAT_TIME = "yyyyMMddHHmmss";

    /**
     * system date(yyyyMMddHHmmss)
     */
    public static final String PARAMETER_DATETIME = "system.datetime";

    /**
     * system date(yyyymmdd) today
     */
    public static final String PARAMETER_CURRENT_DATE = "system.biz.curdate";

    /**
     * system date(yyyymmdd) yesterday
     */
    public static final String PARAMETER_BUSINESS_DATE = "system.biz.date";

    /**
     * ACCEPTED
     */
    public static final String ACCEPTED = "ACCEPTED";

    /**
     * SUCCEEDED
     */
    public static final String SUCCEEDED = "SUCCEEDED";
    /**
     * NEW
     */
    public static final String NEW = "NEW";
    /**
     * NEW_SAVING
     */
    public static final String NEW_SAVING = "NEW_SAVING";
    /**
     * SUBMITTED
     */
    public static final String SUBMITTED = "SUBMITTED";
    /**
     * FAILED
     */
    public static final String FAILED = "FAILED";
    /**
     * KILLED
     */
    public static final String KILLED = "KILLED";
    /**
     * RUNNING
     */
    public static final String RUNNING = "RUNNING";
    /**
     * underline  "_"
     */
    public static final String UNDERLINE = "_";
    /**
     * quartz job prifix
     */
    public static final String QUARTZ_JOB_PRIFIX = "job";
    /**
     * quartz job group prifix
     */
    public static final String QUARTZ_JOB_GROUP_PRIFIX = "jobgroup";
    /**
     * projectId
     */
    public static final String PROJECT_ID = "projectId";
    /**
     * processId
     */
    public static final String SCHEDULE_ID = "scheduleId";
    /**
     * schedule
     */
    public static final String SCHEDULE = "schedule";
    /**
     * application regex
     */
    public static final String APPLICATION_REGEX = "application_\\d+_\\d+";
693
    public static final String PID = OSUtils.isWindows() ? "handle" : "pid";
L
ligang 已提交
694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746
    /**
     * month_begin
     */
    public static final String MONTH_BEGIN = "month_begin";
    /**
     * add_months
     */
    public static final String ADD_MONTHS = "add_months";
    /**
     * month_end
     */
    public static final String MONTH_END = "month_end";
    /**
     * week_begin
     */
    public static final String WEEK_BEGIN = "week_begin";
    /**
     * week_end
     */
    public static final String WEEK_END = "week_end";
    /**
     * timestamp
     */
    public static final String TIMESTAMP = "timestamp";
    public static final char SUBTRACT_CHAR = '-';
    public static final char ADD_CHAR = '+';
    public static final char MULTIPLY_CHAR = '*';
    public static final char DIVISION_CHAR = '/';
    public static final char LEFT_BRACE_CHAR = '(';
    public static final char RIGHT_BRACE_CHAR = ')';
    public static final String ADD_STRING = "+";
    public static final String MULTIPLY_STRING = "*";
    public static final String DIVISION_STRING = "/";
    public static final String LEFT_BRACE_STRING = "(";
    public static final char P = 'P';
    public static final char N = 'N';
    public static final String SUBTRACT_STRING = "-";
    public static final String GLOBAL_PARAMS = "globalParams";
    public static final String LOCAL_PARAMS = "localParams";
    public static final String PROCESS_INSTANCE_STATE = "processInstanceState";
    public static final String TASK_LIST = "taskList";
    public static final String RWXR_XR_X = "rwxr-xr-x";

    /**
     * master/worker server use for zk
     */
    public static final String MASTER_PREFIX = "master";
    public static final String WORKER_PREFIX = "worker";
    public static final String DELETE_ZK_OP = "delete";
    public static final String ADD_ZK_OP = "add";
    public static final String ALIAS = "alias";
    public static final String CONTENT = "content";
    public static final String DEPENDENT_SPLIT = ":||";
747
    public static final String DEPENDENT_ALL = "ALL";
B
baoliang 已提交
748 749 750


    /**
L
lgcareer 已提交
751
     *  preview schedule execute count
B
baoliang 已提交
752
     */
L
lgcareer 已提交
753
    public static final int PREVIEW_SCHEDULE_EXECUTE_COUNT = 5;
journey2018's avatar
journey2018 已提交
754

journey2018's avatar
journey2018 已提交
755 756 757 758 759
    /**
     * kerberos
     */
    public static final String KERBEROS = "kerberos";

760 761 762 763 764
    /**
     * kerberos expire time
     */
    public static final String KERBEROS_EXPIRE_TIME = "kerberos.expire.time";

journey2018's avatar
journey2018 已提交
765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790
    /**
     * java.security.krb5.conf
     */
    public static final String JAVA_SECURITY_KRB5_CONF = "java.security.krb5.conf";

    /**
     * java.security.krb5.conf.path
     */
    public static final String JAVA_SECURITY_KRB5_CONF_PATH = "java.security.krb5.conf.path";

    /**
     * hadoop.security.authentication
     */
    public static final String HADOOP_SECURITY_AUTHENTICATION = "hadoop.security.authentication";

    /**
     * hadoop.security.authentication
     */
    public static final String HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE = "hadoop.security.authentication.startup.state";


    /**
     * loginUserFromKeytab user
     */
    public static final String LOGIN_USER_KEY_TAB_USERNAME = "login.user.keytab.username";

B
baoliang 已提交
791
    /**
792
     * default worker group id
B
baoliang 已提交
793
     */
794
    public static final int DEFAULT_WORKER_ID = -1;
L
lidongdai 已提交
795

journey2018's avatar
journey2018 已提交
796 797 798 799
    /**
     * loginUserFromKeytab path
     */
    public static final String LOGIN_USER_KEY_TAB_PATH = "login.user.keytab.path";
journey2018's avatar
journey2018 已提交
800

801 802 803 804
    /**
     * task log info format
     */
    public static final String TASK_LOG_INFO_FORMAT = "TaskLogInfo-%s";
journey2018's avatar
journey2018 已提交
805 806 807 808 809

    /**
     * hive conf
     */
    public static final String HIVE_CONF = "hiveconf:";
810

811
    //flink ??
812 813 814 815 816 817 818 819
    public static final String FLINK_YARN_CLUSTER = "yarn-cluster";
    public static final String FLINK_RUN_MODE = "-m";
    public static final String FLINK_YARN_SLOT = "-ys";
    public static final String FLINK_APP_NAME = "-ynm";
    public static final String FLINK_TASK_MANAGE = "-yn";

    public static final String FLINK_JOB_MANAGE_MEM = "-yjm";
    public static final String FLINK_TASK_MANAGE_MEM = "-ytm";
820
    public static final String FLINK_DETACH = "-d";
821 822 823
    public static final String FLINK_MAIN_CLASS = "-c";


824 825 826 827 828 829 830 831 832
    public static final int[] NOT_TERMINATED_STATES = new int[]{
            ExecutionStatus.SUBMITTED_SUCCESS.ordinal(),
            ExecutionStatus.RUNNING_EXEUTION.ordinal(),
            ExecutionStatus.READY_PAUSE.ordinal(),
            ExecutionStatus.READY_STOP.ordinal(),
            ExecutionStatus.NEED_FAULT_TOLERANCE.ordinal(),
            ExecutionStatus.WAITTING_THREAD.ordinal(),
            ExecutionStatus.WAITTING_DEPEND.ordinal()
    };
833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858

    /**
     * status
     */
    public static final String STATUS = "status";

    /**
     * message
     */
    public static final String MSG = "msg";

    /**
     * data total
     */
    public  static final String COUNT = "count";

    /**
     * page size
     */
    public  static final String PAGE_SIZE = "pageSize";

    /**
     * current page no
     */
    public  static final String PAGE_NUMBER = "pageNo";

859

860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891

    /**
     *
     */
    public static final String DATA_LIST = "data";

    public static final String TOTAL_LIST = "totalList";

    public static final String CURRENT_PAGE = "currentPage";

    public static final String TOTAL_PAGE = "totalPage";

    public static final String TOTAL = "total";

    /**
     * session user
     */
    public static final String SESSION_USER = "session.user";

    public static final String SESSION_ID = "sessionId";

    public static final String PASSWORD_DEFAULT = "******";

    /**
     * driver
     */
    public static final String ORG_POSTGRESQL_DRIVER = "org.postgresql.Driver";
    public static final String COM_MYSQL_JDBC_DRIVER = "com.mysql.jdbc.Driver";
    public static final String ORG_APACHE_HIVE_JDBC_HIVE_DRIVER = "org.apache.hive.jdbc.HiveDriver";
    public static final String COM_CLICKHOUSE_JDBC_DRIVER = "ru.yandex.clickhouse.ClickHouseDriver";
    public static final String COM_ORACLE_JDBC_DRIVER = "oracle.jdbc.driver.OracleDriver";
    public static final String COM_SQLSERVER_JDBC_DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
B
bao liang 已提交
892
    public static final String COM_DB2_JDBC_DRIVER = "com.ibm.db2.jcc.DB2Driver";
893 894 895 896 897 898 899 900 901 902 903

    /**
     * database type
     */
    public static final String MYSQL = "MYSQL";
    public static final String POSTGRESQL = "POSTGRESQL";
    public static final String HIVE = "HIVE";
    public static final String SPARK = "SPARK";
    public static final String CLICKHOUSE = "CLICKHOUSE";
    public static final String ORACLE = "ORACLE";
    public static final String SQLSERVER = "SQLSERVER";
B
bao liang 已提交
904
    public static final String DB2 = "DB2";
905 906 907 908 909 910 911 912

    /**
     * jdbc url
     */
    public static final String JDBC_MYSQL = "jdbc:mysql://";
    public static final String JDBC_POSTGRESQL = "jdbc:postgresql://";
    public static final String JDBC_HIVE_2 = "jdbc:hive2://";
    public static final String JDBC_CLICKHOUSE = "jdbc:clickhouse://";
913 914
    public static final String JDBC_ORACLE_SID = "jdbc:oracle:thin:@";
    public static final String JDBC_ORACLE_SERVICE_NAME = "jdbc:oracle:thin:@//";
915
    public static final String JDBC_SQLSERVER = "jdbc:sqlserver://";
B
bao liang 已提交
916
    public static final String JDBC_DB2 = "jdbc:db2://";
917 918 919 920 921 922 923 924 925 926 927 928 929


    public static final String ADDRESS = "address";
    public static final String DATABASE = "database";
    public static final String JDBC_URL = "jdbcUrl";
    public static final String PRINCIPAL = "principal";
    public static final String OTHER = "other";


    /**
     * session timeout
     */
    public static final int SESSION_TIME_OUT = 7200;
930
    public static final int MAX_FILE_SIZE = 1024 * 1024 * 1024;
931 932 933 934
    public static final String UDF = "UDF";
    public static final String CLASS = "class";
    public static final String RECEIVERS = "receivers";
    public static final String RECEIVERS_CC = "receiversCc";
Q
qiaozhanwei 已提交
935

936 937 938 939 940

    /**
     * dataSource sensitive param
     */
    public static final String DATASOURCE_PASSWORD_REGEX = "(?<=(\"password\":\")).*?(?=(\"))";
T
Tboy 已提交
941 942 943 944 945

    /**
     * default worker group
     */
    public static final String DEFAULT_WORKER_GROUP = "default";
Q
qiaozhanwei 已提交
946 947

    public static final Integer TASK_INFO_LENGTH = 5;
948 949 950 951 952 953

    /**
     * new
     * schedule time
     */
    public static final String PARAMETER_SHECDULE_TIME = "schedule.time";
954 955 956 957 958 959 960 961
    /**
     * authorize writable perm
     */
    public static final int AUTHORIZE_WRITABLE_PERM=7;
    /**
     * authorize readable perm
     */
    public static final int AUTHORIZE_READABLE_PERM=4;
962 963 964 965 966 967 968


    /**
     * plugin configurations
     */
    public static final String PLUGIN_JAR_SUFFIX = ".jar";

L
ligang 已提交
969
}