use of org.talend.hadoop.distribution.model.DistributionVersion in project tbd-studio-se by Talend.
the class StandardHCInfoForm method isCurrentHadoopVersionSupportYarn.
private boolean isCurrentHadoopVersionSupportYarn() {
boolean supportYarn = false;
final DistributionVersion distributionVersion = getDistributionVersion();
if (distributionVersion != null && distributionVersion.hadoopComponent != null) {
supportYarn = distributionVersion.hadoopComponent.isHadoop2() || distributionVersion.hadoopComponent.isHadoop3();
}
return supportYarn;
}
use of org.talend.hadoop.distribution.model.DistributionVersion in project tbd-studio-se by Talend.
the class StandardHCInfoForm method isCurrentHadoopVersionSupportSecurity.
private boolean isCurrentHadoopVersionSupportSecurity() {
boolean supportSecurity = false;
final DistributionVersion distributionVersion = getDistributionVersion();
if (distributionVersion != null && distributionVersion.hadoopComponent != null) {
supportSecurity = distributionVersion.hadoopComponent.doSupportKerberos();
}
return supportSecurity;
}
use of org.talend.hadoop.distribution.model.DistributionVersion in project tbd-studio-se by Talend.
the class StandardHCInfoForm method updateForm.
@Override
public void updateForm() {
HadoopClusterConnection connection = getConnection();
final DistributionVersion distributionVersion = getDistributionVersion();
if (distributionVersion.distribution.useCustom()) {
hideControl(customGroup, false);
String authModeName = connection.getAuthMode();
if (authModeName != null) {
EAuthenticationMode authMode = EAuthenticationMode.getAuthenticationByName(authModeName, false);
switch(authMode) {
case KRB:
kerberosBtn.setEnabled(true);
namenodePrincipalText.setEditable(kerberosBtn.isEnabled() && kerberosBtn.getSelection());
jtOrRmPrincipalText.setEditable(namenodePrincipalText.getEditable());
jobHistoryPrincipalText.setEditable(isJobHistoryPrincipalEditable());
keytabBtn.setEnabled(kerberosBtn.isEnabled() && kerberosBtn.getSelection());
keytabPrincipalText.setEditable(keytabBtn.isEnabled() && keytabBtn.getSelection());
keytabText.setEditable(keytabBtn.isEnabled() && keytabBtn.getSelection());
keytabPrincipalText.setHideWidgets(!(kerberosBtn.isEnabled() && kerberosBtn.getSelection() && keytabBtn.isEnabled() && keytabBtn.getSelection()));
keytabText.setVisible(kerberosBtn.isEnabled() && kerberosBtn.getSelection() && keytabBtn.isEnabled() && keytabBtn.getSelection());
userNameText.setEditable(false);
groupText.setEditable(false);
// userNameText.setHideWidgets(true);
userNameText.setVisible(false);
groupText.setHideWidgets(true);
hideKerberosControl(!kerberosBtn.getSelection());
hideMaprTicketControl(true);
maprTPasswordText.setEditable(false);
break;
case UGI:
kerberosBtn.setEnabled(true);
namenodePrincipalText.setEditable(kerberosBtn.isEnabled() && kerberosBtn.getSelection());
jtOrRmPrincipalText.setEditable(namenodePrincipalText.getEditable());
jobHistoryPrincipalText.setEditable(namenodePrincipalText.getEditable());
keytabBtn.setEnabled(kerberosBtn.isEnabled() && kerberosBtn.getSelection());
keytabPrincipalText.setEditable(keytabBtn.isEnabled() && keytabBtn.getSelection());
keytabText.setEditable(keytabBtn.isEnabled() && keytabBtn.getSelection());
keytabPrincipalText.setHideWidgets(!(kerberosBtn.isEnabled() && kerberosBtn.getSelection() && keytabBtn.isEnabled() && keytabBtn.getSelection()));
keytabText.setVisible(kerberosBtn.isEnabled() && kerberosBtn.getSelection() && keytabBtn.isEnabled() && keytabBtn.getSelection());
userNameText.setEditable(!(kerberosBtn.isEnabled() && kerberosBtn.getSelection()));
groupText.setEditable(true);
userNameText.setHideWidgets(kerberosBtn.isEnabled() && kerberosBtn.getSelection());
groupText.setHideWidgets(false);
hideKerberosControl(!kerberosBtn.getSelection());
// maprt
hideMaprTicketChildControl(!maprTBtn.getSelection());
maprTPasswordText.setEditable(maprTBtn.isEnabled() && (maprTBtn.getSelection() && !(kerberosBtn.isEnabled() && kerberosBtn.getSelection())));
break;
default:
kerberosBtn.setEnabled(false);
namenodePrincipalText.setEditable(false);
jtOrRmPrincipalText.setEditable(false);
jobHistoryPrincipalText.setEditable(false);
keytabBtn.setEnabled(false);
keytabPrincipalText.setEditable(false);
keytabText.setEditable(false);
userNameText.setEditable(true);
groupText.setEditable(false);
userNameText.setHideWidgets(false);
groupText.setHideWidgets(true);
hideKerberosControl(true);
hideMaprTicketControl(true);
maprTPasswordText.setEditable(false);
break;
}
}
} else {
hideControl(customGroup, true);
kerberosBtn.setEnabled(isCurrentHadoopVersionSupportSecurity());
namenodePrincipalText.setEditable(kerberosBtn.isEnabled() && kerberosBtn.getSelection());
jtOrRmPrincipalText.setEditable(namenodePrincipalText.getEditable());
jobHistoryPrincipalText.setEditable(isJobHistoryPrincipalEditable());
keytabBtn.setEnabled(kerberosBtn.isEnabled() && kerberosBtn.getSelection());
keytabPrincipalText.setEditable(keytabBtn.isEnabled() && keytabBtn.getSelection());
keytabText.setEditable(keytabBtn.isEnabled() && keytabBtn.getSelection());
keytabPrincipalText.setHideWidgets(!(kerberosBtn.isEnabled() && kerberosBtn.getSelection() && keytabBtn.isEnabled() && keytabBtn.getSelection()));
keytabText.setVisible(kerberosBtn.isEnabled() && kerberosBtn.getSelection() && keytabBtn.isEnabled() && keytabBtn.getSelection());
groupText.setEditable(isCurrentHadoopVersionSupportGroup());
userNameText.setEditable(!kerberosBtn.getSelection());
if (isCurrentHadoopVersionSupportGroup()) {
userNameText.setHideWidgets(kerberosBtn.getSelection());
} else {
userNameText.setVisible(!kerberosBtn.getSelection());
}
groupText.setHideWidgets(!isCurrentHadoopVersionSupportGroup());
hideKerberosControl(!kerberosBtn.getSelection());
// maprt
hideControl(maprTBtn, !isCurrentHadoopVersionSupportMapRTicket());
maprTBtn.setEnabled(isCurrentHadoopVersionSupportMapRTicket());
maprTPasswordText.setEditable(maprTBtn.isEnabled() && (maprTBtn.getSelection() && !(kerberosBtn.isEnabled() && kerberosBtn.getSelection())));
maprTClusterText.setEditable(maprTBtn.isEnabled() && maprTBtn.getSelection());
maprTDurationText.setEditable(maprTBtn.isEnabled() && maprTBtn.getSelection());
setMaprTHomeDirBtn.setEnabled(maprTBtn.isEnabled() && maprTBtn.getSelection());
setHadoopLoginBtn.setEnabled(maprTBtn.isEnabled() && maprTBtn.getSelection());
preloadAuthentificationBtn.setEnabled(maprTBtn.isEnabled() && maprTBtn.getSelection());
hideMaprTicketChildControl(!maprTBtn.getSelection());
}
updateMRRelatedContent();
updateConnectionContent();
hideWebHDFSControl(!isCurrentHadoopVersionSupportWebHDFS());
if (isContextMode()) {
adaptFormToEditable();
}
hideFieldsOnSparkMode();
}
use of org.talend.hadoop.distribution.model.DistributionVersion in project tbd-studio-se by Talend.
the class HadoopClusterForm method switchToInfoForm.
private void switchToInfoForm() {
if (hcInfoForm != null) {
hcInfoForm.dispose();
}
DistributionBean hadoopDistribution = HadoopDistributionsHelper.HADOOP.getDistribution(distributionCombo.getText(), true);
DistributionVersion hadoopVersion = hadoopDistribution.getVersion(versionCombo.getText(), true);
if (HCVersionUtil.isHDI(getConnection())) {
hcInfoForm = new HDIInfoForm(this, connectionItem, existingNamesArray, creation);
} else if (HCVersionUtil.isSynapse(getConnection())) {
hcInfoForm = new SynapseInfoForm(this, connectionItem, existingNamesArray, creation, hadoopDistribution, hadoopVersion);
} else if (HCVersionUtil.isGoogleDataproc(getConnection())) {
hcInfoForm = new GoogleDataprocInfoForm(this, connectionItem, existingNamesArray, creation, hadoopDistribution, hadoopVersion);
} else if (HCVersionUtil.isDataBricks(getConnection())) {
hcInfoForm = new DataBricksInfoForm(this, connectionItem, existingNamesArray, creation, hadoopDistribution, hadoopVersion);
} else if (HCVersionUtil.isExecutedThroughKnox(getConnection()) && useKnoxButton.getSelection()) {
hcInfoForm = new KnoxInfoForm(this, connectionItem, existingNamesArray, creation, hadoopDistribution, hadoopVersion);
} else {
hcInfoForm = new StandardHCInfoForm(this, connectionItem, existingNamesArray, creation, hadoopDistribution, hadoopVersion);
}
hcInfoForm.setReadOnly(readOnly);
hcInfoForm.setListener(listener);
hcInfoForm.updateForm();
hcInfoForm.checkFieldsValue();
this.layout();
}
use of org.talend.hadoop.distribution.model.DistributionVersion in project tbd-studio-se by Talend.
the class HDIInfoForm method isCurrentHadoopVersionSupportStorage.
private boolean isCurrentHadoopVersionSupportStorage() {
boolean supportStorage = false;
final DistributionVersion distributionVersion = getDistributionVersion();
if (distributionVersion != null && distributionVersion.hadoopComponent != null) {
// $NON-NLS-1$
supportStorage = "MICROSOFT_HD_INSIGHT_4_0".equals(distributionVersion.getVersion());
}
return supportStorage;
}
Aggregations