use of org.talend.hadoop.distribution.model.DistributionBean in project tbd-studio-se by Talend.
the class AbstractHadoopSubForm method isCurrentHadoopVersionSupportGroup.
private boolean isCurrentHadoopVersionSupportGroup() {
boolean supportGroup = false;
DistributionVersion distributionVersion;
DistributionBean distributionBean = HadoopDistributionsHelper.HADOOP.getDistribution(distribution, false);
if (distributionBean != null) {
distributionVersion = distributionBean.getVersion(version, false);
IHadoopDistributionService hadoopDistributionService = (IHadoopDistributionService) GlobalServiceRegister.getDefault().getService(IHadoopDistributionService.class);
if (distributionVersion != null && hadoopDistributionService != null) {
try {
supportGroup = hadoopDistributionService.doSupportMethod(distributionVersion, "doSupportGroup");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
return supportGroup;
}
use of org.talend.hadoop.distribution.model.DistributionBean in project tbd-studio-se by Talend.
the class HadoopImportConfsOptionPage method updateOptionPart.
private void updateOptionPart() {
DistributionBean distribution = getDistribution();
boolean supportRemote = distribution != null && (IHortonworksDistribution.DISTRIBUTION_NAME.equals(distribution.name) || IClouderaDistribution.DISTRIBUTION_NAME.equals(distribution.name));
remoteBtn.setEnabled(supportRemote);
// Synapse supports only manually configured wizard
boolean supportManualOnly = distribution != null && ISynapseDistribution.DISTRIBUTION_NAME.equals(distribution.name);
if (supportManualOnly) {
remoteBtn.setEnabled(false);
localBtn.setEnabled(false);
manualBtn.setEnabled(true);
}
}
use of org.talend.hadoop.distribution.model.DistributionBean in project tbd-studio-se by Talend.
the class HadoopImportConfsOptionPage method updateVersionPart.
private void updateVersionPart() {
DistributionBean distribution = getDistribution();
if (distribution == null) {
return;
}
versionCombo.getCombo().setItems(distribution.getVersionsDisplay());
DistributionVersion defaultVersion = distribution.getDefaultVersion();
if (defaultVersion != null && defaultVersion.displayVersion != null) {
versionCombo.getCombo().setText(defaultVersion.displayVersion);
} else {
versionCombo.getCombo().select(0);
}
}
use of org.talend.hadoop.distribution.model.DistributionBean in project tbd-studio-se by Talend.
the class StandardHCInfoForm method addNavigatorFields.
private void addNavigatorFields() {
DistributionBean distriBean = getDistribution();
MRComponent currentDistribution;
boolean isShow = false;
try {
currentDistribution = (MRComponent) DistributionFactory.buildDistribution(distriBean.getName(), hadoopVersison.getVersion());
isShow = !getDistribution().useCustom() && currentDistribution.doSupportClouderaNavigator();
} catch (Exception e) {
ExceptionHandler.process(e);
}
if (!isShow) {
return;
}
Composite clouderaNaviComposite = new Composite(propertiesComposite, SWT.NONE);
GridLayout hadoopConfsCompLayout = new GridLayout(3, false);
hadoopConfsCompLayout.marginWidth = 5;
hadoopConfsCompLayout.marginHeight = 5;
clouderaNaviComposite.setLayout(hadoopConfsCompLayout);
clouderaNaviComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
useClouderaNaviBtn = new Button(clouderaNaviComposite, SWT.CHECK);
// $NON-NLS-1$
useClouderaNaviBtn.setText(Messages.getString("HadoopClusterForm.button.use_cloudera_navigator"));
useClouderaNaviBtn.setLayoutData(new GridData());
clouderaNaviButton = new Button(clouderaNaviComposite, SWT.NONE);
clouderaNaviButton.setImage(ImageProvider.getImage(EImage.THREE_DOTS_ICON));
clouderaNaviButton.setLayoutData(new GridData(30, 25));
clouderaNaviButton.setEnabled(false);
Label displayLabel = new Label(clouderaNaviComposite, SWT.NONE);
displayLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
}
use of org.talend.hadoop.distribution.model.DistributionBean in project tbd-studio-se by Talend.
the class RetrieveLocalConfsServiceTest method getServiceWithDistribution.
private static IRetrieveConfsService getServiceWithDistribution(String distributionName, String versionName) {
DistributionBean distribution = HadoopDistributionsHelper.HADOOP.getDistribution(distributionName, false);
DistributionVersion version = distribution.getVersion(versionName, false);
return new RetrieveLocalConfsService(confDir.getAbsolutePath(), version);
}
Aggregations