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