HADOOP-12446. Undeprecate createNonRecursive(). Contributed by Ted Yu.
(cherry picked from commit 3abbdc929b
)
This commit is contained in:
parent
3c4c52a095
commit
95b8f1f3a6
|
@ -279,6 +279,8 @@ Release 2.8.0 - UNRELEASED
|
||||||
HADOOP-12428. Fix inconsistency between log-level guards and statements.
|
HADOOP-12428. Fix inconsistency between log-level guards and statements.
|
||||||
(Jagadesh Kiran N and Jackie Chang via ozawa)
|
(Jagadesh Kiran N and Jackie Chang via ozawa)
|
||||||
|
|
||||||
|
HADOOP-12446. Undeprecate createNonRecursive() (Ted Yu via kihwal)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HADOOP-11785. Reduce the number of listStatus operation in distcp
|
HADOOP-11785. Reduce the number of listStatus operation in distcp
|
||||||
|
|
|
@ -1089,9 +1089,7 @@ public abstract class FileSystem extends Configured implements Closeable {
|
||||||
* @param progress
|
* @param progress
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @see #setPermission(Path, FsPermission)
|
* @see #setPermission(Path, FsPermission)
|
||||||
* @deprecated API only for 0.20-append
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public FSDataOutputStream createNonRecursive(Path f,
|
public FSDataOutputStream createNonRecursive(Path f,
|
||||||
boolean overwrite,
|
boolean overwrite,
|
||||||
int bufferSize, short replication, long blockSize,
|
int bufferSize, short replication, long blockSize,
|
||||||
|
@ -1114,9 +1112,7 @@ public abstract class FileSystem extends Configured implements Closeable {
|
||||||
* @param progress
|
* @param progress
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @see #setPermission(Path, FsPermission)
|
* @see #setPermission(Path, FsPermission)
|
||||||
* @deprecated API only for 0.20-append
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
||||||
boolean overwrite, int bufferSize, short replication, long blockSize,
|
boolean overwrite, int bufferSize, short replication, long blockSize,
|
||||||
Progressable progress) throws IOException {
|
Progressable progress) throws IOException {
|
||||||
|
@ -1139,9 +1135,7 @@ public abstract class FileSystem extends Configured implements Closeable {
|
||||||
* @param progress
|
* @param progress
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
* @see #setPermission(Path, FsPermission)
|
* @see #setPermission(Path, FsPermission)
|
||||||
* @deprecated API only for 0.20-append
|
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
||||||
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
|
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
|
||||||
Progressable progress) throws IOException {
|
Progressable progress) throws IOException {
|
||||||
|
|
|
@ -203,7 +203,6 @@ public class FilterFileSystem extends FileSystem {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
|
||||||
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
||||||
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
|
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
|
||||||
Progressable progress) throws IOException {
|
Progressable progress) throws IOException {
|
||||||
|
|
|
@ -713,7 +713,6 @@ public class HarFileSystem extends FileSystem {
|
||||||
throw new IOException("Har: create not allowed.");
|
throw new IOException("Har: create not allowed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Override
|
@Override
|
||||||
public FSDataOutputStream createNonRecursive(Path f, boolean overwrite,
|
public FSDataOutputStream createNonRecursive(Path f, boolean overwrite,
|
||||||
int bufferSize, short replication, long blockSize, Progressable progress)
|
int bufferSize, short replication, long blockSize, Progressable progress)
|
||||||
|
|
|
@ -312,7 +312,6 @@ public class RawLocalFileSystem extends FileSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
|
||||||
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
||||||
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
|
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
|
||||||
Progressable progress) throws IOException {
|
Progressable progress) throws IOException {
|
||||||
|
|
|
@ -185,7 +185,6 @@ class ChRootedFileSystem extends FilterFileSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
|
||||||
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
||||||
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
|
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
|
||||||
Progressable progress) throws IOException {
|
Progressable progress) throws IOException {
|
||||||
|
|
|
@ -55,7 +55,6 @@ public class TestHarFileSystem {
|
||||||
* {@link HarFileSystem}. Either because there is a default implementation
|
* {@link HarFileSystem}. Either because there is a default implementation
|
||||||
* already available or because it is not relevant.
|
* already available or because it is not relevant.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
private interface MustNotImplement {
|
private interface MustNotImplement {
|
||||||
public BlockLocation[] getFileBlockLocations(Path p, long start, long len);
|
public BlockLocation[] getFileBlockLocations(Path p, long start, long len);
|
||||||
public long getLength(Path f);
|
public long getLength(Path f);
|
||||||
|
|
|
@ -484,7 +484,6 @@ public class DistributedFileSystem extends FileSystem {
|
||||||
* Same as create(), except fails if parent directory doesn't already exist.
|
* Same as create(), except fails if parent directory doesn't already exist.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public FSDataOutputStream createNonRecursive(final Path f,
|
public FSDataOutputStream createNonRecursive(final Path f,
|
||||||
final FsPermission permission, final EnumSet<CreateFlag> flag,
|
final FsPermission permission, final EnumSet<CreateFlag> flag,
|
||||||
final int bufferSize, final short replication, final long blockSize,
|
final int bufferSize, final short replication, final long blockSize,
|
||||||
|
|
|
@ -1188,7 +1188,6 @@ public class WebHdfsFileSystem extends FileSystem
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public FSDataOutputStream createNonRecursive(final Path f,
|
public FSDataOutputStream createNonRecursive(final Path f,
|
||||||
final FsPermission permission, final EnumSet<CreateFlag> flag,
|
final FsPermission permission, final EnumSet<CreateFlag> flag,
|
||||||
final int bufferSize, final short replication, final long blockSize,
|
final int bufferSize, final short replication, final long blockSize,
|
||||||
|
|
|
@ -860,7 +860,6 @@ public class TestFileCreation {
|
||||||
// Attempts to create and close a file using FileSystem.createNonRecursive(),
|
// Attempts to create and close a file using FileSystem.createNonRecursive(),
|
||||||
// catching and returning an exception if one occurs or null
|
// catching and returning an exception if one occurs or null
|
||||||
// if the operation is successful.
|
// if the operation is successful.
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
static IOException createNonRecursive(FileSystem fs, Path name,
|
static IOException createNonRecursive(FileSystem fs, Path name,
|
||||||
int repl, EnumSet<CreateFlag> flag) throws IOException {
|
int repl, EnumSet<CreateFlag> flag) throws IOException {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1204,7 +1204,6 @@ public class NativeAzureFileSystem extends FileSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
||||||
boolean overwrite, int bufferSize, short replication, long blockSize,
|
boolean overwrite, int bufferSize, short replication, long blockSize,
|
||||||
Progressable progress) throws IOException {
|
Progressable progress) throws IOException {
|
||||||
|
@ -1279,7 +1278,6 @@ public class NativeAzureFileSystem extends FileSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
|
||||||
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
|
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
|
||||||
Progressable progress) throws IOException {
|
Progressable progress) throws IOException {
|
||||||
|
@ -1298,7 +1296,6 @@ public class NativeAzureFileSystem extends FileSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public FSDataOutputStream createNonRecursive(Path f,
|
public FSDataOutputStream createNonRecursive(Path f,
|
||||||
boolean overwrite, int bufferSize, short replication, long blockSize,
|
boolean overwrite, int bufferSize, short replication, long blockSize,
|
||||||
Progressable progress) throws IOException {
|
Progressable progress) throws IOException {
|
||||||
|
|
|
@ -1332,7 +1332,6 @@ public abstract class NativeAzureFileSystemBaseTest {
|
||||||
return (lastModified > (time - errorMargin) && lastModified < (time + errorMargin));
|
return (lastModified > (time - errorMargin) && lastModified < (time + errorMargin));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Test
|
@Test
|
||||||
public void testCreateNonRecursive() throws Exception {
|
public void testCreateNonRecursive() throws Exception {
|
||||||
Path testFolder = new Path("/testFolder");
|
Path testFolder = new Path("/testFolder");
|
||||||
|
|
Loading…
Reference in New Issue