HADOOP-14384. Reduce the visibility of FileSystem.newFSDataOutputStreamBuilder before the API becomes stable. (lei)
This commit is contained in:
parent
543aac9f28
commit
149b903be3
|
@ -18,6 +18,8 @@
|
||||||
package org.apache.hadoop.fs;
|
package org.apache.hadoop.fs;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
|
import org.apache.hadoop.classification.InterfaceAudience;
|
||||||
|
import org.apache.hadoop.classification.InterfaceStability;
|
||||||
import org.apache.hadoop.fs.Options.ChecksumOpt;
|
import org.apache.hadoop.fs.Options.ChecksumOpt;
|
||||||
import org.apache.hadoop.fs.permission.FsPermission;
|
import org.apache.hadoop.fs.permission.FsPermission;
|
||||||
import org.apache.hadoop.util.Progressable;
|
import org.apache.hadoop.util.Progressable;
|
||||||
|
@ -29,7 +31,9 @@ import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.IO_FILE_BUFFER_
|
||||||
import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.IO_FILE_BUFFER_SIZE_KEY;
|
import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.IO_FILE_BUFFER_SIZE_KEY;
|
||||||
|
|
||||||
/** Base of specific file system FSDataOutputStreamBuilder. */
|
/** Base of specific file system FSDataOutputStreamBuilder. */
|
||||||
public class FSDataOutputStreamBuilder{
|
@InterfaceAudience.Private
|
||||||
|
@InterfaceStability.Unstable
|
||||||
|
public class FSDataOutputStreamBuilder {
|
||||||
private Path path = null;
|
private Path path = null;
|
||||||
private FsPermission permission = null;
|
private FsPermission permission = null;
|
||||||
private Integer bufferSize;
|
private Integer bufferSize;
|
||||||
|
@ -41,7 +45,7 @@ public class FSDataOutputStreamBuilder{
|
||||||
|
|
||||||
private final FileSystem fs;
|
private final FileSystem fs;
|
||||||
|
|
||||||
public FSDataOutputStreamBuilder(FileSystem fileSystem, Path p) {
|
protected FSDataOutputStreamBuilder(FileSystem fileSystem, Path p) {
|
||||||
fs = fileSystem;
|
fs = fileSystem;
|
||||||
path = p;
|
path = p;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4144,8 +4144,12 @@ public abstract class FileSystem extends Configured implements Closeable {
|
||||||
* Create a new FSDataOutputStreamBuilder for the file with path.
|
* Create a new FSDataOutputStreamBuilder for the file with path.
|
||||||
* @param path file path
|
* @param path file path
|
||||||
* @return a FSDataOutputStreamBuilder object to build the file
|
* @return a FSDataOutputStreamBuilder object to build the file
|
||||||
|
*
|
||||||
|
* HADOOP-14384. Temporarily reduce the visibility of method before the
|
||||||
|
* builder interface becomes stable.
|
||||||
*/
|
*/
|
||||||
public FSDataOutputStreamBuilder newFSDataOutputStreamBuilder(Path path) {
|
@InterfaceAudience.Private
|
||||||
|
protected FSDataOutputStreamBuilder newFSDataOutputStreamBuilder(Path path) {
|
||||||
return new FSDataOutputStreamBuilder(this, path);
|
return new FSDataOutputStreamBuilder(this, path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -667,7 +667,7 @@ public class FilterFileSystem extends FileSystem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FSDataOutputStreamBuilder newFSDataOutputStreamBuilder(Path path) {
|
protected FSDataOutputStreamBuilder newFSDataOutputStreamBuilder(Path path) {
|
||||||
return fs.newFSDataOutputStreamBuilder(path);
|
return fs.newFSDataOutputStreamBuilder(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue