ConfigConstants.java 29.1 KB
Newer Older
1
/*
2 3 4 5 6 7 8
 * 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
S
sewen 已提交
9 10 11
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
12 13 14 15 16 17 18
 * 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.
 */

19
package org.apache.flink.configuration;
S
sewen 已提交
20

21 22
import org.apache.flink.annotation.Public;

S
sewen 已提交
23 24 25 26
/**
 * This class contains all constants for the configuration. That includes the configuration keys and
 * the default values.
 */
27
@Public
S
sewen 已提交
28
public final class ConfigConstants {
S
sewen 已提交
29

S
sewen 已提交
30
	// ------------------------------------------------------------------------
S
StephanEwen 已提交
31
	//                            Configuration Keys
S
sewen 已提交
32
	// ------------------------------------------------------------------------
S
StephanEwen 已提交
33 34
	
	// ---------------------------- Parallelism -------------------------------
S
sewen 已提交
35

S
StephanEwen 已提交
36
	/**
37
	 * The config parameter defining the default parallelism for jobs.
S
StephanEwen 已提交
38
	 */
39
	public static final String DEFAULT_PARALLELISM_KEY = "parallelism.default";
40

41 42 43 44
	/**
	 * Config parameter for the number of re-tries for failed tasks. Setting this
	 * value to 0 effectively disables fault tolerance.
	 */
45
	public static final String EXECUTION_RETRIES_KEY = "execution-retries.default";
46 47 48 49 50

	/**
	 * Config parameter for the delay between execution retries. The value must be specified in the
	 * notation "10 s" or "1 min" (style of Scala Finite Durations)
	 */
51
	public static final String EXECUTION_RETRY_DELAY_KEY = "execution-retries.delay";
52
	
S
StephanEwen 已提交
53
	// -------------------------------- Runtime -------------------------------
D
Daniel Warneke 已提交
54
	
S
StephanEwen 已提交
55 56
	/**
	 * The config parameter defining the network address to connect to
S
sewen 已提交
57 58 59 60 61
	 * for communication with the job manager.
	 */
	public static final String JOB_MANAGER_IPC_ADDRESS_KEY = "jobmanager.rpc.address";

	/**
S
StephanEwen 已提交
62
	 * The config parameter defining the network port to connect to
S
sewen 已提交
63 64 65 66
	 * for communication with the job manager.
	 */
	public static final String JOB_MANAGER_IPC_PORT_KEY = "jobmanager.rpc.port";

67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
	/**
	 * The config parameter defining the storage directory to be used by the blob server.
	 */
	public static final String BLOB_STORAGE_DIRECTORY_KEY = "blob.storage.directory";

	/**
	 * The config parameter defining number of retires for failed BLOB fetches.
	 */
	public static final String BLOB_FETCH_RETRIES_KEY = "blob.fetch.retries";

	/**
	 * The config parameter defining the maximum number of concurrent BLOB fetches that the JobManager serves.
	 */
	public static final String BLOB_FETCH_CONCURRENT_KEY = "blob.fetch.num-concurrent";

	/**
	 * The config parameter defining the backlog of BLOB fetches on the JobManager
	 */
	public static final String BLOB_FETCH_BACKLOG_KEY = "blob.fetch.backlog";

87 88 89 90 91
	/**
	 * The config parameter defining the server port of the blob service.
	 * The port can either be a port, such as "9123",
	 * a range of ports: "50100-50200"
	 * or a list of ranges and or points: "50100-50200,50300-50400,51234"
92 93
	 *
	 * Setting the port to 0 will let the OS choose an available port.
94 95 96
	 */
	public static final String BLOB_SERVER_PORT = "blob.server.port";

97 98 99 100 101
	/**
	 * The config parameter defining the cleanup interval of the library cache manager.
	 */
	public static final String LIBRARY_CACHE_MANAGER_CLEANUP_INTERVAL = "library-cache-manager.cleanup.interval";

102 103 104 105 106
	/**
	 * The config parameter defining the task manager's hostname.
	 */
	public static final String TASK_MANAGER_HOSTNAME_KEY = "taskmanager.hostname";

S
sewen 已提交
107
	/**
S
StephanEwen 已提交
108
	 * The config parameter defining the task manager's IPC port from the configuration.
S
sewen 已提交
109 110 111 112
	 */
	public static final String TASK_MANAGER_IPC_PORT_KEY = "taskmanager.rpc.port";

	/**
S
StephanEwen 已提交
113
	 * The config parameter defining the task manager's data port from the configuration.
S
sewen 已提交
114 115 116 117
	 */
	public static final String TASK_MANAGER_DATA_PORT_KEY = "taskmanager.data.port";

	/**
S
StephanEwen 已提交
118
	 * The config parameter defining the directories for temporary files.
S
sewen 已提交
119
	 */
120
	public static final String TASK_MANAGER_TMP_DIR_KEY = "taskmanager.tmp.dirs";
S
StephanEwen 已提交
121 122 123 124 125 126 127

