HADOOP-12446. Undeprecate createNonRecursive(). Contributed by Ted Yu.

This commit is contained in:
Kihwal Lee 2015-09-28 17:31:51 -05:00
parent ab11085b81
commit 3abbdc929b
12 changed files with 2 additions and 18 deletions

View File

@ -787,6 +787,8 @@ Release 2.8.0 - UNRELEASED
HADOOP-12428. Fix inconsistency between log-level guards and statements.
(Jagadesh Kiran N and Jackie Chang via ozawa)
HADOOP-12446. Undeprecate createNonRecursive() (Ted Yu via kihwal)
OPTIMIZATIONS
HADOOP-11785. Reduce the number of listStatus operation in distcp

View File

@ -1089,9 +1089,7 @@ protected void primitiveMkdir(Path f, FsPermission absolutePermission,
* @param progress
* @throws IOException
* @see #setPermission(Path, FsPermission)
* @deprecated API only for 0.20-append
*/
@Deprecated
public FSDataOutputStream createNonRecursive(Path f,
boolean overwrite,
int bufferSize, short replication, long blockSize,
@ -1114,9 +1112,7 @@ public FSDataOutputStream createNonRecursive(Path f,
* @param progress
* @throws IOException
* @see #setPermission(Path, FsPermission)
* @deprecated API only for 0.20-append
*/
@Deprecated
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
boolean overwrite, int bufferSize, short replication, long blockSize,
Progressable progress) throws IOException {
@ -1139,9 +1135,7 @@ public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
* @param progress
* @throws IOException
* @see #setPermission(Path, FsPermission)
* @deprecated API only for 0.20-append
*/
@Deprecated
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
Progressable progress) throws IOException {

View File

@ -203,7 +203,6 @@ protected RemoteIterator<LocatedFileStatus> listLocatedStatus(final Path f,
@Override
@Deprecated
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
Progressable progress) throws IOException {

View File

@ -713,7 +713,6 @@ public FSDataOutputStream create(Path f, FsPermission permission,
throw new IOException("Har: create not allowed.");
}
@SuppressWarnings("deprecation")
@Override
public FSDataOutputStream createNonRecursive(Path f, boolean overwrite,
int bufferSize, short replication, long blockSize, Progressable progress)

View File

@ -319,7 +319,6 @@ protected OutputStream createOutputStreamWithMode(Path f, boolean append,
}
@Override
@Deprecated
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
Progressable progress) throws IOException {

View File

@ -185,7 +185,6 @@ public FSDataOutputStream create(final Path f, final FsPermission permission,
}
@Override
@Deprecated
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
Progressable progress) throws IOException {

View File

@ -55,7 +55,6 @@ public class TestHarFileSystem {
* {@link HarFileSystem}. Either because there is a default implementation
* already available or because it is not relevant.
*/
@SuppressWarnings("deprecation")
private interface MustNotImplement {
public BlockLocation[] getFileBlockLocations(Path p, long start, long len);
public long getLength(Path f);

View File

@ -446,7 +446,6 @@ protected HdfsDataOutputStream primitiveCreate(Path f,
* Same as create(), except fails if parent directory doesn't already exist.
*/
@Override
@SuppressWarnings("deprecation")
public FSDataOutputStream createNonRecursive(final Path f,
final FsPermission permission, final EnumSet<CreateFlag> flag,
final int bufferSize, final short replication, final long blockSize,

View File

@ -1179,7 +1179,6 @@ public FSDataOutputStream create(final Path f, final FsPermission permission,
}
@Override
@SuppressWarnings("deprecation")
public FSDataOutputStream createNonRecursive(final Path f,
final FsPermission permission, final EnumSet<CreateFlag> flag,
final int bufferSize, final short replication, final long blockSize,

View File

@ -860,7 +860,6 @@ public static void testFileCreationNonRecursive(FileSystem fs) throws IOExceptio
// Attempts to create and close a file using FileSystem.createNonRecursive(),
// catching and returning an exception if one occurs or null
// if the operation is successful.
@SuppressWarnings("deprecation")
static IOException createNonRecursive(FileSystem fs, Path name,
int repl, EnumSet<CreateFlag> flag) throws IOException {
try {

View File

@ -1204,7 +1204,6 @@ public SelfRenewingLease acquireLease(Path path) throws AzureException {
}
@Override
@SuppressWarnings("deprecation")
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
boolean overwrite, int bufferSize, short replication, long blockSize,
Progressable progress) throws IOException {
@ -1279,7 +1278,6 @@ public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
}
@Override
@SuppressWarnings("deprecation")
public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize,
Progressable progress) throws IOException {
@ -1298,7 +1296,6 @@ public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,
}
@Override
@SuppressWarnings("deprecation")
public FSDataOutputStream createNonRecursive(Path f,
boolean overwrite, int bufferSize, short replication, long blockSize,
Progressable progress) throws IOException {

View File

@ -1332,7 +1332,6 @@ private boolean testModifiedTime(Path testPath, long time) throws Exception {
return (lastModified > (time - errorMargin) && lastModified < (time + errorMargin));
}
@SuppressWarnings("deprecation")
@Test
public void testCreateNonRecursive() throws Exception {
Path testFolder = new Path("/testFolder");