/** * Returns the singleton ContextFactory instance, constructing it if * necessary. <p/> * * When the instance is constructed, this method checks if the file * <code>hadoop-metrics.properties</code> exists on the class path. If it * exists, it must be in the format defined by java.util.Properties, and all * the properties in the file are set as attributes on the newly created * ContextFactory instance. * * @return the singleton ContextFactory instance */ public static synchronized ContextFactory getFactory() throws IOException { if (theFactory == null) { theFactory = new ContextFactory(); theFactory.setAttributes(PROPERTIES_FILE); // PROPERTIES_FILE_CUSTOM will overwrite properties set in PROPERTIES_FILE theFactory.setAttributes(PROPERTIES_FILE_CUSTOM); } return theFactory; }
/** * Returns the singleton ContextFactory instance, constructing it if * necessary. <p/> * * When the instance is constructed, this method checks if the file * <code>hadoop-metrics.properties</code> exists on the class path. If it * exists, it must be in the format defined by java.util.Properties, and all * the properties in the file are set as attributes on the newly created * ContextFactory instance. * * @return the singleton ContextFactory instance */ public static synchronized ContextFactory getFactory() throws IOException { if (theFactory == null) { theFactory = new ContextFactory(); theFactory.setAttributes(); } return theFactory; }
/** * Returns the singleton ContextFactory instance, constructing it if * necessary. <p/> * * When the instance is constructed, this method checks if the file * <code>hadoop-metrics.properties</code> exists on the class path. If it * exists, it must be in the format defined by java.util.Properties, and all * the properties in the file are set as attributes on the newly created * ContextFactory instance. * * @return the singleton ContextFactory instance */ public static synchronized ContextFactory getFactory() throws IOException { if (theFactory == null) { theFactory = new ContextFactory(); theFactory.setAttributes(); } return theFactory; }
/** * Returns the singleton ContextFactory instance, constructing it if * necessary. <p/> * * When the instance is constructed, this method checks if the file * <code>hadoop-metrics.properties</code> exists on the class path. If it * exists, it must be in the format defined by java.util.Properties, and all * the properties in the file are set as attributes on the newly created * ContextFactory instance. * * @return the singleton ContextFactory instance */ public static synchronized ContextFactory getFactory() throws IOException { if (theFactory == null) { theFactory = new ContextFactory(); theFactory.setAttributes(); } return theFactory; }
/** * Returns the singleton ContextFactory instance, constructing it if * necessary. <p/> * * When the instance is constructed, this method checks if the file * <code>hadoop-metrics.properties</code> exists on the class path. If it * exists, it must be in the format defined by java.util.Properties, and all * the properties in the file are set as attributes on the newly created * ContextFactory instance. * * @return the singleton ContextFactory instance */ public static synchronized ContextFactory getFactory() throws IOException { if (theFactory == null) { theFactory = new ContextFactory(); theFactory.setAttributes(); } return theFactory; }
/** * Returns the singleton ContextFactory instance, constructing it if * necessary. <p/> * * When the instance is constructed, this method checks if the file * <code>hadoop-metrics.properties</code> exists on the class path. If it * exists, it must be in the format defined by java.util.Properties, and all * the properties in the file are set as attributes on the newly created * ContextFactory instance. * * @return the singleton ContextFactory instance */ public static synchronized ContextFactory getFactory() throws IOException { if (theFactory == null) { theFactory = new ContextFactory(); theFactory.setAttributes(); } return theFactory; }