	/**
	 * The config parameter defining the amount of memory to be allocated by the task manager's
	 * memory manager (in megabytes). If not set, a relative fraction will be allocated, as defined
	 * by {@link #TASK_MANAGER_MEMORY_FRACTION_KEY}.
	 */
	public static final String TASK_MANAGER_MEMORY_SIZE_KEY = "taskmanager.memory.size";
S
sewen 已提交
128 129
	
	/**
S
StephanEwen 已提交
130 131 132 133
	 * The config parameter defining the fraction of free memory allocated by the memory manager.
	 */
	public static final String TASK_MANAGER_MEMORY_FRACTION_KEY = "taskmanager.memory.fraction";

134 135 136 137
	/**
	 * The config parameter defining the memory allocation method (JVM heap or off-heap).
	*/
	public static final String TASK_MANAGER_MEMORY_OFF_HEAP_KEY = "taskmanager.memory.off-heap";
138

139 140 141 142 143 144
	/**
	 * The config parameter for specifying whether TaskManager managed memory should be preallocated
	 * when the TaskManager is starting. (default is false)
	 */
	public static final String TASK_MANAGER_MEMORY_PRE_ALLOCATE_KEY = "taskmanager.memory.preallocate";

S
StephanEwen 已提交
145 146 147
	/**
	 * The config parameter defining the number of buffers used in the network stack. This defines the
	 * number of possible tasks and shuffles.
S
sewen 已提交
148
	 */
S
StephanEwen 已提交
149
	public static final String TASK_MANAGER_NETWORK_NUM_BUFFERS_KEY = "taskmanager.network.numberOfBuffers";
S
sewen 已提交
150

151 152 153 154 155
	/**
	 * Config parameter defining the size of memory buffers used by the network stack and the memory manager.
	 */
	public static final String TASK_MANAGER_MEMORY_SEGMENT_SIZE_KEY = "taskmanager.memory.segment-size";
	
156 157 158 159 160 161
	/**
	 * The implementation to use for spillable/spilled intermediate results, which have both
	 * synchronous and asynchronous implementations: "sync" or "async".
	 */
	public static final String TASK_MANAGER_NETWORK_DEFAULT_IO_MODE = "taskmanager.network.defaultIOMode";

162 163 164 165 166
	/**
	 * The config parameter defining the number of task slots of a task manager.
	 */
	public static final String TASK_MANAGER_NUM_TASK_SLOTS = "taskmanager.numberOfTaskSlots";

167 168 169 170 171 172 173 174 175 176
	/**
	 * Flag indicating whether to start a thread, which repeatedly logs the memory usage of the JVM.
	 */
	public static final String TASK_MANAGER_DEBUG_MEMORY_USAGE_START_LOG_THREAD = "taskmanager.debug.memory.startLogThread";

	/**
	 * The interval (in ms) for the log thread to log the current memory usage.
	 */
	public static final String TASK_MANAGER_DEBUG_MEMORY_USAGE_LOG_INTERVAL_MS = "taskmanager.debug.memory.logIntervalMs";

177 178 179 180 181
	/**
	 *
	 */
	public static final String TASK_MANAGER_MAX_REGISTRATION_DURATION = "taskmanager.maxRegistrationDuration";

182 183
	// --------------------------- Runtime Algorithms -------------------------------
	
184
	/**
S
StephanEwen 已提交
185 186 187
	 * Parameter for the maximum fan for out-of-core algorithms.
	 * Corresponds to the maximum fan-in for merge-sorts and the maximum fan-out
	 * for hybrid hash joins. 
188
	 */
S
StephanEwen 已提交
189
	public static final String DEFAULT_SPILLING_MAX_FAN_KEY = "taskmanager.runtime.max-fan";
190
	
191
	/**
S
StephanEwen 已提交
192 193
	 * Key for the default spilling threshold. When more than the threshold memory of the sort buffers is full, the
	 * sorter will start spilling to disk.
194
	 */
S
StephanEwen 已提交
195
	public static final String DEFAULT_SORT_SPILLING_THRESHOLD_KEY = "taskmanager.runtime.sort-spilling-threshold";
196 197 198 199 200

	/**
	 * Parameter to switch hash join bloom filters for spilled partitions on and off.
	 */
	public static final String RUNTIME_HASH_JOIN_BLOOM_FILTERS_KEY = "taskmanager.runtime.hashjoin-bloom-filters";
S
StephanEwen 已提交
201 202 203 204 205 206
	
	/**
	 * The config parameter defining the timeout for filesystem stream opening.
	 * A value of 0 indicates infinite waiting.
	 */
	public static final String FS_STREAM_OPENING_TIMEOUT_KEY = "taskmanager.runtime.fs_timeout";
207

208 209 210 211 212 213 214
	// ------------------------ YARN Configuration ------------------------

