mirror of
https://github.com/ceph/ceph
synced 2025-02-19 17:08:05 +00:00
Hadoop: What's with all these unused variables?
This commit is contained in:
parent
bca0fbac2d
commit
a7756e3b7f
@ -49,15 +49,12 @@ public class CephFileSystem extends FileSystem {
|
||||
private static final long DEFAULT_BLOCK_SIZE = 4 * 1024 * 1024;
|
||||
private static final int EEXIST = 17;
|
||||
|
||||
|
||||
private URI uri;
|
||||
|
||||
private FileSystem localFs;
|
||||
private Path root;
|
||||
private Path parent;
|
||||
private boolean initialized = false;
|
||||
|
||||
private static boolean debug;
|
||||
private static boolean debug = false;
|
||||
private static String cephDebugLevel;
|
||||
private static String monAddr;
|
||||
private static String fs_default_name;
|
||||
@ -93,7 +90,6 @@ public class CephFileSystem extends FileSystem {
|
||||
public CephFileSystem() {
|
||||
debug("CephFileSystem:enter");
|
||||
root = new Path("/");
|
||||
parent = new Path("..");
|
||||
debug("CephFileSystem:exit");
|
||||
}
|
||||
|
||||
@ -126,9 +122,6 @@ public class CephFileSystem extends FileSystem {
|
||||
setConf(conf);
|
||||
this.uri = URI.create(uri.getScheme() + "://" + uri.getAuthority());
|
||||
|
||||
// TODO: local filesystem? we really need to figure out this conf thingy
|
||||
this.localFs = get(URI.create("file:///"), conf);
|
||||
|
||||
fs_default_name = conf.get("fs.default.name");
|
||||
monAddr = conf.get("fs.ceph.monAddr");
|
||||
cephDebugLevel = conf.get("fs.ceph.debugLevel");
|
||||
|
@ -24,8 +24,6 @@ class CephInputStream extends FSInputStream {
|
||||
|
||||
private int bufferSize;
|
||||
|
||||
//private Block[] blocks;
|
||||
|
||||
private boolean closed;
|
||||
|
||||
private int fileHandle;
|
||||
@ -59,6 +57,8 @@ class CephInputStream extends FSInputStream {
|
||||
// call and providing the file handle.
|
||||
fileLength = flength;
|
||||
fileHandle = fh;
|
||||
closed = false;
|
||||
debug = ("true".equals(conf.get("fs.ceph.debug")));
|
||||
debug("CephInputStream constructor: initializing stream with fh "
|
||||
+ fh + " and file length " + flength);
|
||||
|
||||
|
@ -19,35 +19,12 @@ class CephOutputStream extends OutputStream {
|
||||
|
||||
private int bufferSize;
|
||||
|
||||
private long fileLength;
|
||||
|
||||
//private FileSystemStore store;
|
||||
|
||||
private Path path;
|
||||
|
||||
private long blockSize;
|
||||
|
||||
private File backupFile;
|
||||
|
||||
private OutputStream backupStream;
|
||||
|
||||
private Random r = new Random();
|
||||
|
||||
private boolean closed;
|
||||
|
||||
private int fileHandle;
|
||||
|
||||
private int bytesWrittenToBlock = 0;
|
||||
|
||||
private byte[] outBuf;
|
||||
|
||||
private static boolean debug = false;
|
||||
|
||||
//private List<Block> blocks = new ArrayList<Block>();
|
||||
|
||||
//private Block nextBlock;
|
||||
|
||||
|
||||
|
||||
private native long ceph_seek_from_start(int fh, long pos);
|
||||
private native long ceph_getpos(int fh);
|
||||
@ -64,8 +41,8 @@ class CephOutputStream extends OutputStream {
|
||||
System.load(conf.get("fs.ceph.libDir")+"/libhadoopcephfs.so");
|
||||
System.load(conf.get("fs.ceph.libDir")+"/libceph.so");
|
||||
fileHandle = fh;
|
||||
//fileLength = flength;
|
||||
closed = false;
|
||||
debug = ("true".equals(conf.get("fs.ceph.debug")));
|
||||
}
|
||||
|
||||
//Ceph likes things to be closed before it shuts down,
|
||||
@ -191,8 +168,4 @@ class CephOutputStream extends OutputStream {
|
||||
private void debug(String out) {
|
||||
if (debug) System.out.println(out);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user