[ 
https://issues.apache.org/jira/browse/HDFS-4647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13616970#comment-13616970
 ] 

Arpit Agarwal commented on HDFS-4647:
-------------------------------------

Correct, this is during the rename step of the put.

The precondition failure is during the call to replaceRemovedChild4Reference 
from createReferences4Rename.

{code}
  private static void createReferences4Rename(final INode srcChild,
      final byte[] srcChildName, final INodeDirectoryWithSnapshot srcParent,
      final INodeDirectory dstParent) {
    final INodeReference.WithCount ref;
    if (srcChild.isReference()) {
      ref = (INodeReference.WithCount)srcChild.asReference().getReferredINode();
    } else {
      ref = dstParent.asDirectory().replaceChild4Reference(srcChild);
    }
    srcParent.replaceRemovedChild4Reference(srcChild, ref, srcChildName);
  }
{code}
                
> llegalStateException in put with nested snapshottable directories
> -----------------------------------------------------------------
>
>                 Key: HDFS-4647
>                 URL: https://issues.apache.org/jira/browse/HDFS-4647
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>    Affects Versions: Snapshot (HDFS-2802)
>            Reporter: Arpit Agarwal
>             Fix For: Snapshot (HDFS-2802)
>
>
> To repro:
> hadoop fs -mkdir -p /1/2/3
> hdfs dfsadmin -allowSnapsot /1
> hdfs dfsadmin -allowSnapsot /2
> hadoop fs -createSnapshot /1 snap1
> hadoop fs -put f1 /1/2/3
> Final command throws:
> put: java.lang.IllegalStateException

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to