import junit.framework.TestCase;
public class HDFSUsagePluginTest extends TestCase {
public void testGetMetrics() throws Throwable {
HDFSUsagePlugin plugin = new HDFSUsagePlugin();
plugin.init(new String[0]);
ChukwaMetricsList<HDFSUsageMetrics> list = plugin.getMetrics();
System.out.println(list.getTimestamp());
for (ChukwaMetrics metrics : list.getMetricsList()) {
HDFSUsageMetrics usage = (HDFSUsageMetrics) metrics;
System.out.print(usage.getName());
System.out.println("size: " + usage.getSize());