HADOOP-6709. Re-instate deprecated FileSystem methods that were removed after 0.20.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@939470 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
750fb2dbc1
commit
b56827c591
|
@ -376,6 +376,9 @@ Trunk (unreleased changes)
|
||||||
HADOOP-6634. Fix AccessControlList to use short names to verify access
|
HADOOP-6634. Fix AccessControlList to use short names to verify access
|
||||||
control. (Vinod Kumar Vavilapalli via sharad)
|
control. (Vinod Kumar Vavilapalli via sharad)
|
||||||
|
|
||||||
|
HADOOP-6709. Re-instate deprecated FileSystem methods that were removed
|
||||||
|
after 0.20. (tomwhite)
|
||||||
|
|
||||||
Release 0.21.0 - Unreleased
|
Release 0.21.0 - Unreleased
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -137,6 +137,17 @@ public abstract class FileSystem extends Configured implements Closeable {
|
||||||
/** Returns a URI whose scheme and authority identify this FileSystem.*/
|
/** Returns a URI whose scheme and authority identify this FileSystem.*/
|
||||||
public abstract URI getUri();
|
public abstract URI getUri();
|
||||||
|
|
||||||
|
/** @deprecated call #getUri() instead.*/
|
||||||
|
@Deprecated
|
||||||
|
public String getName() { return getUri().toString(); }
|
||||||
|
|
||||||
|
/** @deprecated call #get(URI,Configuration) instead. */
|
||||||
|
@Deprecated
|
||||||
|
public static FileSystem getNamed(String name, Configuration conf)
|
||||||
|
throws IOException {
|
||||||
|
return get(URI.create(fixName(name)), conf);
|
||||||
|
}
|
||||||
|
|
||||||
/** Update old-format filesystem names, for back-compatibility. This should
|
/** Update old-format filesystem names, for back-compatibility. This should
|
||||||
* eventually be replaced with a checkName() method that throws an exception
|
* eventually be replaced with a checkName() method that throws an exception
|
||||||
* for old-format names. */
|
* for old-format names. */
|
||||||
|
@ -813,6 +824,19 @@ public abstract class FileSystem extends Configured implements Closeable {
|
||||||
public abstract FSDataOutputStream append(Path f, int bufferSize,
|
public abstract FSDataOutputStream append(Path f, int bufferSize,
|
||||||
Progressable progress) throws IOException;
|
Progressable progress) throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get replication.
|
||||||
|
*
|
||||||
|
* @deprecated Use getFileStatus() instead
|
||||||
|
* @param src file name
|
||||||
|
* @return file replication
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public short getReplication(Path src) throws IOException {
|
||||||
|
return getFileStatus(src).getReplication();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set replication for an existing file.
|
* Set replication for an existing file.
|
||||||
*
|
*
|
||||||
|
@ -922,6 +946,15 @@ public abstract class FileSystem extends Configured implements Closeable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete a file
|
||||||
|
* @deprecated Use {@link #delete(Path, boolean)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public boolean delete(Path f) throws IOException {
|
||||||
|
return delete(f, true);
|
||||||
|
}
|
||||||
|
|
||||||
/** Delete a file.
|
/** Delete a file.
|
||||||
*
|
*
|
||||||
* @param f the path to delete.
|
* @param f the path to delete.
|
||||||
|
@ -1010,6 +1043,13 @@ public abstract class FileSystem extends Configured implements Closeable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** The number of bytes in a file. */
|
||||||
|
/** @deprecated Use getFileStatus() instead */
|
||||||
|
@Deprecated
|
||||||
|
public long getLength(Path f) throws IOException {
|
||||||
|
return getFileStatus(f).getLen();
|
||||||
|
}
|
||||||
|
|
||||||
/** Return the {@link ContentSummary} of a given {@link Path}. */
|
/** Return the {@link ContentSummary} of a given {@link Path}. */
|
||||||
public ContentSummary getContentSummary(Path f) throws IOException {
|
public ContentSummary getContentSummary(Path f) throws IOException {
|
||||||
FileStatus status = getFileStatus(f);
|
FileStatus status = getFileStatus(f);
|
||||||
|
@ -1609,6 +1649,17 @@ public abstract class FileSystem extends Configured implements Closeable {
|
||||||
return used;
|
return used;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the block size for a particular file.
|
||||||
|
* @param f the filename
|
||||||
|
* @return the number of bytes in a block
|
||||||
|
*/
|
||||||
|
/** @deprecated Use getFileStatus() instead */
|
||||||
|
@Deprecated
|
||||||
|
public long getBlockSize(Path f) throws IOException {
|
||||||
|
return getFileStatus(f).getBlockSize();
|
||||||
|
}
|
||||||
|
|
||||||
/** Return the number of bytes that large input files should be optimally
|
/** Return the number of bytes that large input files should be optimally
|
||||||
* be split into to minimize i/o time. */
|
* be split into to minimize i/o time. */
|
||||||
public long getDefaultBlockSize() {
|
public long getDefaultBlockSize() {
|
||||||
|
|
Loading…
Reference in New Issue