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

Yiqun Lin commented on HDFS-11696:
----------------------------------

Hi [~andrew.wang], could you please explain more info of the above problem?  
The option {{-nonInteractive}} and {{-force}} is used under the option 
{{-format}}, so I did a simple checking for the format state in following codes:
{code}
     public void setForceFormat(boolean force) {
+      Preconditions.checkState(this == FORMAT);
       isForceFormat = force;
     }
     
@@ -234,6 +238,7 @@ public boolean getInteractiveFormat() {
     }
     
     public void setInteractiveFormat(boolean interactive) {
+      Preconditions.checkState(this == FORMAT);
       isInteractiveFormat = interactive;
     }
{code}
>From my understanding on this, this change will still make current options run 
>okay, right?
Is there some corner cases that I am missing? Please let me know if I am not 
correct. Thanks,


> Fix warnings from Spotbugs in hadoop-hdfs
> -----------------------------------------
>
>                 Key: HDFS-11696
>                 URL: https://issues.apache.org/jira/browse/HDFS-11696
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 3.0.0-alpha4
>            Reporter: Yiqun Lin
>            Assignee: Yiqun Lin
>         Attachments: findbugsHtml.html, HADOOP-14337.001.patch, 
> HADOOP-14337.002.patch, HADOOP-14337.003.patch, HDFS-11696.004.patch, 
> HDFS-11696.005.patch, HDFS-11696.006.patch, HDFS-11696.007.patch
>
>
> There are totally 12 findbugs issues generated after switching from Findbugs 
> to Spotbugs across the project in HADOOP-14316. This JIRA focus on cleaning 
> up the part of warnings under scope of HDFS(mainly contained in hadoop-hdfs 
> and hadoop-hdfs-client).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to