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

Jing Zhao commented on HADOOP-8567:
-----------------------------------

Thanks for the review Suresh! 
{noformat}
@@ -68,6 +70,7 @@ import org.apache.hadoop.util.ReflectionUtils;
 +410,8 @@ public class Configuration implements 
Iterable<Map.Entry<String,String>>,
      if (other.overlay!=null) {
        this.overlay = (Properties)other.overlay.clone();
      }
+
+     this.updatingResource = new HashMap<String, 
String>(other.updatingResource);
    }
{noformat}
This has been addressed in the 002 patch.

{noformat}
@@ -604,6 +593,7 @@ public class Configuration implements 
Iterable<Map.Entry<String,String>>,
     if (!isDeprecated(name)) {
       getOverlay().setProperty(name, value);
       getProps().setProperty(name, value);
+      updatingResource.put(name, UNKNOWN_RESOURCE);
     }
     else {
       DeprecatedKeyInfo keyInfo = deprecatedKeyMap.get(name);
{noformat}
For this, I think I should add "updatingResource.put(name, UNKNOWN_RESOURCE);" 
to Configuration#set(). Will address that in the new patch.

{noformat}
@@ -1438,9 +1426,7 @@ public class Configuration implements 
Iterable<Map.Entry<String,String>>,
       if (finalParameters.contains(oldKey)) {
         finalParameters.remove(oldKey);
       }
-      if (storeResource) {
-        updatingResource.remove(oldKey);
-      }
+      updatingResource.remove(oldKey);
     }
   }
{noformat}
For this part, I did not find similar code (should be some code corresponding 
to remove) in both branch-1 and current trunk.

{noformat}
@@ -1464,9 +1450,7 @@ public class Configuration implements 
Iterable<Map.Entry<String,String>>,
         continue;
       }
       properties.setProperty(key, value);
-      if (storeResource) {
-        updatingResource.put(key, updatingResource.get(attr));
-      }
+      updatingResource.put(key, updatingResource.get(attr));
       if (finalParameter) {
         finalParameters.add(key);
       }
{noformat}
The similar change happened in Configuration#loadResource in 002 patch.

                
> Backport conf servlet with dump running configuration to branch 1.x
> -------------------------------------------------------------------
>
>                 Key: HADOOP-8567
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8567
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: conf
>    Affects Versions: 1.0.0
>            Reporter: Junping Du
>            Assignee: Jing Zhao
>         Attachments: Hadoop.8567.branch-1.001.patch, 
> Hadoop.8567.branch-1.002.patch
>
>
> HADOOP-6408 provide conf servlet that can dump running configuration which 
> great helps admin to trouble shooting the configuration issue. However, that 
> patch works on branch after 0.21 only and should be backport to branch 1.x.

--
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