	/**
	 * Percentage of heap space to remove from containers started by YARN.
	 */
	public static final String YARN_HEAP_CUTOFF_RATIO = "yarn.heap-cutoff-ratio";

215 216 217 218 219
	/**
	 * Minimum amount of memory to remove from the heap space as a safety margin.
	 */
	public static final String YARN_HEAP_CUTOFF_MIN = "yarn.heap-cutoff-min";

220 221 222 223 224 225 226 227 228 229 230 231 232 233
	/**
	 * Reallocate failed YARN containers.
	 */
	public static final String YARN_REALLOCATE_FAILED_CONTAINERS = "yarn.reallocate-failed";

	/**
	 * The maximum number of failed YARN containers before entirely stopping
	 * the YARN session / job on YARN.
	 *
	 * By default, we take the number of of initially requested containers.
	 */
	public static final String YARN_MAX_FAILED_CONTAINERS = "yarn.maximum-failed-containers";

	/**
234 235
	 * Set the number of retries for failed YARN ApplicationMasters/JobManagers in high
	 * availability mode. This value is usually limited by YARN.
236
	 *
237
	 * By default, it's 1 in the standalone case and 2 in the high availability case.
238 239 240 241
	 */
	public static final String YARN_APPLICATION_ATTEMPTS = "yarn.application-attempts";

	/**
242
	 * The heartbeat interval between the Application Master and the YARN Resource Manager.
243 244 245 246 247
	 *
	 * The default value is 5 (seconds).
	 */
	public static final String YARN_HEARTBEAT_DELAY_SECONDS = "yarn.heartbeat-delay";

248 249 250 251 252 253 254 255 256
	/**
	 * When a Flink job is submitted to YARN, the JobManager's host and the number of available
	 * processing slots is written into a properties file, so that the Flink client is able
	 * to pick those details up.
	 * This configuration parameter allows changing the default location of that file (for example
	 * for environments sharing a Flink installation between users)
	 */
	public static final String YARN_PROPERTIES_FILE_LOCATION = "yarn.properties-file.location";

257 258 259 260 261 262 263 264 265 266 267 268 269 270
	/**
	 * Prefix for passing custom environment variables to Flink's ApplicationMaster (JobManager).
	 * For example for passing LD_LIBRARY_PATH as an env variable to the AppMaster, set:
	 * 	yarn.application-master.env.LD_LIBRARY_PATH: "/usr/lib/native"
	 * in the flink-conf.yaml.
	 */
	public static final String YARN_APPLICATION_MASTER_ENV_PREFIX = "yarn.application-master.env.";

	/**
	 * Similar to the {@see YARN_APPLICATION_MASTER_ENV_PREFIX}, this configuration prefix allows
	 * setting custom environment variables.
	 */
	public static final String YARN_TASK_MANAGER_ENV_PREFIX = "yarn.taskmanager.env.";

271

272 273 274 275 276 277 278 279 280 281 282 283 284 285

	 /**
	 * The config parameter defining the Akka actor system port for the ApplicationMaster and
	 * JobManager
	 *
	 * The port can either be a port, such as "9123",
	 * a range of ports: "50100-50200"
	 * or a list of ranges and or points: "50100-50200,50300-50400,51234"
	 *
	 * Setting the port to 0 will let the OS choose an available port.
	 */
	public static final String YARN_APPLICATION_MASTER_PORT = "yarn.application-master.port";


286
	// ------------------------ Hadoop Configuration ------------------------
287

R
Robert Metzger 已提交
288 289 290 291 292 293 294 295 296
	/**
	 * Path to hdfs-defaul.xml file
	 */
	public static final String HDFS_DEFAULT_CONFIG = "fs.hdfs.hdfsdefault";
	
	/**
	 * Path to hdfs-site.xml file
	 */
	public static final String HDFS_SITE_CONFIG = "fs.hdfs.hdfssite";
M
markus 已提交
297
	
R
Robert Metzger 已提交
298 299 300 301
	/**
	 * Path to Hadoop configuration
	 */
	public static final String PATH_HADOOP_CONFIG = "fs.hdfs.hadoopconf";
302
	
303
	// ------------------------ File System Behavior ------------------------
304 305 306 307 308

	/**
	 * Key to specify whether the file systems should simply overwrite existing files.
	 */
	public static final String FILESYSTEM_DEFAULT_OVERWRITE_KEY = "fs.overwrite-files";
R
Robert Metzger 已提交
309

310 311 312 313
	/**
	 * Key to specify whether the file systems should always create a directory for the output, even with a parallelism of one.
	 */
	public static final String FILESYSTEM_OUTPUT_ALWAYS_CREATE_DIRECTORY_KEY = "fs.output.always-create-directory";
R
Robert Metzger 已提交
314

S
StephanEwen 已提交
315
	// ---------------------------- Compiler -------------------------------
M
markus 已提交
316 317

