You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Hemanth Yamijala (JIRA)" <ji...@apache.org> on 2009/09/01 13:38:32 UTC

[jira] Commented: (HADOOP-6227) Configuration does not lock parameters marked final if they have no value.

    [ https://issues.apache.org/jira/browse/HADOOP-6227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749866#action_12749866 ] 

Hemanth Yamijala commented on HADOOP-6227:
------------------------------------------

The code in configuration looks like this:

{code}
        // Ignore this parameter if it has already been marked as 'final'
        if (attr != null && value != null) {
          if (!finalParameters.contains(attr)) {
            properties.setProperty(attr, value);
            if (storeResource) {
              updatingResource.put(attr, name.toString());
            }
            if (finalParameter)
              finalParameters.add(attr);
          } else {
            LOG.warn(name+":a attempt to override final parameter: "+attr
                     +";  Ignoring.");
          }
        }
{code}

While the check for value being null is required before adding the property to the 'properties' instance, adding it to finalParameters or for that matter even updatingResource shouldn't be an issue even if the value is null. This would certainly fix the current issue. Thoughts ?

> Configuration does not lock parameters marked final if they have no value.
> --------------------------------------------------------------------------
>
>                 Key: HADOOP-6227
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6227
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: conf
>            Reporter: Hemanth Yamijala
>
> A use-case: Recently, we stumbled on a bug that wanted us to disable the feature to run a debug script in map/reduce on tasks that fail, specified by mapred.{map|reduce}.task.debug.script. The best way of disabling it seemed to be to set it with no value in the cluster configuration and mark it final. This did not work, however, because the code in configuration explicitly checks if the value is not null before adding it to the list of final parameters.
> Without an ability to do this, there might be a need to explicitly have a special way of disabling optional features.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.