[ 
https://issues.apache.org/jira/browse/HDFS-16381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

May updated HDFS-16381:
-----------------------
    Description: 
We have a file  {{/usr/root/myfile}} in a HDFS cluster with two NNs and three 
DNs.

1. client requests to truncate the file: {{bin/hdfs dfs -truncate -w 23 
/usr/root/myfile}};
2. current active NN crashes before writing 
{{nndir/current/edits_inprogress_0000000000000000028}}
3. client receives the error message:

{code:java}
Failed to TRUNCATE_FILE /usr/root/myfile for DFSClient_NONMAPREDUCE_955729475_1 
on * because DFSClient_NONMAPREDUCE_955729475_1 is already the current lease 
holder.
{code}

4. we check the content of the file {{bin/hdfs dfs -cat /usr/root/myfile}}, it 
has been truncated.
5. client request to append to the file {{/usr/root/myfile}}, the append 
operation fails due to:

{code:java}
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException):
 Failed to APPEND_FILE /usr/root/myfile for DFSClient_NONMAPREDUCE_738467545_1 
on * because this file lease is currently owned by 
DFSClient_NONMAPREDUCE_955729475_1 on *
{code}



  was:We have a file in HDFS {/usr/root/fav1}


> Unexpected crashes on the NN cause lease related errors
> -------------------------------------------------------
>
>                 Key: HDFS-16381
>                 URL: https://issues.apache.org/jira/browse/HDFS-16381
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 3.3.1
>            Reporter: May
>            Priority: Major
>
> We have a file  {{/usr/root/myfile}} in a HDFS cluster with two NNs and three 
> DNs.
> 1. client requests to truncate the file: {{bin/hdfs dfs -truncate -w 23 
> /usr/root/myfile}};
> 2. current active NN crashes before writing 
> {{nndir/current/edits_inprogress_0000000000000000028}}
> 3. client receives the error message:
> {code:java}
> Failed to TRUNCATE_FILE /usr/root/myfile for 
> DFSClient_NONMAPREDUCE_955729475_1 on * because 
> DFSClient_NONMAPREDUCE_955729475_1 is already the current lease holder.
> {code}
> 4. we check the content of the file {{bin/hdfs dfs -cat /usr/root/myfile}}, 
> it has been truncated.
> 5. client request to append to the file {{/usr/root/myfile}}, the append 
> operation fails due to:
> {code:java}
> org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.hdfs.protocol.AlreadyBeingCreatedException):
>  Failed to APPEND_FILE /usr/root/myfile for 
> DFSClient_NONMAPREDUCE_738467545_1 on * because this file lease is currently 
> owned by DFSClient_NONMAPREDUCE_955729475_1 on *
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to