HADOOP-7786. Remove HDFS-specific config keys defined in FsConfig. Contributed by Eli Collins
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1196129 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4961441584
commit
877021eb50
@ -1049,6 +1049,8 @@ Release 0.22.0 - Unreleased
|
|||||||
|
|
||||||
HADOOP-7772. javadoc the topology classes (stevel)
|
HADOOP-7772. javadoc the topology classes (stevel)
|
||||||
|
|
||||||
|
HADOOP-7786. Remove HDFS-specific config keys defined in FsConfig. (eli)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).
|
HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).
|
||||||
|
@ -627,7 +627,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>conf/hdfs-site.xml</td>
|
<td>conf/hdfs-site.xml</td>
|
||||||
<td>dfs.block.size</td>
|
<td>dfs.blocksize</td>
|
||||||
<td>134217728</td>
|
<td>134217728</td>
|
||||||
<td>HDFS blocksize of 128MB for large file-systems.</td>
|
<td>HDFS blocksize of 128MB for large file-systems.</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -44,6 +44,8 @@
|
|||||||
import org.apache.hadoop.fs.FileSystem.Statistics;
|
import org.apache.hadoop.fs.FileSystem.Statistics;
|
||||||
import org.apache.hadoop.fs.Options.CreateOpts;
|
import org.apache.hadoop.fs.Options.CreateOpts;
|
||||||
import org.apache.hadoop.fs.permission.FsPermission;
|
import org.apache.hadoop.fs.permission.FsPermission;
|
||||||
|
import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY;
|
||||||
|
import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.FS_DEFAULT_NAME_DEFAULT;
|
||||||
import org.apache.hadoop.io.IOUtils;
|
import org.apache.hadoop.io.IOUtils;
|
||||||
import org.apache.hadoop.ipc.RpcClientException;
|
import org.apache.hadoop.ipc.RpcClientException;
|
||||||
import org.apache.hadoop.ipc.RpcServerException;
|
import org.apache.hadoop.ipc.RpcServerException;
|
||||||
@ -443,7 +445,9 @@ public static FileContext getFileContext(final URI defaultFsUri,
|
|||||||
*/
|
*/
|
||||||
public static FileContext getFileContext(final Configuration aConf)
|
public static FileContext getFileContext(final Configuration aConf)
|
||||||
throws UnsupportedFileSystemException {
|
throws UnsupportedFileSystemException {
|
||||||
return getFileContext(URI.create(FsConfig.getDefaultFsURI(aConf)), aConf);
|
return getFileContext(
|
||||||
|
URI.create(aConf.get(FS_DEFAULT_NAME_KEY, FS_DEFAULT_NAME_DEFAULT)),
|
||||||
|
aConf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
import org.apache.ftpserver.command.impl.STAT;
|
import org.apache.ftpserver.command.impl.STAT;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.io.IOUtils;
|
import org.apache.hadoop.io.IOUtils;
|
||||||
|
import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@ -301,7 +302,7 @@ public void testInvalidDefaultFS() throws Exception {
|
|||||||
// arguments is valid - fsshell should work
|
// arguments is valid - fsshell should work
|
||||||
FsShell shell = new FsShell();
|
FsShell shell = new FsShell();
|
||||||
Configuration conf = new Configuration();
|
Configuration conf = new Configuration();
|
||||||
FsConfig.setDefaultFS(conf, "hhhh://doesnotexist/");
|
conf.set(FS_DEFAULT_NAME_KEY, "hhhh://doesnotexist/");
|
||||||
shell.setConf(conf);
|
shell.setConf(conf);
|
||||||
String [] args = new String[2];
|
String [] args = new String[2];
|
||||||
args[0] = "-ls";
|
args[0] = "-ls";
|
||||||
|
Loading…
Reference in New Issue
Block a user