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

Hadoop QA commented on HDFS-7726:
---------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12696023/check_config_val_EditLogTailer.patch.1
  against trunk revision 8acc5e9.

    {color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
                        Please justify why no new tests are needed for this 
patch.
                        Also please list what manual steps were performed to 
verify this patch.

    {color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

    {color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

    {color:green}+1 eclipse:eclipse{color}.  The patch built with 
eclipse:eclipse.

    {color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

    {color:red}-1 core tests{color}.  The patch failed these unit tests in 
hadoop-hdfs-project/hadoop-hdfs:

                  
org.apache.hadoop.hdfs.server.namenode.ha.TestHAStateTransitions

Test results: 
https://builds.apache.org/job/PreCommit-HDFS-Build/9401//testReport/
Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9401//console

This message is automatically generated.

> Parse and check the configuration settings of edit log to prevent runtime 
> errors
> --------------------------------------------------------------------------------
>
>                 Key: HDFS-7726
>                 URL: https://issues.apache.org/jira/browse/HDFS-7726
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 2.6.0
>            Reporter: Tianyin Xu
>            Priority: Minor
>         Attachments: check_config_val_EditLogTailer.patch.1
>
>
> ============================
> Problem
> -------------------------------------------------
> Similar as the following two issues addressed in 2.7.0,
> https://issues.apache.org/jira/browse/YARN-2165
> https://issues.apache.org/jira/browse/YARN-2166
> The edit log related configuration settings should be checked in the 
> constructor rather than being applied directly at runtime. This would cause 
> runtime failures if the values are wrong.
> Take "dfs.ha.tail-edits.period" as an example, currently in 
> EditLogTailer.java, its value is not checked but directly used in doWork(), 
> as the following code snippets. Any negative values would cause 
> IllegalArgumentException (which is not caught) and impair the component. 
> {code:title=EditLogTailer.java|borderStyle=solid}
> private void doWork() {
> {
>     .....
>     Thread.sleep(sleepTimeMs);
>     ....
> }
> {code}
> Another example is "dfs.ha.log-roll.rpc.timeout". Right now, we use getInt() 
> to parse the value at runtime in the getActiveNodeProxy() function which is 
> called by doWork(), shown as below. Any erroneous settings (e.g., 
> ill-formatted integer) would cause exceptions.
> {code:title=EditLogTailer.java|borderStyle=solid}
> private NamenodeProtocol getActiveNodeProxy() throws IOException {
> {
>     .....
>     int rpcTimeout = conf.getInt(
>           DFSConfigKeys.DFS_HA_LOGROLL_RPC_TIMEOUT_KEY,
>           DFSConfigKeys.DFS_HA_LOGROLL_RPC_TIMEOUT_DEFAULT);
>     ....
> }
> {code}
> ============================
> Solution (the attached patch)
> -------------------------------------------------
> Basically, the idea of the attached patch is to move the parsing and checking 
> logics into the constructor to expose the error at initialization, so that 
> the errors won't be latent at the runtime (same as YARN-2165 and YARN-2166)
> I'm not aware of the implementation of 2.7.0. It seems there's checking 
> utilities such as the validatePositiveNonZero function in YARN-2165. If so, 
> we can use that one to make the checking more systematic.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to