TBD-3909 fix: Impala principal is not contained in the exported context
and Impala principal text box can not be edited after exported context. when we click revert button,Impala principal text box should return original value. https://jira.talendforge.org/browse/TBD-3909
This commit is contained in:
@@ -1273,6 +1273,12 @@ public final class DBConnectionContextUtils {
|
||||
ContextParameterUtils.getOriginalValue(contextType, maprticket_Duration));
|
||||
|
||||
}
|
||||
// for Impala
|
||||
if (EDatabaseTypeName.IMPALA.equals(EDatabaseTypeName.getTypeFromDbType(conn.getDatabaseType()))) {
|
||||
String impalaPrin = conn.getParameters().get(ConnParameterKeys.IMPALA_AUTHENTICATION_PRINCIPLA);
|
||||
conn.getParameters().put(ConnParameterKeys.IMPALA_AUTHENTICATION_PRINCIPLA,
|
||||
ContextParameterUtils.getOriginalValue(contextType, impalaPrin));
|
||||
}
|
||||
// revert the context value in the hadoop properties dialog if it is hive or hbase
|
||||
String hadoopPropertiesJson = transformContextModeToOriginal(getHiveOrHbaseHadoopProperties(conn), contextType);
|
||||
setAdditionalHadoopProperties(conn, hadoopPropertiesJson);
|
||||
|
||||
@@ -2376,6 +2376,11 @@ public class DatabaseForm extends AbstractForm {
|
||||
}
|
||||
}
|
||||
|
||||
private void adaptImpalaHadoopPartEditable() {
|
||||
useKerberosForImpala.setEnabled(!isContextMode());
|
||||
impalaPrincipalTxt.setEditable(!isContextMode());
|
||||
}
|
||||
|
||||
private void updateHadoopProperties(boolean isEditable) {
|
||||
refreshHadoopProperties();
|
||||
refreshHiveJdbcProperties();
|
||||
@@ -5795,6 +5800,10 @@ public class DatabaseForm extends AbstractForm {
|
||||
adaptHbaseHadoopPartEditable();
|
||||
updateHadoopProperties(!isContextMode());
|
||||
}
|
||||
if (isImpalaDBConnSelected()) {
|
||||
adaptImpalaHadoopPartEditable();
|
||||
updateHadoopProperties(!isContextMode());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isDbTypenull() {
|
||||
|
||||
Reference in New Issue
Block a user