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    
019    package org.apache.hadoop.fs;
020    
021    import org.apache.hadoop.classification.InterfaceAudience;
022    
023    /** 
024     * This class contains constants for configuration keys used
025     * in the common code.
026     *
027     * It includes all publicly documented configuration keys. In general
028     * this class should not be used directly (use CommonConfigurationKeys
029     * instead)
030     *
031     */
032    
033    @InterfaceAudience.Public
034    public class CommonConfigurationKeysPublic {
035      
036      // The Keys
037      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
038      public static final String  IO_NATIVE_LIB_AVAILABLE_KEY =
039        "io.native.lib.available";
040      /** Default value for IO_NATIVE_LIB_AVAILABLE_KEY */
041      public static final boolean IO_NATIVE_LIB_AVAILABLE_DEFAULT = true;
042      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
043      public static final String  NET_TOPOLOGY_SCRIPT_NUMBER_ARGS_KEY =
044        "net.topology.script.number.args";
045      /** Default value for NET_TOPOLOGY_SCRIPT_NUMBER_ARGS_KEY */
046      public static final int     NET_TOPOLOGY_SCRIPT_NUMBER_ARGS_DEFAULT = 100;
047    
048      //FS keys
049      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
050      public static final String  FS_DEFAULT_NAME_KEY = "fs.defaultFS";
051      /** Default value for FS_DEFAULT_NAME_KEY */
052      public static final String  FS_DEFAULT_NAME_DEFAULT = "file:///";
053      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
054      public static final String  FS_DF_INTERVAL_KEY = "fs.df.interval"; 
055      /** Default value for FS_DF_INTERVAL_KEY */
056      public static final long    FS_DF_INTERVAL_DEFAULT = 60000;
057    
058    
059      //Defaults are not specified for following keys
060      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
061      public static final String  NET_TOPOLOGY_SCRIPT_FILE_NAME_KEY =
062        "net.topology.script.file.name";
063      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
064      public static final String  NET_TOPOLOGY_NODE_SWITCH_MAPPING_IMPL_KEY =
065        "net.topology.node.switch.mapping.impl";
066      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
067      public static final String  NET_TOPOLOGY_IMPL_KEY =
068        "net.topology.impl";
069      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
070      public static final String  NET_TOPOLOGY_TABLE_MAPPING_FILE_KEY =
071        "net.topology.table.file.name";
072    
073      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
074      public static final String  FS_TRASH_CHECKPOINT_INTERVAL_KEY =
075        "fs.trash.checkpoint.interval";
076      /** Default value for FS_TRASH_CHECKPOINT_INTERVAL_KEY */
077      public static final long    FS_TRASH_CHECKPOINT_INTERVAL_DEFAULT = 0;
078    
079      // TBD: Code is still using hardcoded values (e.g. "fs.automatic.close")
080      // instead of constant (e.g. FS_AUTOMATIC_CLOSE_KEY)
081      //
082      /** Not used anywhere, looks like default value for FS_LOCAL_BLOCK_SIZE */
083      public static final long    FS_LOCAL_BLOCK_SIZE_DEFAULT = 32*1024*1024;
084      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
085      public static final String  FS_AUTOMATIC_CLOSE_KEY = "fs.automatic.close";
086      /** Default value for FS_AUTOMATIC_CLOSE_KEY */
087      public static final boolean FS_AUTOMATIC_CLOSE_DEFAULT = true;
088      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
089      public static final String  FS_FILE_IMPL_KEY = "fs.file.impl";
090      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
091      public static final String  FS_FTP_HOST_KEY = "fs.ftp.host";
092      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
093      public static final String  FS_FTP_HOST_PORT_KEY = "fs.ftp.host.port";
094      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
095      public static final String  FS_TRASH_INTERVAL_KEY = "fs.trash.interval";
096      /** Default value for FS_TRASH_INTERVAL_KEY */
097      public static final long    FS_TRASH_INTERVAL_DEFAULT = 0;
098    
099      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
100      public static final String  IO_MAPFILE_BLOOM_SIZE_KEY =
101        "io.mapfile.bloom.size";
102      /** Default value for IO_MAPFILE_BLOOM_SIZE_KEY */
103      public static final int     IO_MAPFILE_BLOOM_SIZE_DEFAULT = 1024*1024;
104      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
105      public static final String  IO_MAPFILE_BLOOM_ERROR_RATE_KEY =
106        "io.mapfile.bloom.error.rate" ;
107      /** Default value for IO_MAPFILE_BLOOM_ERROR_RATE_KEY */
108      public static final float   IO_MAPFILE_BLOOM_ERROR_RATE_DEFAULT = 0.005f;
109      /** Codec class that implements Lzo compression algorithm */
110      public static final String  IO_COMPRESSION_CODEC_LZO_CLASS_KEY =
111        "io.compression.codec.lzo.class";
112      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
113      public static final String  IO_MAP_INDEX_INTERVAL_KEY =
114        "io.map.index.interval";
115      /** Default value for IO_MAP_INDEX_INTERVAL_DEFAULT */
116      public static final int     IO_MAP_INDEX_INTERVAL_DEFAULT = 128;
117      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
118      public static final String  IO_MAP_INDEX_SKIP_KEY = "io.map.index.skip";
119      /** Default value for IO_MAP_INDEX_SKIP_KEY */
120      public static final int     IO_MAP_INDEX_SKIP_DEFAULT = 0;
121      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
122      public static final String  IO_SEQFILE_COMPRESS_BLOCKSIZE_KEY =
123        "io.seqfile.compress.blocksize";
124      /** Default value for IO_SEQFILE_COMPRESS_BLOCKSIZE_KEY */
125      public static final int     IO_SEQFILE_COMPRESS_BLOCKSIZE_DEFAULT = 1000000;
126      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
127      public static final String  IO_FILE_BUFFER_SIZE_KEY =
128        "io.file.buffer.size";
129      /** Default value for IO_FILE_BUFFER_SIZE_KEY */
130      public static final int     IO_FILE_BUFFER_SIZE_DEFAULT = 4096;
131      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
132      public static final String  IO_SKIP_CHECKSUM_ERRORS_KEY =
133        "io.skip.checksum.errors";
134      /** Default value for IO_SKIP_CHECKSUM_ERRORS_KEY */
135      public static final boolean IO_SKIP_CHECKSUM_ERRORS_DEFAULT = false;
136      /**
137       * @deprecated Moved to mapreduce, see mapreduce.task.io.sort.mb
138       * in mapred-default.xml
139       * See https://issues.apache.org/jira/browse/HADOOP-6801
140       */
141      public static final String  IO_SORT_MB_KEY = "io.sort.mb";
142      /** Default value for IO_SORT_MB_DEFAULT */
143      public static final int     IO_SORT_MB_DEFAULT = 100;
144      /**
145       * @deprecated Moved to mapreduce, see mapreduce.task.io.sort.factor
146       * in mapred-default.xml
147       * See https://issues.apache.org/jira/browse/HADOOP-6801
148       */
149      public static final String  IO_SORT_FACTOR_KEY = "io.sort.factor";
150      /** Default value for IO_SORT_FACTOR_DEFAULT */
151      public static final int     IO_SORT_FACTOR_DEFAULT = 100;
152      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
153      public static final String  IO_SERIALIZATIONS_KEY = "io.serializations";
154    
155      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
156      public static final String  TFILE_IO_CHUNK_SIZE_KEY = "tfile.io.chunk.size";
157      /** Default value for TFILE_IO_CHUNK_SIZE_DEFAULT */
158      public static final int     TFILE_IO_CHUNK_SIZE_DEFAULT = 1024*1024;
159      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
160      public static final String  TFILE_FS_INPUT_BUFFER_SIZE_KEY =
161        "tfile.fs.input.buffer.size";
162      /** Default value for TFILE_FS_INPUT_BUFFER_SIZE_KEY */
163      public static final int     TFILE_FS_INPUT_BUFFER_SIZE_DEFAULT = 256*1024;
164      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
165      public static final String  TFILE_FS_OUTPUT_BUFFER_SIZE_KEY =
166        "tfile.fs.output.buffer.size";
167      /** Default value for TFILE_FS_OUTPUT_BUFFER_SIZE_KEY */
168      public static final int     TFILE_FS_OUTPUT_BUFFER_SIZE_DEFAULT = 256*1024;
169    
170      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
171      public static final String  IPC_CLIENT_CONNECTION_MAXIDLETIME_KEY =
172        "ipc.client.connection.maxidletime";
173      /** Default value for IPC_CLIENT_CONNECTION_MAXIDLETIME_KEY */
174      public static final int     IPC_CLIENT_CONNECTION_MAXIDLETIME_DEFAULT = 10000; // 10s
175      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
176      public static final String  IPC_CLIENT_CONNECT_TIMEOUT_KEY =
177        "ipc.client.connect.timeout";
178      /** Default value for IPC_CLIENT_CONNECT_TIMEOUT_KEY */
179      public static final int     IPC_CLIENT_CONNECT_TIMEOUT_DEFAULT = 20000; // 20s
180      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
181      public static final String  IPC_CLIENT_CONNECT_MAX_RETRIES_KEY =
182        "ipc.client.connect.max.retries";
183      /** Default value for IPC_CLIENT_CONNECT_MAX_RETRIES_KEY */
184      public static final int     IPC_CLIENT_CONNECT_MAX_RETRIES_DEFAULT = 10;
185      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
186      public static final String  IPC_CLIENT_CONNECT_MAX_RETRIES_ON_SOCKET_TIMEOUTS_KEY =
187        "ipc.client.connect.max.retries.on.timeouts";
188      /** Default value for IPC_CLIENT_CONNECT_MAX_RETRIES_ON_SOCKET_TIMEOUTS_KEY */
189      public static final int  IPC_CLIENT_CONNECT_MAX_RETRIES_ON_SOCKET_TIMEOUTS_DEFAULT = 45;
190      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
191      public static final String  IPC_CLIENT_TCPNODELAY_KEY =
192        "ipc.client.tcpnodelay";
193      /** Defalt value for IPC_CLIENT_TCPNODELAY_KEY */
194      public static final boolean IPC_CLIENT_TCPNODELAY_DEFAULT = false;
195      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
196      public static final String  IPC_SERVER_LISTEN_QUEUE_SIZE_KEY =
197        "ipc.server.listen.queue.size";
198      /** Default value for IPC_SERVER_LISTEN_QUEUE_SIZE_KEY */
199      public static final int     IPC_SERVER_LISTEN_QUEUE_SIZE_DEFAULT = 128;
200      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
201      public static final String  IPC_CLIENT_KILL_MAX_KEY = "ipc.client.kill.max";
202      /** Default value for IPC_CLIENT_KILL_MAX_KEY */
203      public static final int     IPC_CLIENT_KILL_MAX_DEFAULT = 10;
204      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
205      public static final String  IPC_CLIENT_IDLETHRESHOLD_KEY =
206        "ipc.client.idlethreshold";
207      /** Default value for IPC_CLIENT_IDLETHRESHOLD_DEFAULT */
208      public static final int     IPC_CLIENT_IDLETHRESHOLD_DEFAULT = 4000;
209      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
210      public static final String  IPC_SERVER_TCPNODELAY_KEY =
211        "ipc.server.tcpnodelay";
212      /** Default value for IPC_SERVER_TCPNODELAY_KEY */
213      public static final boolean IPC_SERVER_TCPNODELAY_DEFAULT = false;
214    
215      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
216      public static final String  HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_KEY =
217        "hadoop.rpc.socket.factory.class.default";
218      public static final String  HADOOP_RPC_SOCKET_FACTORY_CLASS_DEFAULT_DEFAULT =
219        "org.apache.hadoop.net.StandardSocketFactory";
220      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
221      public static final String  HADOOP_SOCKS_SERVER_KEY = "hadoop.socks.server";
222      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
223      public static final String  HADOOP_UTIL_HASH_TYPE_KEY =
224        "hadoop.util.hash.type";
225      /** Default value for HADOOP_UTIL_HASH_TYPE_KEY */
226      public static final String  HADOOP_UTIL_HASH_TYPE_DEFAULT = "murmur";
227      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
228      public static final String  HADOOP_SECURITY_GROUP_MAPPING =
229        "hadoop.security.group.mapping";
230      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
231      public static final String  HADOOP_SECURITY_GROUPS_CACHE_SECS =
232        "hadoop.security.groups.cache.secs";
233      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
234      public static final String  HADOOP_SECURITY_AUTHENTICATION =
235        "hadoop.security.authentication";
236      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
237      public static final String HADOOP_SECURITY_AUTHORIZATION =
238        "hadoop.security.authorization";
239      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
240      public static final String HADOOP_SECURITY_INSTRUMENTATION_REQUIRES_ADMIN =
241        "hadoop.security.instrumentation.requires.admin";
242      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
243      public static final String  HADOOP_SECURITY_SERVICE_USER_NAME_KEY =
244        "hadoop.security.service.user.name.key";
245      /** See <a href="{@docRoot}/../core-default.html">core-default.xml</a> */
246      public static final String  HADOOP_SECURITY_AUTH_TO_LOCAL =
247        "hadoop.security.auth_to_local";
248    
249      public static final String HADOOP_SSL_ENABLED_KEY = "hadoop.ssl.enabled";
250      public static final boolean HADOOP_SSL_ENABLED_DEFAULT = false;
251    
252    }
253