	/**
S
StephanEwen 已提交
318 319
	 * The maximum number of line samples to be taken by the delimited input format, if no
	 * other value is specified for the data source.
M
markus 已提交
320
	 */
S
StephanEwen 已提交
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
	public static final String DELIMITED_FORMAT_MAX_LINE_SAMPLES_KEY = "compiler.delimited-informat.max-line-samples";

	/**
	 * The minimum number of line samples to be taken by the delimited input format, if no
	 * other value is specified for the data source.
	 */
	public static final String DELIMITED_FORMAT_MIN_LINE_SAMPLES_KEY = "compiler.delimited-informat.min-line-samples";

	/**
	 * The maximum length of a single sampled record before the sampling is aborted.
	 */
	public static final String DELIMITED_FORMAT_MAX_SAMPLE_LENGTH_KEY = "compiler.delimited-informat.max-sample-len";
	
	
	// ------------------------- JobManager Web Frontend ----------------------
M
markus 已提交
336 337
	
	/**
338
	 * The port for the runtime monitor web-frontend server.
M
markus 已提交
339 340 341
	 */
	public static final String JOB_MANAGER_WEB_PORT_KEY = "jobmanager.web.port";

S
StephanEwen 已提交
342
	/**
S
StephanEwen 已提交
343 344 345
	 * The config parameter defining the number of archived jobs for the jobmanager
	 */
	public static final String JOB_MANAGER_WEB_ARCHIVE_COUNT = "jobmanager.web.history";
346

347 348 349 350
	/**
	 * The log file location (may be in /log for standalone but under log directory when using YARN)
	 */
	public static final String JOB_MANAGER_WEB_LOG_PATH_KEY = "jobmanager.web.log.path";
351

352
	/** Config parameter indicating whether jobs can be uploaded and run from the web-frontend. */
353
	public static final String JOB_MANAGER_WEB_SUBMIT_ENABLED_KEY = "jobmanager.web.submit.enable";
354

355 356 357 358 359
	/** Flag to disable checkpoint stats. */
	public static final String JOB_MANAGER_WEB_CHECKPOINTS_DISABLE = "jobmanager.web.checkpoints.disable";

	/** Config parameter defining the number of checkpoints to remember for recent history. */
	public static final String JOB_MANAGER_WEB_CHECKPOINTS_HISTORY_SIZE = "jobmanager.web.checkpoints.history";
360 361 362 363 364 365 366 367 368 369 370 371

	/** Time after which cached stats are cleaned up if not accessed. */
	public static final String JOB_MANAGER_WEB_BACK_PRESSURE_CLEAN_UP_INTERVAL = "jobmanager.web.backpressure.cleanup-interval";

	/** Time after which available stats are deprecated and need to be refreshed (by resampling). */
	public static final String JOB_MANAGER_WEB_BACK_PRESSURE_REFRESH_INTERVAL = "jobmanager.web.backpressure.refresh-interval";

	/** Number of stack trace samples to take to determine back pressure. */
	public static final String JOB_MANAGER_WEB_BACK_PRESSURE_NUM_SAMPLES = "jobmanager.web.backpressure.num-samples";

	/** Delay between stack trace samples to determine back pressure. */
	public static final String JOB_MANAGER_WEB_BACK_PRESSURE_DELAY = "jobmanager.web.backpressure.delay-between-samples";
372 373 374

	// ------------------------------ AKKA ------------------------------------

375 376 377
	/**
	 * Timeout for the startup of the actor system
	 */
378 379
	public static final String AKKA_STARTUP_TIMEOUT = "akka.startup-timeout";

380
	/**
381
	 * Heartbeat interval of the transport failure detector
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422
	 */
	public static final String AKKA_TRANSPORT_HEARTBEAT_INTERVAL = "akka.transport.heartbeat.interval";

	/**
	 * Allowed heartbeat pause for the transport failure detector
	 */
	public static final String AKKA_TRANSPORT_HEARTBEAT_PAUSE = "akka.transport.heartbeat.pause";

	/**
	 * Detection threshold of transport failure detector
	 */
	public static final String AKKA_TRANSPORT_THRESHOLD = "akka.transport.threshold";

	/**
	 * Heartbeat interval of watch failure detector
	 */
	public static final String AKKA_WATCH_HEARTBEAT_INTERVAL = "akka.watch.heartbeat.interval";

	/**
	 * Allowed heartbeat pause for the watch failure detector
	 */
	public static final String AKKA_WATCH_HEARTBEAT_PAUSE = "akka.watch.heartbeat.pause";

	/**
	 * Detection threshold for the phi accrual watch failure detector
	 */
	public static final String AKKA_WATCH_THRESHOLD = "akka.watch.threshold";

