001/**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.apache.hadoop.fs;
020
021import org.apache.hadoop.classification.InterfaceAudience;
022import org.apache.hadoop.crypto.CipherSuite;
023import org.apache.hadoop.crypto.JceAesCtrCryptoCodec;
024import org.apache.hadoop.crypto.OpensslAesCtrCryptoCodec;
025
026/** 
027 * This class contains constants for configuration keys used
028 * in the common code.
029 *
030 * It includes all publicly documented configuration keys. In general
031 * this class should not be used directly (use CommonConfigurationKeys
032 * instead)
033 *
034 */
035
036@InterfaceAudience.Public
037public class CommonConfigurationKeysPublic {
038  
039  // The Keys
040  /**
041   * @see
042   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
043   * core-default.xml</a>
044   */
045  public static final String  IO_NATIVE_LIB_AVAILABLE_KEY =
046    "io.native.lib.available";
047  /** Default value for IO_NATIVE_LIB_AVAILABLE_KEY */
048  public static final boolean IO_NATIVE_LIB_AVAILABLE_DEFAULT = true;
049  /**
050   * @see
051   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
052   * core-default.xml</a>
053   */
054  public static final String  NET_TOPOLOGY_SCRIPT_NUMBER_ARGS_KEY =
055    "net.topology.script.number.args";
056  /** Default value for NET_TOPOLOGY_SCRIPT_NUMBER_ARGS_KEY */
057  public static final int     NET_TOPOLOGY_SCRIPT_NUMBER_ARGS_DEFAULT = 100;
058
059  //FS keys
060  /**
061   * @see
062   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
063   * core-default.xml</a>
064   */
065  public static final String  FS_DEFAULT_NAME_KEY = "fs.defaultFS";
066  /** Default value for FS_DEFAULT_NAME_KEY */
067  public static final String  FS_DEFAULT_NAME_DEFAULT = "file:///";
068  /**
069   * @see
070   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
071   * core-default.xml</a>
072   */
073  public static final String  FS_DF_INTERVAL_KEY = "fs.df.interval"; 
074  /** Default value for FS_DF_INTERVAL_KEY */
075  public static final long    FS_DF_INTERVAL_DEFAULT = 60000;
076  /**
077   * @see
078   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
079   * core-default.xml</a>
080   */
081  public static final String  FS_DU_INTERVAL_KEY = "fs.du.interval";
082  /** Default value for FS_DU_INTERVAL_KEY */
083  public static final long    FS_DU_INTERVAL_DEFAULT = 600000;
084  /**
085   * @see
086   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
087   * core-default.xml</a>
088   */
089  public static final String  FS_CLIENT_RESOLVE_REMOTE_SYMLINKS_KEY =
090    "fs.client.resolve.remote.symlinks";
091  /** Default value for FS_CLIENT_RESOLVE_REMOTE_SYMLINKS_KEY */
092  public static final boolean FS_CLIENT_RESOLVE_REMOTE_SYMLINKS_DEFAULT = true;
093
094
095  //Defaults are not specified for following keys
096  /**
097   * @see
098   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
099   * core-default.xml</a>
100   */
101  public static final String  NET_TOPOLOGY_SCRIPT_FILE_NAME_KEY =
102    "net.topology.script.file.name";
103  /**
104   * @see
105   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
106   * core-default.xml</a>
107   */
108  public static final String  NET_TOPOLOGY_NODE_SWITCH_MAPPING_IMPL_KEY =
109    "net.topology.node.switch.mapping.impl";
110  /**
111   * @see
112   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
113   * core-default.xml</a>
114   */
115  public static final String  NET_TOPOLOGY_IMPL_KEY =
116    "net.topology.impl";
117  /**
118   * @see
119   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
120   * core-default.xml</a>
121   */
122  public static final String  NET_TOPOLOGY_TABLE_MAPPING_FILE_KEY =
123    "net.topology.table.file.name";
124  public static final String NET_DEPENDENCY_SCRIPT_FILE_NAME_KEY = 
125    "net.topology.dependency.script.file.name";
126
127  /**
128   * @see
129   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
130   * core-default.xml</a>
131   */
132  public static final String  FS_TRASH_CHECKPOINT_INTERVAL_KEY =
133    "fs.trash.checkpoint.interval";
134  /** Default value for FS_TRASH_CHECKPOINT_INTERVAL_KEY */
135  public static final long    FS_TRASH_CHECKPOINT_INTERVAL_DEFAULT = 0;
136
137  /**
138   * Directories that cannot be removed unless empty, even by an
139   * administrator.
140   */
141  public static final String FS_PROTECTED_DIRECTORIES =
142      "fs.protected.directories";
143
144  // TBD: Code is still using hardcoded values (e.g. "fs.automatic.close")
145  // instead of constant (e.g. FS_AUTOMATIC_CLOSE_KEY)
146  //
147  /** Not used anywhere, looks like default value for FS_LOCAL_BLOCK_SIZE */
148  public static final long    FS_LOCAL_BLOCK_SIZE_DEFAULT = 32*1024*1024;
149  /**
150   * @see
151   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
152   * core-default.xml</a>
153   */
154  public static final String  FS_AUTOMATIC_CLOSE_KEY = "fs.automatic.close";
155  /** Default value for FS_AUTOMATIC_CLOSE_KEY */
156  public static final boolean FS_AUTOMATIC_CLOSE_DEFAULT = true;
157  /**
158   * @see
159   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
160   * core-default.xml</a>
161   */
162  public static final String  FS_FILE_IMPL_KEY = "fs.file.impl";
163  /**
164   * @see
165   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
166   * core-default.xml</a>
167   */
168  public static final String  FS_FTP_HOST_KEY = "fs.ftp.host";
169  /**
170   * @see
171   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
172   * core-default.xml</a>
173   */
174  public static final String  FS_FTP_HOST_PORT_KEY = "fs.ftp.host.port";
175  /**
176   * @see
177   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
178   * core-default.xml</a>
179   */
180  public static final String  FS_TRASH_INTERVAL_KEY = "fs.trash.interval";
181  /** Default value for FS_TRASH_INTERVAL_KEY */
182  public static final long    FS_TRASH_INTERVAL_DEFAULT = 0;
183
184  /**
185   * @see
186   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
187   * core-default.xml</a>
188   */
189  public static final String  IO_MAPFILE_BLOOM_SIZE_KEY =
190    "io.mapfile.bloom.size";
191  /** Default value for IO_MAPFILE_BLOOM_SIZE_KEY */
192  public static final int     IO_MAPFILE_BLOOM_SIZE_DEFAULT = 1024*1024;
193  /**
194   * @see
195   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
196   * core-default.xml</a>
197   */
198  public static final String  IO_MAPFILE_BLOOM_ERROR_RATE_KEY =
199    "io.mapfile.bloom.error.rate" ;
200  /** Default value for IO_MAPFILE_BLOOM_ERROR_RATE_KEY */
201  public static final float   IO_MAPFILE_BLOOM_ERROR_RATE_DEFAULT = 0.005f;
202  /** Codec class that implements Lzo compression algorithm */
203  public static final String  IO_COMPRESSION_CODEC_LZO_CLASS_KEY =
204    "io.compression.codec.lzo.class";
205  /**
206   * @see
207   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
208   * core-default.xml</a>
209   */
210  public static final String  IO_MAP_INDEX_INTERVAL_KEY =
211    "io.map.index.interval";
212  /** Default value for IO_MAP_INDEX_INTERVAL_DEFAULT */
213  public static final int     IO_MAP_INDEX_INTERVAL_DEFAULT = 128;
214  /**
215   * @see
216   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
217   * core-default.xml</a>
218   */
219  public static final String  IO_MAP_INDEX_SKIP_KEY = "io.map.index.skip";
220  /** Default value for IO_MAP_INDEX_SKIP_KEY */
221  public static final int     IO_MAP_INDEX_SKIP_DEFAULT = 0;
222  /**
223   * @see
224   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
225   * core-default.xml</a>
226   */
227  public static final String  IO_SEQFILE_COMPRESS_BLOCKSIZE_KEY =
228    "io.seqfile.compress.blocksize";
229  /** Default value for IO_SEQFILE_COMPRESS_BLOCKSIZE_KEY */
230  public static final int     IO_SEQFILE_COMPRESS_BLOCKSIZE_DEFAULT = 1000000;
231  /**
232   * @see
233   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
234   * core-default.xml</a>
235   */
236  public static final String  IO_FILE_BUFFER_SIZE_KEY =
237    "io.file.buffer.size";
238  /** Default value for IO_FILE_BUFFER_SIZE_KEY */
239  public static final int     IO_FILE_BUFFER_SIZE_DEFAULT = 4096;
240  /**
241   * @see
242   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
243   * core-default.xml</a>
244   */
245  public static final String  IO_SKIP_CHECKSUM_ERRORS_KEY =
246    "io.skip.checksum.errors";
247  /** Default value for IO_SKIP_CHECKSUM_ERRORS_KEY */
248  public static final boolean IO_SKIP_CHECKSUM_ERRORS_DEFAULT = false;
249  /**
250   * @deprecated Moved to mapreduce, see mapreduce.task.io.sort.mb
251   * in mapred-default.xml
252   * See https://issues.apache.org/jira/browse/HADOOP-6801
253   */
254  public static final String  IO_SORT_MB_KEY = "io.sort.mb";
255  /** Default value for IO_SORT_MB_DEFAULT */
256  public static final int     IO_SORT_MB_DEFAULT = 100;
257  /**
258   * @deprecated Moved to mapreduce, see mapreduce.task.io.sort.factor
259   * in mapred-default.xml
260   * See https://issues.apache.org/jira/browse/HADOOP-6801
261   */
262  public static final String  IO_SORT_FACTOR_KEY = "io.sort.factor";
263  /** Default value for IO_SORT_FACTOR_DEFAULT */
264  public static final int     IO_SORT_FACTOR_DEFAULT = 100;
265  /**
266   * @see
267   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
268   * core-default.xml</a>
269   */
270  public static final String  IO_SERIALIZATIONS_KEY = "io.serializations";
271
272  /**
273   * @see
274   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
275   * core-default.xml</a>
276   */
277  public static final String  TFILE_IO_CHUNK_SIZE_KEY = "tfile.io.chunk.size";
278  /** Default value for TFILE_IO_CHUNK_SIZE_DEFAULT */
279  public static final int     TFILE_IO_CHUNK_SIZE_DEFAULT = 1024*1024;
280  /**
281   * @see
282   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
283   * core-default.xml</a>
284   */
285  public static final String  TFILE_FS_INPUT_BUFFER_SIZE_KEY =
286    "tfile.fs.input.buffer.size";
287  /** Default value for TFILE_FS_INPUT_BUFFER_SIZE_KEY */
288  public static final int     TFILE_FS_INPUT_BUFFER_SIZE_DEFAULT = 256*1024;
289  /**
290   * @see
291   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
292   * core-default.xml</a>
293   */
294  public static final String  TFILE_FS_OUTPUT_BUFFER_SIZE_KEY =
295    "tfile.fs.output.buffer.size";
296  /** Default value for TFILE_FS_OUTPUT_BUFFER_SIZE_KEY */
297  public static final int     TFILE_FS_OUTPUT_BUFFER_SIZE_DEFAULT = 256*1024;
298
299  public static final String  HADOOP_CALLER_CONTEXT_ENABLED_KEY =
300      "hadoop.caller.context.enabled";
301  public static final boolean HADOOP_CALLER_CONTEXT_ENABLED_DEFAULT = false;
302  public static final String  HADOOP_CALLER_CONTEXT_MAX_SIZE_KEY =
303      "hadoop.caller.context.max.size";
304  public static final int     HADOOP_CALLER_CONTEXT_MAX_SIZE_DEFAULT = 128;
305  public static final String  HADOOP_CALLER_CONTEXT_SIGNATURE_MAX_SIZE_KEY =
306      "hadoop.caller.context.signature.max.size";
307  public static final int     HADOOP_CALLER_CONTEXT_SIGNATURE_MAX_SIZE_DEFAULT =
308      40;
309
310  /**
311   * @see
312   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
313   * core-default.xml</a>
314   */
315  public static final String  IPC_CLIENT_CONNECTION_MAXIDLETIME_KEY =
316    "ipc.client.connection.maxidletime";
317  /** Default value for IPC_CLIENT_CONNECTION_MAXIDLETIME_KEY */
318  public static final int     IPC_CLIENT_CONNECTION_MAXIDLETIME_DEFAULT = 10000; // 10s
319  /**
320   * @see
321   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
322   * core-default.xml</a>
323   */
324  public static final String  IPC_CLIENT_CONNECT_TIMEOUT_KEY =
325    "ipc.client.connect.timeout";
326  /** Default value for IPC_CLIENT_CONNECT_TIMEOUT_KEY */
327  public static final int     IPC_CLIENT_CONNECT_TIMEOUT_DEFAULT = 20000; // 20s
328  /**
329   * @see
330   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
331   * core-default.xml</a>
332   */
333  public static final String  IPC_CLIENT_CONNECT_MAX_RETRIES_KEY =
334    "ipc.client.connect.max.retries";
335  /** Default value for IPC_CLIENT_CONNECT_MAX_RETRIES_KEY */
336  public static final int     IPC_CLIENT_CONNECT_MAX_RETRIES_DEFAULT = 10;
337  /**
338   * @see
339   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
340   * core-default.xml</a>
341   */
342  public static final String  IPC_CLIENT_CONNECT_RETRY_INTERVAL_KEY =
343      "ipc.client.connect.retry.interval";
344  /** Default value for IPC_CLIENT_CONNECT_RETRY_INTERVAL_KEY */
345  public static final int     IPC_CLIENT_CONNECT_RETRY_INTERVAL_DEFAULT = 1000;
346  /**
347   * @see
348   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
349   * core-default.xml</a>
350   */
351  public static final String  IPC_CLIENT_CONNECT_MAX_RETRIES_ON_SOCKET_TIMEOUTS_KEY =
352    "ipc.client.connect.max.retries.on.timeouts";
353  /** Default value for IPC_CLIENT_CONNECT_MAX_RETRIES_ON_SOCKET_TIMEOUTS_KEY */
354  public static final int  IPC_CLIENT_CONNECT_MAX_RETRIES_ON_SOCKET_TIMEOUTS_DEFAULT = 45;
355  /**
356   * @see
357   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
358   * core-default.xml</a>
359   */
360  public static final String  IPC_CLIENT_TCPNODELAY_KEY =
361    "ipc.client.tcpnodelay";
362  /** Default value for IPC_CLIENT_TCPNODELAY_KEY */
363  public static final boolean IPC_CLIENT_TCPNODELAY_DEFAULT = true;
364  /** Enable low-latency connections from the client */
365  public static final String   IPC_CLIENT_LOW_LATENCY = "ipc.client.low-latency";
366  /** Default value of IPC_CLIENT_LOW_LATENCY */
367  public static final boolean  IPC_CLIENT_LOW_LATENCY_DEFAULT = false;
368  /**
369   * @see
370   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
371   * core-default.xml</a>
372   */
373  public static final String  IPC_SERVER_LISTEN_QUEUE_SIZE_KEY =
374    "ipc.server.listen.queue.size";
375  /** Default value for IPC_SERVER_LISTEN_QUEUE_SIZE_KEY */
376  public static final int     IPC_SERVER_LISTEN_QUEUE_SIZE_DEFAULT = 128;
377  /**
378   * @see
379   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
380   * core-default.xml</a>
381   */
382  public static final String  IPC_CLIENT_KILL_MAX_KEY = "ipc.client.kill.max";
383  /** Default value for IPC_CLIENT_KILL_MAX_KEY */
384  public static final int     IPC_CLIENT_KILL_MAX_DEFAULT = 10;
385  /**
386   * @see
387   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
388   * core-default.xml</a>
389   */
390  public static final String  IPC_CLIENT_IDLETHRESHOLD_KEY =
391    "ipc.client.idlethreshold";
392  /** Default value for IPC_CLIENT_IDLETHRESHOLD_DEFAULT */
393  public static final int     IPC_CLIENT_IDLETHRESHOLD_DEFAULT = 4000;
394  /**
395   * @see
396   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
397   * core-default.xml</a>
398   */
399  public static final String  IPC_SERVER_TCPNODELAY_KEY =
400    "ipc.server.tcpnodelay";
401  /** Default value for IPC_SERVER_TCPNODELAY_KEY */
402  public static final boolean IPC_SERVER_TCPNODELAY_DEFAULT = true;
403  /**
404   * @see
405   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
406   * core-default.xml</a>
407   */
408  public static final String  IPC_SERVER_MAX_CONNECTIONS_KEY =
409    "ipc.server.max.connections";
410  /** Default value for IPC_SERVER_MAX_CONNECTIONS_KEY */
411  public static final int     IPC_SERVER_MAX_CONNECTIONS_DEFAULT = 0;
412
413  /** Logs if a RPC is really slow compared to rest of RPCs. */
414  public static final String IPC_SERVER_LOG_SLOW_RPC =
415                                                "ipc.server.log.slow.rpc";
416  public static final boolean IPC_SERVER_LOG_SLOW_RPC_DEFAULT = false;
417
418  /**
419   * @see
420   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
421   * core-default.xml</a>
422   */
423  public static final String  HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_KEY =
424    "hadoop.rpc.socket.factory.class.default";
425  public static final String  HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_DEFAULT =
426    "org.apache.hadoop.net.StandardSocketFactory";
427  /**
428   * @see
429   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
430   * core-default.xml</a>
431   */
432  public static final String  HADOOP_SOCKS_SERVER_KEY = "hadoop.socks.server";
433  /**
434   * @see
435   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
436   * core-default.xml</a>
437   */
438  public static final String  HADOOP_UTIL_HASH_TYPE_KEY =
439    "hadoop.util.hash.type";
440  /** Default value for HADOOP_UTIL_HASH_TYPE_KEY */
441  public static final String  HADOOP_UTIL_HASH_TYPE_DEFAULT = "murmur";
442  /**
443   * @see
444   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
445   * core-default.xml</a>
446   */
447  public static final String  HADOOP_SECURITY_GROUP_MAPPING =
448    "hadoop.security.group.mapping";
449  /**
450   * @see
451   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
452   * core-default.xml</a>
453   */
454  public static final String  HADOOP_SECURITY_GROUPS_CACHE_SECS =
455    "hadoop.security.groups.cache.secs";
456  /**
457   * @see
458   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
459   * core-default.xml</a>
460   */
461  public static final long HADOOP_SECURITY_GROUPS_CACHE_SECS_DEFAULT =
462    300;
463  /**
464   * @see
465   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
466   * core-default.xml</a>
467   */
468  public static final String  HADOOP_SECURITY_GROUPS_NEGATIVE_CACHE_SECS =
469    "hadoop.security.groups.negative-cache.secs";
470  /**
471   * @see
472   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
473   * core-default.xml</a>
474   */
475  public static final long HADOOP_SECURITY_GROUPS_NEGATIVE_CACHE_SECS_DEFAULT =
476    30;
477  /**
478   * @see
479   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
480   * core-default.xml</a>
481   */
482  public static final String HADOOP_SECURITY_GROUPS_CACHE_WARN_AFTER_MS =
483    "hadoop.security.groups.cache.warn.after.ms";
484  public static final long HADOOP_SECURITY_GROUPS_CACHE_WARN_AFTER_MS_DEFAULT =
485    5000;
486  /**
487   * @see
488   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
489   * core-default.xml</a>
490   */
491  public static final String HADOOP_SECURITY_GROUPS_CACHE_BACKGROUND_RELOAD =
492      "hadoop.security.groups.cache.background.reload";
493  /**
494   * @see
495   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
496   * core-default.xml</a>
497   */
498  public static final boolean
499      HADOOP_SECURITY_GROUPS_CACHE_BACKGROUND_RELOAD_DEFAULT = false;
500  /**
501   * @see
502   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
503   * core-default.xml</a>
504   */
505  public static final String
506      HADOOP_SECURITY_GROUPS_CACHE_BACKGROUND_RELOAD_THREADS =
507          "hadoop.security.groups.cache.background.reload.threads";
508  /**
509   * @see
510   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
511   * core-default.xml</a>
512   */
513  public static final int
514      HADOOP_SECURITY_GROUPS_CACHE_BACKGROUND_RELOAD_THREADS_DEFAULT = 3;
515  /**
516   * @see
517   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
518   * core-default.xml</a>
519   */
520  public static final String  HADOOP_SECURITY_AUTHENTICATION =
521    "hadoop.security.authentication";
522  /**
523   * @see
524   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
525   * core-default.xml</a>
526   */
527  public static final String HADOOP_SECURITY_AUTHORIZATION =
528    "hadoop.security.authorization";
529  /**
530   * @see
531   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
532   * core-default.xml</a>
533   */
534  public static final String HADOOP_SECURITY_INSTRUMENTATION_REQUIRES_ADMIN =
535    "hadoop.security.instrumentation.requires.admin";
536  /**
537   * @see
538   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
539   * core-default.xml</a>
540   */
541  public static final String  HADOOP_SECURITY_SERVICE_USER_NAME_KEY =
542    "hadoop.security.service.user.name.key";
543  /**
544   * @see
545   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
546   * core-default.xml</a>
547   */
548  public static final String  HADOOP_SECURITY_AUTH_TO_LOCAL =
549    "hadoop.security.auth_to_local";
550  /**
551   * @see
552   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
553   * core-default.xml</a>
554   */
555  public static final String HADOOP_SECURITY_DNS_INTERFACE_KEY =
556    "hadoop.security.dns.interface";
557  /**
558   * @see
559   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
560   * core-default.xml</a>
561   */
562  public static final String HADOOP_SECURITY_DNS_NAMESERVER_KEY =
563    "hadoop.security.dns.nameserver";
564
565  @Deprecated
566  /** Only used by HttpServer. */
567  public static final String HADOOP_SSL_ENABLED_KEY = "hadoop.ssl.enabled";
568  @Deprecated
569  /** Only used by HttpServer. */
570  public static final boolean HADOOP_SSL_ENABLED_DEFAULT = false;
571
572  /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
573  public static final String HADOOP_KERBEROS_MIN_SECONDS_BEFORE_RELOGIN =
574      "hadoop.kerberos.min.seconds.before.relogin";
575  /** Default value for HADOOP_KERBEROS_MIN_SECONDS_BEFORE_RELOGIN */
576  public static final int HADOOP_KERBEROS_MIN_SECONDS_BEFORE_RELOGIN_DEFAULT =
577      60;
578
579  // HTTP policies to be used in configuration
580  // Use HttpPolicy.name() instead
581  @Deprecated
582  public static final String HTTP_POLICY_HTTP_ONLY = "HTTP_ONLY";
583  @Deprecated
584  public static final String HTTP_POLICY_HTTPS_ONLY = "HTTPS_ONLY";
585  /**
586   * @see
587   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
588   * core-default.xml</a>
589   */
590  public static final String  HADOOP_RPC_PROTECTION =
591    "hadoop.rpc.protection";
592  /** Class to override Sasl Properties for a connection */
593  public static final String  HADOOP_SECURITY_SASL_PROPS_RESOLVER_CLASS =
594    "hadoop.security.saslproperties.resolver.class";
595  public static final String HADOOP_SECURITY_CRYPTO_CODEC_CLASSES_KEY_PREFIX = 
596    "hadoop.security.crypto.codec.classes";
597  public static final String
598      HADOOP_SECURITY_CRYPTO_CODEC_CLASSES_AES_CTR_NOPADDING_KEY =
599      HADOOP_SECURITY_CRYPTO_CODEC_CLASSES_KEY_PREFIX
600          + CipherSuite.AES_CTR_NOPADDING.getConfigSuffix();
601  public static final String
602      HADOOP_SECURITY_CRYPTO_CODEC_CLASSES_AES_CTR_NOPADDING_DEFAULT =
603      OpensslAesCtrCryptoCodec.class.getName() + "," +
604          JceAesCtrCryptoCodec.class.getName();
605  /**
606   * @see
607   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
608   * core-default.xml</a>
609   */
610  public static final String HADOOP_SECURITY_CRYPTO_CIPHER_SUITE_KEY =
611    "hadoop.security.crypto.cipher.suite";
612  public static final String HADOOP_SECURITY_CRYPTO_CIPHER_SUITE_DEFAULT = 
613    "AES/CTR/NoPadding";
614  /**
615   * @see
616   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
617   * core-default.xml</a>
618   */
619  public static final String HADOOP_SECURITY_CRYPTO_JCE_PROVIDER_KEY =
620    "hadoop.security.crypto.jce.provider";
621  /**
622   * @see
623   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
624   * core-default.xml</a>
625   */
626  public static final String HADOOP_SECURITY_CRYPTO_BUFFER_SIZE_KEY = 
627    "hadoop.security.crypto.buffer.size";
628  /** Defalt value for HADOOP_SECURITY_CRYPTO_BUFFER_SIZE_KEY */
629  public static final int HADOOP_SECURITY_CRYPTO_BUFFER_SIZE_DEFAULT = 8192;
630  /** Class to override Impersonation provider */
631  public static final String  HADOOP_SECURITY_IMPERSONATION_PROVIDER_CLASS =
632    "hadoop.security.impersonation.provider.class";
633
634  /**
635   * @see
636   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
637   * core-default.xml</a>
638   */
639  public static final String HADOOP_SECURITY_KEY_PROVIDER_PATH =
640      "hadoop.security.key.provider.path";
641
642  //  <!-- KMSClientProvider configurations -->
643  /**
644   * @see
645   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
646   * core-default.xml</a>
647   */
648  public static final String KMS_CLIENT_ENC_KEY_CACHE_SIZE =
649      "hadoop.security.kms.client.encrypted.key.cache.size";
650  /** Default value for KMS_CLIENT_ENC_KEY_CACHE_SIZE */
651  public static final int KMS_CLIENT_ENC_KEY_CACHE_SIZE_DEFAULT = 500;
652
653  /**
654   * @see
655   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
656   * core-default.xml</a>
657   */
658  public static final String KMS_CLIENT_ENC_KEY_CACHE_LOW_WATERMARK =
659      "hadoop.security.kms.client.encrypted.key.cache.low-watermark";
660  /** Default value for KMS_CLIENT_ENC_KEY_CACHE_LOW_WATERMARK */
661  public static final float KMS_CLIENT_ENC_KEY_CACHE_LOW_WATERMARK_DEFAULT =
662      0.3f;
663
664  /**
665   * @see
666   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
667   * core-default.xml</a>
668   */
669  public static final String KMS_CLIENT_ENC_KEY_CACHE_NUM_REFILL_THREADS =
670      "hadoop.security.kms.client.encrypted.key.cache.num.refill.threads";
671  /** Default value for KMS_CLIENT_ENC_KEY_NUM_REFILL_THREADS */
672  public static final int KMS_CLIENT_ENC_KEY_CACHE_NUM_REFILL_THREADS_DEFAULT =
673      2;
674
675  /**
676   * @see
677   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
678   * core-default.xml</a>
679   */
680  public static final String KMS_CLIENT_ENC_KEY_CACHE_EXPIRY_MS =
681      "hadoop.security.kms.client.encrypted.key.cache.expiry";
682  /** Default value for KMS_CLIENT_ENC_KEY_CACHE_EXPIRY (12 hrs)*/
683  public static final int KMS_CLIENT_ENC_KEY_CACHE_EXPIRY_DEFAULT = 43200000;
684
685  /**
686   * @see
687   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
688   * core-default.xml</a>
689   */
690  public static final String HADOOP_SECURITY_JAVA_SECURE_RANDOM_ALGORITHM_KEY = 
691    "hadoop.security.java.secure.random.algorithm";
692  /** Defalt value for HADOOP_SECURITY_JAVA_SECURE_RANDOM_ALGORITHM_KEY */
693  public static final String HADOOP_SECURITY_JAVA_SECURE_RANDOM_ALGORITHM_DEFAULT = 
694    "SHA1PRNG";
695  /**
696   * @see
697   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
698   * core-default.xml</a>
699   */
700  public static final String HADOOP_SECURITY_SECURE_RANDOM_IMPL_KEY = 
701    "hadoop.security.secure.random.impl";
702  /**
703   * @see
704   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
705   * core-default.xml</a>
706   */
707  public static final String HADOOP_SECURITY_SECURE_RANDOM_DEVICE_FILE_PATH_KEY = 
708    "hadoop.security.random.device.file.path";
709  public static final String HADOOP_SECURITY_SECURE_RANDOM_DEVICE_FILE_PATH_DEFAULT = 
710    "/dev/urandom";
711
712  /**
713   * @see
714   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
715   * core-default.xml</a>
716   */
717  public static final String HADOOP_SHELL_MISSING_DEFAULT_FS_WARNING_KEY =
718      "hadoop.shell.missing.defaultFs.warning";
719  public static final boolean HADOOP_SHELL_MISSING_DEFAULT_FS_WARNING_DEFAULT =
720      false;
721
722  /**
723   * @see
724   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
725   * core-default.xml</a>
726   */
727  public static final String HADOOP_SHELL_SAFELY_DELETE_LIMIT_NUM_FILES =
728      "hadoop.shell.safely.delete.limit.num.files";
729  public static final long HADOOP_SHELL_SAFELY_DELETE_LIMIT_NUM_FILES_DEFAULT =
730      100;
731
732  /**
733   * @see
734   * <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
735   * core-default.xml</a>
736   */
737  public static final String HADOOP_SECURITY_SENSITIVE_CONFIG_KEYS =
738      "hadoop.security.sensitive-config-keys";
739  public static final String HADOOP_SECURITY_SENSITIVE_CONFIG_KEYS_DEFAULT =
740      "secret$" + "," +
741      "password$" + "," +
742      "ssl.keystore.pass$" + "," +
743      "fs.s3.*[Ss]ecret.?[Kk]ey" + "," +
744      "fs.azure\\.account.key.*" + "," +
745      "dfs.webhdfs.oauth2.[a-z]+.token" + "," +
746      HADOOP_SECURITY_SENSITIVE_CONFIG_KEYS;
747}
748