use of com.sequenceiq.cloudbreak.blueprint.BlueprintConfigurationEntry in project cloudbreak by hortonworks.
the class AbstractFileSystemConfigurator method getDefaultFsProperties.
@Override
public List<BlueprintConfigurationEntry> getDefaultFsProperties(T fsConfig) {
List<BlueprintConfigurationEntry> bpConfigs = new ArrayList<>();
String defaultFs = getDefaultFsValue(fsConfig);
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "fs.defaultFS", defaultFs));
bpConfigs.add(new BlueprintConfigurationEntry("hbase-site", "hbase.rootdir", defaultFs + "/apps/hbase/data"));
bpConfigs.add(new BlueprintConfigurationEntry("accumulo-site", "instance.volumes", defaultFs + "/apps/accumulo/data"));
bpConfigs.add(new BlueprintConfigurationEntry("webhcat-site", "templeton.hive.archive", defaultFs + "/hdp/apps/${hdp.version}/hive/hive.tar.gz"));
bpConfigs.add(new BlueprintConfigurationEntry("webhcat-site", "templeton.pig.archive", defaultFs + "/hdp/apps/${hdp.version}/pig/pig.tar.gz"));
bpConfigs.add(new BlueprintConfigurationEntry("webhcat-site", "templeton.sqoop.archive", defaultFs + "/hdp/apps/${hdp.version}/sqoop/sqoop.tar.gz"));
bpConfigs.add(new BlueprintConfigurationEntry("webhcat-site", "templeton.streaming.jar", defaultFs + "/hdp/apps/${hdp.version}/mapreduce/hadoop-streaming.jar"));
bpConfigs.add(new BlueprintConfigurationEntry("oozie-site", "oozie.service.HadoopAccessorService.supported.filesystems", "*"));
return bpConfigs;
}
use of com.sequenceiq.cloudbreak.blueprint.BlueprintConfigurationEntry in project cloudbreak by hortonworks.
the class AdlsFileSystemConfigurator method getFsProperties.
@Override
public List<BlueprintConfigurationEntry> getFsProperties(AdlsFileSystemConfiguration fsConfig, Map<String, String> resourceProperties) {
List<BlueprintConfigurationEntry> bpConfigs = new ArrayList<>();
String clientId = fsConfig.getClientId();
String credential = fsConfig.getCredential();
String tenantId = fsConfig.getTenantId();
String adlsTrackingClusterType = fsConfig.getProperty(AdlsFileSystemConfiguration.ADLS_TRACKING_CLUSTERTYPE_KEY);
String adlsTrackingClusterName = fsConfig.getProperty(AdlsFileSystemConfiguration.ADLS_TRACKING_CLUSTERNAME_KEY);
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "dfs.adls.oauth2.access.token.provider.type", "ClientCredential"));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "dfs.adls.oauth2.client.id", clientId));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "dfs.adls.oauth2.credential", credential));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "dfs.adls.oauth2.refresh.url", "https://login.microsoftonline.com/" + tenantId + "/oauth2/token"));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "fs.AbstractFileSystem.adl.impl", "org.apache.hadoop.fs.adl.Adl"));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "fs.adl.impl", "org.apache.hadoop.fs.adl.AdlFileSystem"));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "fs.adls.oauth2.resource", "https://management.core.windows.net/"));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", AdlsFileSystemConfiguration.ADLS_TRACKING_CLUSTERNAME_KEY, adlsTrackingClusterName));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", AdlsFileSystemConfiguration.ADLS_TRACKING_CLUSTERTYPE_KEY, adlsTrackingClusterType));
return bpConfigs;
}
use of com.sequenceiq.cloudbreak.blueprint.BlueprintConfigurationEntry in project cloudbreak by hortonworks.
the class GcsFileSystemConfigurator method getFsProperties.
@Override
public List<BlueprintConfigurationEntry> getFsProperties(GcsFileSystemConfiguration fsConfig, Map<String, String> resourceProperties) {
List<BlueprintConfigurationEntry> bpConfigs = new ArrayList<>();
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "fs.gs.impl", "com.google.cloud.hadoop.fs.gcs.GoogleHadoopFileSystem"));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "fs.AbstractFileSystem.gs.impl", "com.google.cloud.hadoop.fs.gcs.GoogleHadoopFS"));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "fs.gs.working.dir", "/"));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "fs.gs.system.bucket", fsConfig.getDefaultBucketName()));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "fs.gs.auth.service.account.enable", "true"));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "fs.gs.auth.service.account.keyfile", "/usr/lib/hadoop/lib/gcp.p12"));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "fs.gs.auth.service.account.email", fsConfig.getServiceAccountEmail()));
bpConfigs.add(new BlueprintConfigurationEntry("core-site", "fs.gs.project.id", fsConfig.getProjectId()));
return bpConfigs;
}
use of com.sequenceiq.cloudbreak.blueprint.BlueprintConfigurationEntry in project cloudbreak by hortonworks.
the class SmartSenseConfigProvider method getSmartSenseServerConfigs.
private Collection<? extends BlueprintConfigurationEntry> getSmartSenseServerConfigs(BlueprintPreparationObject source, String smartSenseId) {
Collection<BlueprintConfigurationEntry> configs = new ArrayList<>();
configs.add(new BlueprintConfigurationEntry(SMART_SENSE_SERVER_CONFIG_FILE, "customer.account.name", "Hortonworks_Cloud_HDP"));
configs.add(new BlueprintConfigurationEntry(SMART_SENSE_SERVER_CONFIG_FILE, "customer.notification.email", "aws-marketplace@hortonworks.com"));
String clusterName = getClusterName(source);
configs.add(new BlueprintConfigurationEntry(SMART_SENSE_SERVER_CONFIG_FILE, "cluster.name", clusterName));
configs.add(new BlueprintConfigurationEntry(SMART_SENSE_SERVER_CONFIG_FILE, "customer.smartsense.id", smartSenseId));
HSTMetadataInstanceInfoJson instanceInfoJson = new HSTMetadataInstanceInfoJson(source.getFlexSubscription().isPresent() ? source.getFlexSubscription().get().getSubscriptionId() : "", clusterName, source.getGeneralClusterConfigs().getUuid(), cloudbreakNodeConfig.getInstanceUUID());
HSTMetadataJson productInfo = new HSTMetadataJson(clustersComponentId, instanceInfoJson, productId, cbVersion);
try {
Json productInfoJson = new Json(productInfo);
configs.add(new BlueprintConfigurationEntry(SMART_SENSE_PRODUCT_INFO_FILE, "product-info-content", productInfoJson.getValue()));
} catch (JsonProcessingException ignored) {
LOGGER.error("The 'product-info-content' SmartSense config could not be added to the Blueprint.");
}
return configs;
}
use of com.sequenceiq.cloudbreak.blueprint.BlueprintConfigurationEntry in project cloudbreak by hortonworks.
the class HostgroupConfigurations method fromConfigEntryMap.
public static HostgroupConfigurations fromConfigEntryMap(Map<HostgroupEntry, List<BlueprintConfigurationEntry>> configuration) {
HostgroupConfigurations result = new HostgroupConfigurations();
for (Map.Entry<HostgroupEntry, List<BlueprintConfigurationEntry>> conf : configuration.entrySet()) {
Map<String, Map<String, String>> config = new HashMap<>();
for (BlueprintConfigurationEntry blueprintConfigurationEntry : conf.getValue()) {
if (!config.keySet().contains(blueprintConfigurationEntry.getConfigFile())) {
config.put(blueprintConfigurationEntry.getConfigFile(), new HashMap<>());
}
config.get(blueprintConfigurationEntry.getConfigFile()).put(blueprintConfigurationEntry.getKey(), blueprintConfigurationEntry.getValue());
}
result.addHostgroupConfiguration(new HostgroupConfiguration(conf.getKey().getHostGroup(), config));
}
return result;
}
Aggregations