jacobstanley / hadoop-tools

Tools for working with Hadoop, written with performance in mind.
Other
37 stars 15 forks source link

Can't move file in to an existing directory using shorthand #5

Closed jacobstanley closed 10 years ago

jacobstanley commented 10 years ago

hh does not handle moving a file in to an existing directory.

$ hh mv src-file dst-dir/
java.io.IOException
Source /user/guest/src-file and destination /user/guest/dst-dir/ must both be directories
    at org.apache.hadoop.hdfs.server.namenode.FSDirectory.unprotectedRenameTo(FSDirectory.java:693)
    at org.apache.hadoop.hdfs.server.namenode.FSDirectory.renameTo(FSDirectory.java:492)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.renameToInternal(FSNamesystem.java:2846)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.renameTo(FSNamesystem.java:2817)
    at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.rename2(NameNodeRpcServer.java:632)
    at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.rename2(ClientNamenodeProtocolServerSideTranslatorPB.java:396)
    at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java:44966)
    at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:453)
    at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1002)
    at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1752)
    at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1748)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:396)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1438)
    at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1746)