1 /** 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 package org.apache.hadoop.hdfs.nfs.conf; 20 21 public class NfsConfigKeys { 22 23 // The IP port number for NFS and mountd. 24 public final static String DFS_NFS_SERVER_PORT_KEY = "nfs.server.port"; 25 public final static int DFS_NFS_SERVER_PORT_DEFAULT = 2049; 26 public final static String DFS_NFS_MOUNTD_PORT_KEY = "nfs.mountd.port"; 27 public final static int DFS_NFS_MOUNTD_PORT_DEFAULT = 4242; 28 29 public static final String DFS_NFS_FILE_DUMP_KEY = "nfs.file.dump"; 30 public static final boolean DFS_NFS_FILE_DUMP_DEFAULT = true; 31 public static final String DFS_NFS_FILE_DUMP_DIR_KEY = "nfs.file.dump.dir"; 32 public static final String DFS_NFS_FILE_DUMP_DIR_DEFAULT = "/tmp/.hdfs-nfs"; 33 34 public static final String DFS_NFS_MAX_READ_TRANSFER_SIZE_KEY = "nfs.rtmax"; 35 public static final int DFS_NFS_MAX_READ_TRANSFER_SIZE_DEFAULT = 1024 * 1024; 36 public static final String DFS_NFS_MAX_WRITE_TRANSFER_SIZE_KEY = "nfs.wtmax"; 37 public static final int DFS_NFS_MAX_WRITE_TRANSFER_SIZE_DEFAULT = 1024 * 1024; 38 public static final String DFS_NFS_MAX_READDIR_TRANSFER_SIZE_KEY = "nfs.dtmax"; 39 public static final int DFS_NFS_MAX_READDIR_TRANSFER_SIZE_DEFAULT = 64 * 1024; 40 41 public static final String DFS_NFS_MAX_OPEN_FILES_KEY = "nfs.max.open.files"; 42 public static final int DFS_NFS_MAX_OPEN_FILES_DEFAULT = 256; 43 44 public static final String DFS_NFS_STREAM_TIMEOUT_KEY = "nfs.stream.timeout"; 45 public static final long DFS_NFS_STREAM_TIMEOUT_DEFAULT = 10 * 60 * 1000; // 10 minutes 46 public static final long DFS_NFS_STREAM_TIMEOUT_MIN_DEFAULT = 10 * 1000; // 10 seconds 47 48 public final static String DFS_NFS_EXPORT_POINT_KEY = "nfs.export.point"; 49 public final static String DFS_NFS_EXPORT_POINT_DEFAULT = "/"; 50 51 public static final String DFS_NFS_KEYTAB_FILE_KEY = "nfs.keytab.file"; 52 public static final String DFS_NFS_KERBEROS_PRINCIPAL_KEY = "nfs.kerberos.principal"; 53 public static final String DFS_NFS_REGISTRATION_PORT_KEY = "nfs.registration.port"; 54 public static final int DFS_NFS_REGISTRATION_PORT_DEFAULT = 40; // Currently unassigned. 55 public static final String DFS_NFS_PORT_MONITORING_DISABLED_KEY = "nfs.port.monitoring.disabled"; 56 public static final boolean DFS_NFS_PORT_MONITORING_DISABLED_DEFAULT = true; 57 58 public static final String AIX_COMPAT_MODE_KEY = "nfs.aix.compatibility.mode.enabled"; 59 public static final boolean AIX_COMPAT_MODE_DEFAULT = false; 60 61 public final static String LARGE_FILE_UPLOAD = "nfs.large.file.upload"; 62 public final static boolean LARGE_FILE_UPLOAD_DEFAULT = true; 63 64 public static final String NFS_HTTP_PORT_KEY = "nfs.http.port"; 65 public static final int NFS_HTTP_PORT_DEFAULT = 50079; 66 public static final String NFS_HTTP_ADDRESS_KEY = "nfs.http.address"; 67 public static final String NFS_HTTP_ADDRESS_DEFAULT = "0.0.0.0:" + NFS_HTTP_PORT_DEFAULT; 68 69 public static final String NFS_HTTPS_PORT_KEY = "nfs.https.port"; 70 public static final int NFS_HTTPS_PORT_DEFAULT = 50579; 71 public static final String NFS_HTTPS_ADDRESS_KEY = "nfs.https.address"; 72 public static final String NFS_HTTPS_ADDRESS_DEFAULT = "0.0.0.0:" + NFS_HTTPS_PORT_DEFAULT; 73 74 public static final String NFS_METRICS_PERCENTILES_INTERVALS_KEY = "nfs.metrics.percentiles.intervals"; 75 76 /* 77 * HDFS super-user is the user with the same identity as NameNode process 78 * itself and the super-user can do anything in that permissions checks never 79 * fail for the super-user. If the following property is configured, the 80 * superuser on NFS client can access any file on HDFS. By default, the super 81 * user is not configured in the gateway. Note that, even the the superuser is 82 * configured, "nfs.exports.allowed.hosts" still takes effect. For example, 83 * the superuser will not have write access to HDFS files through the gateway 84 * if the NFS client host is not allowed to have write access in 85 * "nfs.exports.allowed.hosts". 86 */ 87 public static final String NFS_SUPERUSER_KEY = "nfs.superuser"; 88 public static final String NFS_SUPERUSER_DEFAULT = ""; 89 } 90