	/**
	 * Akka TCP timeout
	 */
	public static final String AKKA_TCP_TIMEOUT = "akka.tcp.timeout";

	/**
	 * Maximum framesize of akka messages
	 */
	public static final String AKKA_FRAMESIZE = "akka.framesize";

	/**
	 * Maximum number of messages until another actor is executed by the same thread
	 */
423
	public static final String AKKA_DISPATCHER_THROUGHPUT = "akka.throughput";
424 425 426 427 428

	/**
	 * Log lifecycle events
	 */
	public static final String AKKA_LOG_LIFECYCLE_EVENTS = "akka.log.lifecycle.events";
429

430
	/**
431
	 * Timeout for all blocking calls on the cluster side
432 433
	 */
	public static final String AKKA_ASK_TIMEOUT = "akka.ask.timeout";
434 435

	/**
436
	 * Timeout for all blocking calls that look up remote actors
437 438
	 */
	public static final String AKKA_LOOKUP_TIMEOUT = "akka.lookup.timeout";
439

440 441 442 443 444
	/**
	 * Timeout for all blocking calls on the client side
	 */
	public static final String AKKA_CLIENT_TIMEOUT = "akka.client.timeout";

445 446 447 448
	/**
	 * Exit JVM on fatal Akka errors
	 */
	public static final String AKKA_JVM_EXIT_ON_FATAL_ERROR = "akka.jvm-exit-on-fatal-error";
449
	
450 451 452 453 454 455 456
	// ----------------------------- Streaming --------------------------------
	
	/**
	 * State backend for checkpoints;
	 */
	public static final String STATE_BACKEND = "state.backend";
	
S
StephanEwen 已提交
457 458 459
	// ----------------------------- Miscellaneous ----------------------------
	
	/**
460
	 * The key to the Flink base directory path
S
StephanEwen 已提交
461
	 */
462
	public static final String FLINK_BASE_DIR_PATH_KEY = "flink.base.dir.path";
463
	
464
	public static final String FLINK_JVM_OPTIONS = "env.java.opts";
465

466
	// --------------------------- Recovery -----------------------------------
467 468 469 470

	/** Defines recovery mode used for the cluster execution ("standalone", "zookeeper") */
	public static final String RECOVERY_MODE = "recovery.mode";

471 472 473
	/** Ports used by the job manager if not in standalone recovery mode */
	public static final String RECOVERY_JOB_MANAGER_PORT = "recovery.jobmanager.port";

474
	// --------------------------- ZooKeeper ----------------------------------
475 476

	/** ZooKeeper servers. */
477 478 479 480 481 482 483
	public static final String ZOOKEEPER_QUORUM_KEY = "recovery.zookeeper.quorum";

	/**
	 * File system state backend base path for recoverable state handles. Recovery state is written
	 * to this path and the file state handles are persisted for recovery.
	 */
	public static final String ZOOKEEPER_RECOVERY_PATH = "recovery.zookeeper.storageDir";
484 485

	/** ZooKeeper root path. */
486
	public static final String ZOOKEEPER_DIR_KEY = "recovery.zookeeper.path.root";
487

488
	public static final String ZOOKEEPER_LATCH_PATH = "recovery.zookeeper.path.latch";
489

490
	public static final String ZOOKEEPER_LEADER_PATH = "recovery.zookeeper.path.leader";
491

492
	/** ZooKeeper root path (ZNode) for job graphs. */
493
	public static final String ZOOKEEPER_JOBGRAPHS_PATH = "recovery.zookeeper.path.jobgraphs";
494 495

	/** ZooKeeper root path (ZNode) for completed checkpoints. */
496
	public static final String ZOOKEEPER_CHECKPOINTS_PATH = "recovery.zookeeper.path.checkpoints";
497 498

	/** ZooKeeper root path (ZNode) for checkpoint counters. */
499
	public static final String ZOOKEEPER_CHECKPOINT_COUNTER_PATH = "recovery.zookeeper.path.checkpoint-counter";
500

501
	public static final String ZOOKEEPER_SESSION_TIMEOUT = "recovery.zookeeper.client.session-timeout";
502

503
	public static final String ZOOKEEPER_CONNECTION_TIMEOUT = "recovery.zookeeper.client.connection-timeout";
504

505
	public static final String ZOOKEEPER_RETRY_WAIT = "recovery.zookeeper.client.retry-wait";
506

507
	public static final String ZOOKEEPER_MAX_RETRY_ATTEMPTS = "recovery.zookeeper.client.max-retry-attempts";
508

S
sewen 已提交
509
	// ------------------------------------------------------------------------
S
StephanEwen 已提交
510
	//                            Default Values
S
sewen 已提交
511 512
	// ------------------------------------------------------------------------

S
StephanEwen 已提交
513 514 515
	// ---------------------------- Parallelism -------------------------------
	
