我正在尝试附加到HDFS文件。当我这样做时,我收到错误:
2017-06-14 14:51:10,068 INFO [net.psgglobal.hdfs.videovault.videostorage.VideoDatedFile] (VideoDatedCacheWriter) Error appending image bytes 2568018 index bytes 360: Failed to APPEND_FILE /PSG/VideoVault/VideoStorage/VICADS-0/108/20170614.img for DFSClient_NONMAPREDUCE_330993248_1145 on 192.168.3.214 because DFSClient_NONMAPREDUCE_330993248_1145 is already the current lease holder.
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.recoverLeaseInternal(FSNamesystem.java:3108)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.appendFileInternal(FSNamesystem.java:2904)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.appendFileInt(FSNamesystem.java:3211)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.appendFile(FSNamesystem.java:3180)
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.append(NameNodeRpcServer.java:766)
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.append(ClientNamenodeProtocolServerSideTranslatorPB.java:432)
at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:640)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2351)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2347)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1866)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2345)
由于我是租赁持有人,问题是什么?我该如何发布租约? 大卫
答案 0 :(得分:0)
您可以按以下方式释放文件的租约:
hdfs debug recoverLease -path <path-of-the-file> [-retries <retry-times>]