@@ -0,0 +1,1519 @@
+/** %0A * Project Name:%09%09jmetric %0A * Package Name:%09jmetric %0A * File Name:%09%09%09Main2.java %0A * Create Date:%09%092016%E5%B9%B48%E6%9C%889%E6%97%A5 %E4%B8%8B%E5%8D%883:27:51 %0A * Copyright (c) 2008-2016, %E5%B9%B3%E5%AE%89%E9%9B%86%E5%9B%A2-%E5%B9%B3%E5%AE%89%E4%B8%87%E9%87%8C%E9%80%9A All Rights Reserved.%0A */  %0Apackage com.guhanjie.jmetrics.test;%0A%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.PrintStream;%0A%0Aimport org.apache.commons.configuration.Configuration;%0Aimport org.apache.commons.configuration.ConfigurationException;%0Aimport org.apache.commons.configuration.PropertiesConfiguration;%0A%0A/**%0A * Class Name:%09%09Main2%3Cbr/%3E%0A * Description:%09%09%5Bdescription%5D%0A * @time%09%09%09%092016%E5%B9%B48%E6%9C%889%E6%97%A5 %E4%B8%8B%E5%8D%883:27:51%0A * @author%09%09%09GUHANJIE%0A * @version%09%09%091.0.0 %0A * @since %09%09%09JDK 1.7 %0A */%0Apublic class Main2 %7B%0A%09/**%0A%09 * Method Name:%09main%3Cbr/%3E%0A%09 * Description:%09%09%09%5Bdescription%5D%0A%09 * @author%09%09%09%09GUHANJIE%0A%09 * @time%09%09%09%09%092016%E5%B9%B48%E6%9C%889%E6%97%A5 %E4%B8%8B%E5%8D%883:27:51%0A%09 * @param args %0A%09 * @throws ConfigurationException %0A%09 */%0A%09public static void main(String%5B%5D args) throws ConfigurationException %7B%0A%09%09PropertiesConfiguration c = new PropertiesConfiguration(%22hadoop-metrics2-test.properties%22);%0A%09%09Configuration subC = c.subset(%22test%22);%0A%09%09System.out.println(toString(c));%0A%09%09System.out.println(%22==========================%22);%0A%09%09System.out.println(toString(subC));%0A%09%7D%0A%09%0A%09static String toString(Configuration c) %7B%0A%09    ByteArrayOutputStream buffer = new ByteArrayOutputStream();%0A%09    PrintStream ps = new PrintStream(buffer);%0A%09    PropertiesConfiguration tmp = new PropertiesConfiguration();%0A%09    tmp.copy(c);%0A%09    try %7B tmp.save(ps); %7D%0A%09    catch (Exception e) %7B%0A%09    %7D%0A%09    return buffer.toString();%0A%09  %7D%0A%7D%0A

Revert "update"