	/**
516
	 * The default parallelism for operations.
S
StephanEwen 已提交
517
	 */
518
	public static final int DEFAULT_PARALLELISM = 1;
S
StephanEwen 已提交
519
	
520 521 522 523 524
	/**
	 * The default number of execution retries.
	 */
	public static final int DEFAULT_EXECUTION_RETRIES = 0;
	
S
StephanEwen 已提交
525
	// ------------------------------ Runtime ---------------------------------
D
Daniel Warneke 已提交
526 527 528 529 530

	/**
	 * The default library cache manager cleanup interval in seconds
	 */
	public static final long DEFAULT_LIBRARY_CACHE_MANAGER_CLEANUP_INTERVAL = 3600;
S
StephanEwen 已提交
531
	
S
sewen 已提交
532 533 534 535
	/**
	 * The default network port to connect to for communication with the job manager.
	 */
	public static final int DEFAULT_JOB_MANAGER_IPC_PORT = 6123;
536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551

	/**
	 * Default number of retries for failed BLOB fetches.
	 */
	public static final int DEFAULT_BLOB_FETCH_RETRIES = 5;

	/**
	 * Default number of concurrent BLOB fetch operations.
	 */
	public static final int DEFAULT_BLOB_FETCH_CONCURRENT = 50;

	/**
	 * Default BLOB fetch connection backlog.
	 */
	public static final int DEFAULT_BLOB_FETCH_BACKLOG = 1000;

552 553 554 555 556
	/**
	 * Default BLOB server port. 0 means ephemeral port.
	 */
	public static final String DEFAULT_BLOB_SERVER_PORT = "0";

557
	/**
558
	 * The default network port the task manager expects incoming IPC connections. The {@code 0} means that
559
	 * the TaskManager searches for a free port.
S
sewen 已提交
560
	 */
561
	public static final int DEFAULT_TASK_MANAGER_IPC_PORT = 0;
S
sewen 已提交
562 563

	/**
564
	 * The default network port the task manager expects to receive transfer envelopes on. The {@code 0} means that
565
	 * the TaskManager searches for a free port.
S
sewen 已提交
566
	 */
567
	public static final int DEFAULT_TASK_MANAGER_DATA_PORT = 0;
S
sewen 已提交
568 569

	/**
S
StephanEwen 已提交
570
	 * The default directory for temporary files of the task manager.
S
sewen 已提交
571
	 */
S
StephanEwen 已提交
572
	public static final String DEFAULT_TASK_MANAGER_TMP_PATH = System.getProperty("java.io.tmpdir");
S
sewen 已提交
573 574
	
	/**
S
StephanEwen 已提交
575
	 * The default fraction of the free memory allocated by the task manager's memory manager.
S
sewen 已提交
576
	 */
577
	public static final float DEFAULT_MEMORY_MANAGER_MEMORY_FRACTION = 0.7f;
578
	
S
sewen 已提交
579
	/**
S
StephanEwen 已提交
580
	 * Default number of buffers used in the network stack.
S
sewen 已提交
581
	 */
S
StephanEwen 已提交
582
	public static final int DEFAULT_TASK_MANAGER_NETWORK_NUM_BUFFERS = 2048;
S
sewen 已提交
583

584 585 586 587 588
	/**
	 * Default size of memory segments in the network stack and the memory manager.
	 */
	public static final int DEFAULT_TASK_MANAGER_MEMORY_SEGMENT_SIZE = 32768;

589 590 591 592 593 594
	/**
	 * The implementation to use for spillable/spilled intermediate results, which have both
	 * synchronous and asynchronous implementations: "sync" or "async".
	 */
	public static final String DEFAULT_TASK_MANAGER_NETWORK_DEFAULT_IO_MODE = "sync";

595 596 597 598 599 600 601 602
	/**
	 * Flag indicating whether to start a thread, which repeatedly logs the memory usage of the JVM.
	 */
	public static final boolean DEFAULT_TASK_MANAGER_DEBUG_MEMORY_USAGE_START_LOG_THREAD = false;

	/**
	 * The interval (in ms) for the log thread to log the current memory usage.
	 */
603
	public static final long DEFAULT_TASK_MANAGER_DEBUG_MEMORY_USAGE_LOG_INTERVAL_MS = 5000L;
604

605 606 607 608
	/**
	 * The default task manager's maximum registration duration
	 */
	public static final String DEFAULT_TASK_MANAGER_MAX_REGISTRATION_DURATION = "Inf";
609

610 611 612 613 614
	/**
	 * The default setting for TaskManager memory eager allocation of managed memory
	 */
	public static final boolean DEFAULT_TASK_MANAGER_MEMORY_PRE_ALLOCATE = false;

615 616 617 618 619
	// ------------------------ Runtime Algorithms ------------------------
	
