use of org.apache.rya.export.api.conf.AccumuloMergeConfiguration.AccumuloBuilder in project incubator-rya by apache.
the class AccumuloConfigurationAdapter method createConfig.
/**
* @param genConfig - The JAXB generated configuration.
* @return The {@link MergeConfiguration} used in the application
* @throws MergeConfigurationException
*/
@Override
public MergeConfiguration createConfig(final MergeToolConfiguration genConfig) throws MergeConfigurationException {
final AccumuloMergeToolConfiguration aConfig = (AccumuloMergeToolConfiguration) genConfig;
final DBType parentType = aConfig.getParentDBType();
final DBType childType = aConfig.getChildDBType();
final MergeConfiguration.Builder configBuilder = super.getBuilder(aConfig);
final AccumuloBuilder builder = new AccumuloBuilder(configBuilder);
if (parentType == DBType.ACCUMULO) {
verifyParentInstanceType(aConfig);
builder.setParentZookeepers(aConfig.getParentZookeepers()).setParentAuths(aConfig.getParentAuths()).setParentInstanceType(aConfig.getParentInstanceType());
}
if (childType == DBType.ACCUMULO) {
verifyChildInstanceType(aConfig);
builder.setChildZookeepers(aConfig.getChildZookeepers()).setChildAuths(aConfig.getChildAuths()).setChildInstanceType(aConfig.getChildInstanceType());
}
return builder.build();
}
Aggregations