本文整理匯總了Java中org.apache.commons.configuration.BaseConfiguration.copy方法的典型用法代碼示例。如果您正苦於以下問題:Java BaseConfiguration.copy方法的具體用法?Java BaseConfiguration.copy怎麽用?Java BaseConfiguration.copy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.commons.configuration.BaseConfiguration
的用法示例。
在下文中一共展示了BaseConfiguration.copy方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getOutputGraph
import org.apache.commons.configuration.BaseConfiguration; //導入方法依賴的package包/類
public static HadoopGraph getOutputGraph(final Configuration configuration, final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist) {
final HadoopConfiguration hadoopConfiguration = new HadoopConfiguration(configuration);
final BaseConfiguration newConfiguration = new BaseConfiguration();
newConfiguration.copy(org.apache.tinkerpop.gremlin.hadoop.structure.io.InputOutputHelper.getOutputGraph(configuration, resultGraph, persist).configuration());
if (resultGraph.equals(GraphComputer.ResultGraph.NEW) && hadoopConfiguration.containsKey(Constants.GREMLIN_HADOOP_GRAPH_WRITER)) {
if (null != InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter()))
newConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter()).getCanonicalName());
}
return HadoopGraph.open(newConfiguration);
}
示例2: getOutputGraph
import org.apache.commons.configuration.BaseConfiguration; //導入方法依賴的package包/類
public static HadoopGraph getOutputGraph(final Configuration configuration, final GraphComputer.ResultGraph resultGraph, final GraphComputer.Persist persist) {
final HadoopConfiguration hadoopConfiguration = new HadoopConfiguration(configuration);
final BaseConfiguration newConfiguration = new BaseConfiguration();
newConfiguration.copy(hadoopConfiguration);
if (resultGraph.equals(GraphComputer.ResultGraph.NEW)) {
newConfiguration.setProperty(Constants.GREMLIN_HADOOP_INPUT_LOCATION, hadoopConfiguration.getOutputLocation());
if (hadoopConfiguration.containsKey(Constants.GREMLIN_HADOOP_GRAPH_WRITER))
if (null != InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter()))
newConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER, InputOutputHelper.getInputFormat(hadoopConfiguration.getGraphWriter()).getCanonicalName());
newConfiguration.setProperty(Constants.GREMLIN_HADOOP_GRAPH_READER_HAS_EDGES, persist.equals(GraphComputer.Persist.EDGES));
}
newConfiguration.setProperty(Constants.GREMLIN_HADOOP_OUTPUT_LOCATION, hadoopConfiguration.getOutputLocation() + "_");
return HadoopGraph.open(newConfiguration);
}