HDFS-8740. Move DistributedFileSystem to hadoop-hdfs-client. Contributed by Mingliang Liu.
This commit is contained in:
parent
1c7b3b98c1
commit
504d6fd950
|
@ -64,7 +64,6 @@ import org.apache.hadoop.fs.permission.AclStatus;
|
||||||
import org.apache.hadoop.fs.permission.FsPermission;
|
import org.apache.hadoop.fs.permission.FsPermission;
|
||||||
import org.apache.hadoop.fs.permission.FsAction;
|
import org.apache.hadoop.fs.permission.FsAction;
|
||||||
import org.apache.hadoop.fs.StorageType;
|
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.HdfsClientConfigKeys;
|
||||||
import org.apache.hadoop.hdfs.client.HdfsDataOutputStream;
|
import org.apache.hadoop.hdfs.client.HdfsDataOutputStream;
|
||||||
import org.apache.hadoop.hdfs.client.impl.CorruptFileBlockIterator;
|
import org.apache.hadoop.hdfs.client.impl.CorruptFileBlockIterator;
|
||||||
|
@ -117,7 +116,7 @@ public class DistributedFileSystem extends FileSystem {
|
||||||
private boolean verifyChecksum = true;
|
private boolean verifyChecksum = true;
|
||||||
|
|
||||||
static{
|
static{
|
||||||
HdfsConfiguration.init();
|
HdfsConfigurationLoader.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DistributedFileSystem() {
|
public DistributedFileSystem() {
|
||||||
|
@ -173,7 +172,7 @@ public class DistributedFileSystem extends FileSystem {
|
||||||
@Override
|
@Override
|
||||||
public void setWorkingDirectory(Path dir) {
|
public void setWorkingDirectory(Path dir) {
|
||||||
String result = fixRelativePart(dir).toUri().getPath();
|
String result = fixRelativePart(dir).toUri().getPath();
|
||||||
if (!DFSUtil.isValidName(result)) {
|
if (!DFSUtilClient.isValidName(result)) {
|
||||||
throw new IllegalArgumentException("Invalid DFS directory name " +
|
throw new IllegalArgumentException("Invalid DFS directory name " +
|
||||||
result);
|
result);
|
||||||
}
|
}
|
||||||
|
@ -197,7 +196,7 @@ public class DistributedFileSystem extends FileSystem {
|
||||||
private String getPathName(Path file) {
|
private String getPathName(Path file) {
|
||||||
checkPath(file);
|
checkPath(file);
|
||||||
String result = file.toUri().getPath();
|
String result = file.toUri().getPath();
|
||||||
if (!DFSUtil.isValidName(result)) {
|
if (!DFSUtilClient.isValidName(result)) {
|
||||||
throw new IllegalArgumentException("Pathname " + result + " from " +
|
throw new IllegalArgumentException("Pathname " + result + " from " +
|
||||||
file+" is not a valid DFS filename.");
|
file+" is not a valid DFS filename.");
|
||||||
}
|
}
|
||||||
|
@ -220,8 +219,7 @@ public class DistributedFileSystem extends FileSystem {
|
||||||
final Path absF = fixRelativePart(p);
|
final Path absF = fixRelativePart(p);
|
||||||
return new FileSystemLinkResolver<BlockLocation[]>() {
|
return new FileSystemLinkResolver<BlockLocation[]>() {
|
||||||
@Override
|
@Override
|
||||||
public BlockLocation[] doCall(final Path p)
|
public BlockLocation[] doCall(final Path p) throws IOException {
|
||||||
throws IOException, UnresolvedLinkException {
|
|
||||||
return dfs.getBlockLocations(getPathName(p), start, len);
|
return dfs.getBlockLocations(getPathName(p), start, len);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
|
@ -635,6 +635,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
HDFS-9087. Add some jitter to DataNode.checkDiskErrorThread (Elliott Clark
|
HDFS-9087. Add some jitter to DataNode.checkDiskErrorThread (Elliott Clark
|
||||||
via Colin P. McCabe)
|
via Colin P. McCabe)
|
||||||
|
|
||||||
|
HDFS-8740. Move DistributedFileSystem to hadoop-hdfs-client. (Mingliang Liu
|
||||||
|
via wheat9)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
|
||||||
|
|
Loading…
Reference in New Issue