diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/ClientNamenodeProtocolServerSideTranslatorPB.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/ClientNamenodeProtocolServerSideTranslatorPB.java index 904a6c7ec93..988ef53809c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/ClientNamenodeProtocolServerSideTranslatorPB.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocolPB/ClientNamenodeProtocolServerSideTranslatorPB.java @@ -663,7 +663,7 @@ public class ClientNamenodeProtocolServerSideTranslatorPB implements ArrayList optionList = new ArrayList(); if(req.getOverwriteDest()) { optionList.add(Rename.OVERWRITE); - } else if(req.hasMoveToTrash()) { + } else if(req.hasMoveToTrash() && req.getMoveToTrash()) { optionList.add(Rename.TO_TRASH); }