Review Board 1.7.22


Allow configuration changes without restarting configured nodes

Review Request #21 - Created Nov. 1, 2010 and updated

Patrick Kling
HADOOP-7001
Reviewers
hadoop-common
hadoop-common
Allow configuration changes without restarting configured nodes
Manual testing with Reconfigurable NameNode from https://issues.apache.org/jira/browse/HDFS-1477

TestReconfiguration unit tests
http://svn.apache.org/repos/asf/hadoop/common/trunk/src/java/org/apache/hadoop/conf/Configuration.java
Revision 1026174 New Change
[20] 585 lines
[+20] [+] public void set(String name, String value) {
586
      }
586
      }
587
    }
587
    }
588
  }
588
  }
589
  
589
  
590
  /**
590
  /**

    
   
591
   * Unset a previously set property.

    
   
592
   */

    
   
593
  public synchronized void unset(String name) {

    
   
594
    name = handleDeprecation(name);

    
   
595

   

    
   
596
    getOverlay().remove(name);

    
   
597
    getProps().remove(name);

    
   
598
  }

    
   
599

   

    
   
600
  /**
591
   * Sets a property if it is currently unset.
601
   * Sets a property if it is currently unset.
592
   * @param name the property name
602
   * @param name the property name
593
   * @param value the new value
603
   * @param value the new value
594
   */
604
   */
595
  public void setIfUnset(String name, String value) {
605
  public synchronized void setIfUnset(String name, String value) {
596
    if (get(name) == null) {
606
    if (get(name) == null) {
597
      set(name, value);
607
      set(name, value);
598
    }
608
    }
599
  }
609
  }
600
  
610
  
[+20] [20] 1168 lines
http://svn.apache.org/repos/asf/hadoop/common/trunk/src/java/org/apache/hadoop/conf/Reconfigurable.java
New File
 
http://svn.apache.org/repos/asf/hadoop/common/trunk/src/java/org/apache/hadoop/conf/ReconfigurableBase.java
New File
 
http://svn.apache.org/repos/asf/hadoop/common/trunk/src/java/org/apache/hadoop/conf/ReconfigurationException.java
New File
 
http://svn.apache.org/repos/asf/hadoop/common/trunk/src/java/org/apache/hadoop/conf/ReconfigurationServlet.java
New File
 
http://svn.apache.org/repos/asf/hadoop/common/trunk/src/java/org/apache/hadoop/conf/ReconfigurationUtil.java
New File
 
http://svn.apache.org/repos/asf/hadoop/common/trunk/src/test/core/org/apache/hadoop/conf/TestReconfiguration.java
New File
 
  1. http://svn.apache.org/repos/asf/hadoop/common/trunk/src/java/org/apache/hadoop/conf/Configuration.java: Loading...
  2. http://svn.apache.org/repos/asf/hadoop/common/trunk/src/java/org/apache/hadoop/conf/Reconfigurable.java: Loading...
  3. http://svn.apache.org/repos/asf/hadoop/common/trunk/src/java/org/apache/hadoop/conf/ReconfigurableBase.java: Loading...
  4. http://svn.apache.org/repos/asf/hadoop/common/trunk/src/java/org/apache/hadoop/conf/ReconfigurationException.java: Loading...
  5. http://svn.apache.org/repos/asf/hadoop/common/trunk/src/java/org/apache/hadoop/conf/ReconfigurationServlet.java: Loading...
  6. http://svn.apache.org/repos/asf/hadoop/common/trunk/src/java/org/apache/hadoop/conf/ReconfigurationUtil.java: Loading...
  7. http://svn.apache.org/repos/asf/hadoop/common/trunk/src/test/core/org/apache/hadoop/conf/TestReconfiguration.java: Loading...