hadoop: track Hadoop API changes

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
This commit is contained in:
Colin Patrick McCabe 2011-05-27 14:46:19 -07:00
parent 4ddf8df804
commit 7e1de380eb
3 changed files with 9 additions and 10 deletions

View File

@ -209,13 +209,13 @@ abstract class CephFS {
abstract protected int ceph_statfs(String path, CephFileSystem.CephStat fill);
/*
* Check how many times a path should be replicated (if it is
* degraded it may not actually be replicated this often).
* Check how many times a file should be replicated. If it is,
* degraded it may not actually be replicated this often.
* Inputs:
* String path: The path to check.
* int fh: a file descriptor
* Returns: an int containing the number of times replicated.
*/
abstract protected int ceph_replication(String path);
abstract protected int ceph_replication(int fh);
/*
* Find the IP address of the primary OSD for a given file and offset.

View File

@ -535,7 +535,7 @@ public class CephFileSystem extends FileSystem {
*/
public FSDataOutputStream create(Path path,
FsPermission permission,
EnumSet<CreateFlag> flag,
boolean overwrite,
// boolean overwrite,
int bufferSize,
short replication,
@ -554,8 +554,8 @@ public class CephFileSystem extends FileSystem {
}
// We ignore replication since that's not configurable here, and
// progress reporting is quite limited.
// Required semantics: if the file exists, overwrite if CreateFlag.OVERWRITE;
// throw an exception if !CreateFlag.OVERWRITE.
// Required semantics: if the file exists, overwrite if 'overwrite' is set;
// otherwise, throw an exception
// Step 1: existence test
boolean exists = exists(abs_path);
@ -566,8 +566,7 @@ public class CephFileSystem extends FileSystem {
"create: Cannot overwrite existing directory \"" + path.toString()
+ "\" with a file");
}
// if (!overwrite)
if (!flag.contains(CreateFlag.OVERWRITE)) {
if (!overwrite) {
throw new IOException(
"createRaw: Cannot open existing file \"" + abs_path.toString()
+ "\" for writing without overwrite flag");

View File

@ -25,8 +25,8 @@ package org.apache.hadoop.fs.ceph;
import java.io.IOException;
import java.net.URI;
import org.apache.hadoop.fs.FileSystemContractBaseTest;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystemContractBaseTest;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;