/** * Creates a new instance which clones all configurations from another {@link CConfiguration}. */ public static CConfiguration copy(CConfiguration other) { return new CConfiguration(other); } }
/** * Creates a new instance which clones all configurations from another {@link CConfiguration}. */ public static CConfiguration copy(CConfiguration other) { return new CConfiguration(other); } }
/** * Creates an instance of configuration. * @param resource the resource to be added to the configuration * @return an instance of CConfiguration */ public static CConfiguration create(InputStream resource) { CConfiguration conf = new CConfiguration(); conf.addResource(resource); return conf; }
/** * Creates an instance of configuration. * @param resource the resource to be added to the configuration * @return an instance of CConfiguration */ public static CConfiguration create(InputStream resource) { CConfiguration conf = new CConfiguration(); conf.addResource(resource); return conf; }
/** * Creates an instance of configuration. * @param file the file to be added to the configuration * @param moreFiles the list of more files to be added to the configuration * @return an instance of CConfiguration * @throws MalformedURLException if the error occurred while constructing the URL */ public static CConfiguration create(File file, File...moreFiles) throws MalformedURLException { CConfiguration conf = new CConfiguration(); conf.addResource(file.toURI().toURL()); for (File anotherFile : moreFiles) { conf.addResource(anotherFile.toURI().toURL()); } return conf; }
/** * Creates an instance of configuration. * @param file the file to be added to the configuration * @param moreFiles the list of more files to be added to the configuration * @return an instance of CConfiguration * @throws MalformedURLException if the error occurred while constructing the URL */ public static CConfiguration create(File file, File...moreFiles) throws MalformedURLException { CConfiguration conf = new CConfiguration(); conf.addResource(file.toURI().toURL()); for (File anotherFile : moreFiles) { conf.addResource(anotherFile.toURI().toURL()); } return conf; }
/** * Creates an instance of configuration. * * @return an instance of CConfiguration. */ public static CConfiguration create() { // Create a new configuration instance, but do NOT initialize with // the Hadoop default properties. CConfiguration conf = new CConfiguration(); conf.addResource("cdap-default.xml"); conf.addResource("cdap-site.xml"); return conf; }
/** * Creates an instance of configuration. * * @return an instance of CConfiguration. */ public static CConfiguration create() { // Create a new configuration instance, but do NOT initialize with // the Hadoop default properties. CConfiguration conf = new CConfiguration(); conf.addResource("cdap-default.xml"); conf.addResource("cdap-site.xml"); return conf; }
/** * Creates an instance of configuration. * @param resource the URL to be added to the configuration * @param moreResources the list of URL's to be added to the configuration * @return an instance of CConfiguration * @throws IllegalArgumentException when the resource cannot be converted to the URL */ public static CConfiguration create(URL resource, URL...moreResources) { CConfiguration conf = new CConfiguration(); conf.addResource(resource); for (URL resourceURL : moreResources) { conf.addResource(resourceURL); } return conf; }
/** * Creates an instance of configuration. * @param resource the URL to be added to the configuration * @param moreResources the list of URL's to be added to the configuration * @return an instance of CConfiguration * @throws IllegalArgumentException when the resource cannot be converted to the URL */ public static CConfiguration create(URL resource, URL...moreResources) { CConfiguration conf = new CConfiguration(); conf.addResource(resource); for (URL resourceURL : moreResources) { conf.addResource(resourceURL); } return conf; }