	/**
	 * Default setting for the switch for hash join bloom filters for spilled partitions.
	 */
620
	public static final boolean DEFAULT_RUNTIME_HASH_JOIN_BLOOM_FILTERS = false;
A
alex 已提交
621
	
S
sewen 已提交
622
	/**
S
StephanEwen 已提交
623 624 625 626 627 628 629 630 631 632 633 634 635
	 * The default value for the maximum spilling fan in/out.
	 */
	public static final int DEFAULT_SPILLING_MAX_FAN = 128;
	
	/**
	 * The default percentage of the sort memory to be full before data is spilled.
	 */
	public static final float DEFAULT_SORT_SPILLING_THRESHOLD = 0.8f;
	
	/**
	 * The default timeout for filesystem stream opening: infinite (means max long milliseconds).
	 */
	public static final int DEFAULT_FS_STREAM_OPENING_TIMEOUT = 0;
636 637 638

	// ------------------------ YARN Configuration ------------------------

639 640 641 642 643 644
	/**
	 * Minimum amount of Heap memory to subtract from the requested TaskManager size.
	 * We came up with these values experimentally.
	 * Flink fails when the cutoff is set only to 500 mb.
	 */
	public static final int DEFAULT_YARN_MIN_HEAP_CUTOFF = 600;
645

646 647 648 649
	/**
	 * Relative amount of memory to subtract from the requested memory.
	 */
	public static final float DEFAULT_YARN_HEAP_CUTOFF_RATIO = 0.25f;
650 651 652 653 654 655

	/**
	 * Default port for the application master is 0, which means
	 * the operating system assigns an ephemeral port
	 */
	public static final String DEFAULT_YARN_APPLICATION_MASTER_PORT = "0";
S
StephanEwen 已提交
656 657
	
	
658
	// ------------------------ File System Behavior ------------------------
659 660 661 662 663 664 665

	/**
	 * The default behavior with respect to overwriting existing files (= not overwrite)
	 */
	public static final boolean DEFAULT_FILESYSTEM_OVERWRITE = false;

	/**
H
Hubert Czerpak 已提交
666
	 * The default behavior for output directory creating (create only directory when parallelism > 1).
667 668 669 670
	 */
	public static final boolean DEFAULT_FILESYSTEM_ALWAYS_CREATE_DIRECTORY = false;
	
	
S
StephanEwen 已提交
671 672 673 674 675 676 677 678 679 680 681 682 683 684
	// ---------------------------- Compiler -------------------------------

	/**
	 * The default maximum number of line samples taken by the delimited input format.
	 */
	public static final int DEFAULT_DELIMITED_FORMAT_MAX_LINE_SAMPLES = 10;
	
	/**
	 * The default minimum number of line samples taken by the delimited input format.
	 */
	public static final int DEFAULT_DELIMITED_FORMAT_MIN_LINE_SAMPLES = 2;
	
	/**
	 * The default maximum sample length before sampling is aborted (2 MiBytes).
S
sewen 已提交
685
	 */
S
StephanEwen 已提交
686 687 688 689
	public static final int DEFAULT_DELIMITED_FORMAT_MAX_SAMPLE_LEN = 2 * 1024 * 1024;
	
	
	// ------------------------- JobManager Web Frontend ----------------------
M
markus 已提交
690
	
691 692
	/** The config key for the port of the JobManager web frontend.
	 * Setting this value to {@code -1} disables the web frontend. */
S
StephanEwen 已提交
693
	public static final int DEFAULT_JOB_MANAGER_WEB_FRONTEND_PORT = 8081;
694
	
695
	/** The default number of archived jobs for the jobmanager */
S
StephanEwen 已提交
696
	public static final int DEFAULT_JOB_MANAGER_WEB_ARCHIVE_COUNT = 5;
697

698
	/** By default, submitting jobs from the web-frontend is allowed. */
699
	public static final boolean DEFAULT_JOB_MANAGER_WEB_SUBMIT_ENABLED = true;
700

701 702 703 704 705
	/** Default flag to disable checkpoint stats. */
	public static final boolean DEFAULT_JOB_MANAGER_WEB_CHECKPOINTS_DISABLE = false;

	/** Default number of checkpoints to remember for recent history. */
	public static final int DEFAULT_JOB_MANAGER_WEB_CHECKPOINTS_HISTORY_SIZE = 10;
706

707 708 709 710 711 712 713 714 715 716 717 718
	/** Time after which cached stats are cleaned up. */
	public static final int DEFAULT_JOB_MANAGER_WEB_BACK_PRESSURE_CLEAN_UP_INTERVAL = 10 * 60 * 1000;

	/** Time after which available stats are deprecated and need to be refreshed (by resampling). */
	public static final int DEFAULT_JOB_MANAGER_WEB_BACK_PRESSURE_REFRESH_INTERVAL = 60 * 1000;

