HDFS-8740. Move DistributedFileSystem to hadoop-hdfs-client. Contributed by Mingliang Liu.
This commit is contained in:
parent
f0f984e4e6
commit
1c030c6e58
|
@ -62,7 +62,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;
|
||||
|
@ -115,7 +114,7 @@ public class DistributedFileSystem extends FileSystem {
|
|||
private boolean verifyChecksum = true;
|
||||
|
||||
static{
|
||||
HdfsConfiguration.init();
|
||||
HdfsConfigurationLoader.init();
|
||||
}
|
||||
|
||||
public DistributedFileSystem() {
|
||||
|
@ -171,7 +170,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);
|
||||
}
|
||||
|
@ -195,7 +194,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.");
|
||||
}
|
||||
|
@ -218,8 +217,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
|
|
@ -983,6 +983,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
|
||||
|
|
Loading…
Reference in New Issue