|
@@ -1275,18 +1275,43 @@ public abstract class FileSystem extends Configured implements Closeable {
|
|
|
return getFileStatus(f).getBlockSize();
|
|
|
}
|
|
|
|
|
|
- /** Return the number of bytes that large input files should be optimally
|
|
|
- * be split into to minimize i/o time. */
|
|
|
+ /**
|
|
|
+ * Return the number of bytes that large input files should be optimally
|
|
|
+ * be split into to minimize i/o time.
|
|
|
+ * @deprecated use {@link #getDefaultBlockSize(Path)} instead
|
|
|
+ */
|
|
|
+ @Deprecated
|
|
|
public long getDefaultBlockSize() {
|
|
|
// default to 32MB: large enough to minimize the impact of seeks
|
|
|
return getConf().getLong("fs.local.block.size", 32 * 1024 * 1024);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Return the number of bytes that large input files should be optimally
|
|
|
+ * be split into to minimize i/o time.
|
|
|
+ * @param f path of file
|
|
|
+ * @return the default block size for the path's filesystem
|
|
|
+ */
|
|
|
+ public long getDefaultBlockSize(Path f) {
|
|
|
+ return getDefaultBlockSize();
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* Get the default replication.
|
|
|
+ * @deprecated use {@link #getDefaultReplication(Path)} instead
|
|
|
*/
|
|
|
+ @Deprecated
|
|
|
public short getDefaultReplication() { return 1; }
|
|
|
|
|
|
+ /**
|
|
|
+ * Get the default replication.
|
|
|
+ * @param path of the file
|
|
|
+ * @return default replication for the path's filesystem
|
|
|
+ */
|
|
|
+ public short getDefaultReplication(Path path) {
|
|
|
+ return getDefaultReplication();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* Return a file status object that represents the path.
|
|
|
* @param f The path we want information from
|