	/** Number of samples to take to determine back pressure. */
	public static final int DEFAULT_JOB_MANAGER_WEB_BACK_PRESSURE_NUM_SAMPLES = 100;

	/** Delay between samples to determine back pressure. */
	public static final int DEFAULT_JOB_MANAGER_WEB_BACK_PRESSURE_DELAY = 50;

719 720
	// ------------------------------ Akka Values ------------------------------

721
	public static String DEFAULT_AKKA_TRANSPORT_HEARTBEAT_INTERVAL = "1000 s";
722

723
	public static String DEFAULT_AKKA_TRANSPORT_HEARTBEAT_PAUSE = "6000 s";
724 725 726

	public static double DEFAULT_AKKA_TRANSPORT_THRESHOLD = 300.0;

727
	public static double DEFAULT_AKKA_WATCH_THRESHOLD = 12;
728

729
	public static int DEFAULT_AKKA_DISPATCHER_THROUGHPUT = 15;
730

731
	public static boolean DEFAULT_AKKA_LOG_LIFECYCLE_EVENTS = false;
732 733

	public static String DEFAULT_AKKA_FRAMESIZE = "10485760b";
734

735
	public static String DEFAULT_AKKA_ASK_TIMEOUT = "10 s";
736 737

	public static String DEFAULT_AKKA_LOOKUP_TIMEOUT = "10 s";
738 739

	public static String DEFAULT_AKKA_CLIENT_TIMEOUT = "60 s";
740
	
741 742 743
	// ----------------------------- Streaming Values --------------------------
	
	public static String DEFAULT_STATE_BACKEND = "jobmanager";
744 745 746 747 748 749

	// ----------------------------- LocalExecution ----------------------------

	/**
	 * Sets the number of local task managers
	 */
750
	public static final String LOCAL_NUMBER_TASK_MANAGER = "local.number-taskmanager";
751

752
	public static final int DEFAULT_LOCAL_NUMBER_TASK_MANAGER = 1;
753

754
	public static final String LOCAL_NUMBER_JOB_MANAGER = "local.number-jobmanager";
755

756
	public static final int DEFAULT_LOCAL_NUMBER_JOB_MANAGER = 1;
757

758
	public static final String LOCAL_START_WEBSERVER = "local.start-webserver";
759

760
  	// --------------------------- Recovery ---------------------------------
761

762
	public static String DEFAULT_RECOVERY_MODE = "standalone";
763

764 765 766 767 768 769
	/**
	 * Default port used by the job manager if not in standalone recovery mode. If <code>0</code>
	 * the OS picks a random port port.
	 */
	public static final String DEFAULT_RECOVERY_JOB_MANAGER_PORT = "0";

770
	// --------------------------- ZooKeeper ----------------------------------
771

772
	public static final String DEFAULT_ZOOKEEPER_DIR_KEY = "/flink";
773 774 775 776 777

	public static final String DEFAULT_ZOOKEEPER_LATCH_PATH = "/leaderlatch";

	public static final String DEFAULT_ZOOKEEPER_LEADER_PATH = "/leader";

778 779 780 781 782 783
	public static final String DEFAULT_ZOOKEEPER_JOBGRAPHS_PATH = "/jobgraphs";

	public static final String DEFAULT_ZOOKEEPER_CHECKPOINTS_PATH = "/checkpoints";

	public static final String DEFAULT_ZOOKEEPER_CHECKPOINT_COUNTER_PATH = "/checkpoint-counter";

784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808
	public static final int DEFAULT_ZOOKEEPER_SESSION_TIMEOUT = 60000;

	public static final int DEFAULT_ZOOKEEPER_CONNECTION_TIMEOUT = 15000;

	public static final int DEFAULT_ZOOKEEPER_RETRY_WAIT = 5000;

	public static final int DEFAULT_ZOOKEEPER_MAX_RETRY_ATTEMPTS = 3;

	// - Defaults for required ZooKeeper configuration keys -------------------

	/** ZooKeeper default client port. */
	public static final int DEFAULT_ZOOKEEPER_CLIENT_PORT = 2181;

	/** ZooKeeper default init limit. */
	public static final int DEFAULT_ZOOKEEPER_INIT_LIMIT = 10;

	/** ZooKeeper default sync limit. */
	public static final int DEFAULT_ZOOKEEPER_SYNC_LIMIT = 5;

	/** ZooKeeper default peer port. */
	public static final int DEFAULT_ZOOKEEPER_PEER_PORT = 2888;

	/** ZooKeeper default leader port. */
	public static final int DEFAULT_ZOOKEEPER_LEADER_PORT = 3888;

S
sewen 已提交
809
	/**
S
StephanEwen 已提交
810
	 * Not instantiable.
S
sewen 已提交
811
	 */
S
StephanEwen 已提交
812
	private ConfigConstants() {}
S
sewen 已提交
813
}