HDFS-8740. Move DistributedFileSystem to hadoop-hdfs-client. Contributed by Mingliang Liu.

This commit is contained in:
Haohui Mai 2015-09-27 10:54:44 -07:00
parent 1c7b3b98c1
commit 504d6fd950
3 changed files with 7 additions and 6 deletions

View File

@ -64,7 +64,6 @@ import org.apache.hadoop.fs.permission.AclStatus;
import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.fs.permission.FsAction;
import org.apache.hadoop.fs.StorageType;
import org.apache.hadoop.hdfs.client.HdfsAdmin;
import org.apache.hadoop.hdfs.client.HdfsClientConfigKeys;
import org.apache.hadoop.hdfs.client.HdfsDataOutputStream;
import org.apache.hadoop.hdfs.client.impl.CorruptFileBlockIterator;
@ -117,7 +116,7 @@ public class DistributedFileSystem extends FileSystem {
private boolean verifyChecksum = true;
static{
HdfsConfiguration.init();
HdfsConfigurationLoader.init();
}
public DistributedFileSystem() {
@ -173,7 +172,7 @@ public class DistributedFileSystem extends FileSystem {
@Override
public void setWorkingDirectory(Path dir) {
String result = fixRelativePart(dir).toUri().getPath();
if (!DFSUtil.isValidName(result)) {
if (!DFSUtilClient.isValidName(result)) {
throw new IllegalArgumentException("Invalid DFS directory name " +
result);
}
@ -197,7 +196,7 @@ public class DistributedFileSystem extends FileSystem {
private String getPathName(Path file) {
checkPath(file);
String result = file.toUri().getPath();
if (!DFSUtil.isValidName(result)) {
if (!DFSUtilClient.isValidName(result)) {
throw new IllegalArgumentException("Pathname " + result + " from " +
file+" is not a valid DFS filename.");
}
@ -220,8 +219,7 @@ public class DistributedFileSystem extends FileSystem {
final Path absF = fixRelativePart(p);
return new FileSystemLinkResolver<BlockLocation[]>() {
@Override
public BlockLocation[] doCall(final Path p)
throws IOException, UnresolvedLinkException {
public BlockLocation[] doCall(final Path p) throws IOException {
return dfs.getBlockLocations(getPathName(p), start, len);
}
@Override

View File

@ -635,6 +635,9 @@ Release 2.8.0 - UNRELEASED
HDFS-9087. Add some jitter to DataNode.checkDiskErrorThread (Elliott Clark
via Colin P. McCabe)
HDFS-8740. Move DistributedFileSystem to hadoop-hdfs-client. (Mingliang Liu
via wheat9)
OPTIMIZATIONS
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than