From c2aa8106850eaa81afb65b916cc6da874a2c03e4 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Thu, 30 Jul 2009 12:35:27 -0700 Subject: [PATCH] Hadoop: No good reason to overwrite these copy/move functions that I can see --- src/client/hadoop/ceph/CephFileSystem.java | 33 ---------------------- 1 file changed, 33 deletions(-) diff --git a/src/client/hadoop/ceph/CephFileSystem.java b/src/client/hadoop/ceph/CephFileSystem.java index 6bbdaa0b61ea6..05ab661245bfd 100644 --- a/src/client/hadoop/ceph/CephFileSystem.java +++ b/src/client/hadoop/ceph/CephFileSystem.java @@ -548,39 +548,6 @@ public class CephFileSystem extends FileSystem { //return getConf().getLong("fs.ceph.block.size", DEFAULT_BLOCK_SIZE); } - @Override - public void moveFromLocalFile(Path src, Path dst) throws IOException { - debug("moveFromLocalFile:enter with src " + src + " and dest " + dst); - copyFromLocalFile(src, dst); - File f = new File (src.toString()); - if (!f.delete()) throw new IOException("Delete failed"); - debug("moveFromLocalFile:exit"); - } - - @Override - public void copyFromLocalFile(Path src, Path dst) throws IOException { - debug("copyFromLocalFile:enter with src " + src + " and dest " + dst); - // make sure Ceph path exists - Path abs_src = makeAbsolute(src); - Path abs_dst = makeAbsolute(dst); - - if (isDirectory(abs_dst)) - throw new IOException("Error in copyFromLocalFile: " + - "attempting to open an existing directory as a file"); - Path abs_dst_parent = abs_dst.getParent(); - - if (!exists(abs_dst_parent)) - mkdirs(abs_dst_parent); - - debug("calling ceph_copyFromLocalFile from java"); - if (!ceph_copyFromLocalFile(abs_src.toString(), abs_dst.toString())) { - throw new IOException("org.apache.hadoop.fs.ceph.CephFileSystem.copyFromLocalFile: failed copying from local file " + abs_src.toString() + " to Ceph file " + abs_dst.toString()); - } - debug("returned from ceph_copyFromLocalFile to java, success!"); - } - - - public void copyToLocalFile(Path ceph_src, Path local_dst, boolean copyCrc) throws IOException { debug("copyToLocalFile:enter with src " + ceph_src + " and dest " + local_dst + "and crc " + copyCrc); -- 2.39.5