Compare commits
11 Commits
undx/TDI-4
...
undx/TPS-4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8c5e3debd | ||
|
|
7543617b31 | ||
|
|
e21bb53627 | ||
|
|
a8f36c79f5 | ||
|
|
1e5664d7b8 | ||
|
|
58171338ac | ||
|
|
cebd4646d9 | ||
|
|
9f2997692a | ||
|
|
1387f66674 | ||
|
|
7ee7eddb9d | ||
|
|
e674ec78f7 |
@@ -212,4 +212,8 @@ public class CommonTextCellEditorWithProposal {
|
||||
return this.contentProposalAdapter;
|
||||
}
|
||||
|
||||
public int getPreviousActivatedIndex() {
|
||||
return previousActivatedIndex;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -97,4 +97,7 @@ public class ExtendedTextCellEditorWithProposal extends ExtendedTextCellEditor i
|
||||
super.fireCancelEditor();
|
||||
}
|
||||
|
||||
public CommonTextCellEditorWithProposal getCommonTextEditor() {
|
||||
return commonTextEditor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2089,6 +2089,11 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
// init dynamic distirbution after `beforeLogon`, before loading libraries.
|
||||
initDynamicDistribution(monitor);
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) {
|
||||
IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class);
|
||||
updateService.syncComponentM2Jars(currentMonitor);
|
||||
}
|
||||
|
||||
// init sdk component
|
||||
try {
|
||||
currentMonitor = subMonitor.newChild(1, SubMonitor.SUPPRESS_NONE);
|
||||
@@ -2157,11 +2162,6 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
|
||||
|
||||
fireRepositoryPropertyChange(ERepositoryActionName.PROJECT_PREFERENCES_RELOAD.getName(), null, null);
|
||||
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IUpdateService.class)) {
|
||||
IUpdateService updateService = GlobalServiceRegister.getDefault().getService(IUpdateService.class);
|
||||
updateService.syncComponentM2Jars(currentMonitor);
|
||||
}
|
||||
|
||||
IRunProcessService runProcessService = getRunProcessService();
|
||||
if (runProcessService != null) {
|
||||
runProcessService.initMavenJavaProject(monitor, project);
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
// ============================================================================
|
||||
//
|
||||
// Copyright (C) 2006-2020 Talend Inc. - www.talend.com
|
||||
//
|
||||
// This source code is available under agreement available at
|
||||
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
|
||||
//
|
||||
// You should have received a copy of the agreement
|
||||
// along with this program; if not, write to Talend SA
|
||||
// 9 rue Pages 92150 Suresnes, France
|
||||
//
|
||||
// ============================================================================
|
||||
package org.talend.core.database;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.talend.core.runtime.hd.hive.HiveMetadataHelper;
|
||||
|
||||
/**
|
||||
* DOC hzhao class global comment. Detailled comment
|
||||
*/
|
||||
public enum EImpalaDriver {
|
||||
|
||||
HIVE2("HIVE2", "HIVE2", "org.apache.hive.jdbc.HiveDriver"),
|
||||
IMPALA40("IMPALA40", "IMPALA40", "com.cloudera.impala.jdbc4.Driver"),
|
||||
IMPALA41("IMPALA41", "IMPALA41", "com.cloudera.impala.jdbc41.Driver");
|
||||
|
||||
EImpalaDriver(String displayName, String name, String driver) {
|
||||
this.displayName = displayName;
|
||||
this.name = name;
|
||||
this.driver = driver;
|
||||
}
|
||||
|
||||
private String displayName;
|
||||
|
||||
private String name;
|
||||
|
||||
private String driver;
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getDriver() {
|
||||
return driver;
|
||||
}
|
||||
|
||||
public static boolean isSupport(String distribution, String version, boolean byDisplay, String supportMethodName) {
|
||||
return HiveMetadataHelper.doSupportMethod(distribution, version, byDisplay, supportMethodName);
|
||||
}
|
||||
|
||||
public static String[] getImpalaDriverDisplay(String distribution, String version, boolean byDisplay) {
|
||||
List<String> list = new ArrayList<>(0);
|
||||
for (EImpalaDriver driver : EImpalaDriver.values()) {
|
||||
if (isSupport(distribution, version, byDisplay, "doSupportImpalaConnector")) {
|
||||
list.add(driver.getDisplayName());
|
||||
}
|
||||
}
|
||||
return list.toArray(new String[0]);
|
||||
}
|
||||
|
||||
public static EImpalaDriver getByDisplay(String display) {
|
||||
for (EImpalaDriver driver : EImpalaDriver.values()) {
|
||||
if (driver.getDisplayName().equals(display)) {
|
||||
return driver;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static EImpalaDriver getByName(String name) {
|
||||
for (EImpalaDriver driver : EImpalaDriver.values()) {
|
||||
if (driver.getName().equals(name)) {
|
||||
return driver;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -267,6 +267,8 @@ public class ConnParameterKeys {
|
||||
|
||||
public static final String IMPALA_AUTHENTICATION_PRINCIPLA = "IMPALA_AUTHENTICATION_PRINCIPLA";//$NON-NLS-1$
|
||||
|
||||
public static final String IMPALA_DRIVER = "IMPALA_DRIVER";
|
||||
|
||||
/**
|
||||
* Google Dataproc keys.
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.talend.components.api.properties.ComponentProperties;
|
||||
import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.database.EDatabase4DriverClassName;
|
||||
import org.talend.core.database.EDatabaseTypeName;
|
||||
import org.talend.core.database.conn.ConnParameterKeys;
|
||||
import org.talend.core.database.conn.DatabaseConnStrUtil;
|
||||
import org.talend.core.database.conn.version.EDatabaseVersion4Drivers;
|
||||
import org.talend.core.model.components.EComponentType;
|
||||
@@ -667,6 +668,18 @@ public class ComponentToRepositoryProperty {
|
||||
connection.setServerName(value);
|
||||
}
|
||||
}
|
||||
if ("IMPALA_DRIVER".equals(param.getRepositoryValue())) {
|
||||
String value = getParameterValue(connection, node, param);
|
||||
if (value != null) {
|
||||
connection.getParameters().put(ConnParameterKeys.IMPALA_DRIVER, value);
|
||||
}
|
||||
}
|
||||
if ("IMPALA_ADDITIONAL_JDBC".equals(param.getRepositoryValue())) {
|
||||
String value = getParameterValue(connection, node, param);
|
||||
if (value != null) {
|
||||
connection.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ADDITIONAL_JDBC_SETTINGS, value);
|
||||
}
|
||||
}
|
||||
|
||||
if (connection.getDatabaseType().equals(EDatabaseTypeName.ORACLEFORSID.getDisplayName())) {
|
||||
setDatabaseValueForOracleSid(connection, node, param);
|
||||
|
||||
@@ -1755,8 +1755,18 @@ public class RepositoryToComponentProperty {
|
||||
if (StringUtils.equals("MAPPING", value)) {//$NON-NLS-1$
|
||||
return connection.getDbmsId();
|
||||
}
|
||||
if ("IMPALA_ADDITIONAL_JDBC".equals(value)) { //$NON-NLS-1$
|
||||
String additionJdbc = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_HIVE_ADDITIONAL_JDBC_SETTINGS);
|
||||
if (isContextMode(connection, additionJdbc)) {
|
||||
return additionJdbc;
|
||||
} else {
|
||||
return TalendQuoteUtils.addQuotes(additionJdbc);
|
||||
}
|
||||
}
|
||||
if ("IMPALA_DRIVER".equals(value)) {
|
||||
return connection.getParameters().get(ConnParameterKeys.IMPALA_DRIVER);
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
private static String getAppropriateValue(Connection connection, String rawValue) {
|
||||
|
||||
@@ -75,9 +75,9 @@ public class ComponentsSettingsHelper {
|
||||
hiddenComponents.put(component.getPaletteType(), new HashMap<String, Set<String>>());
|
||||
}
|
||||
if (!component.isVisibleInComponentDefinition()) {
|
||||
hiddenComponents.get(component.getPaletteType()).put(component.getName(), new HashSet<String>());
|
||||
hiddenComponents.get(component.getPaletteType()).put(component.getDisplayName(), new HashSet<String>());
|
||||
for (String family : component.getOriginalFamilyName().split(ComponentsFactoryProvider.FAMILY_SEPARATOR_REGEX)) {
|
||||
hiddenComponents.get(component.getPaletteType()).get(component.getName()).add(family);
|
||||
hiddenComponents.get(component.getPaletteType()).get(component.getDisplayName()).add(family);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -168,8 +168,8 @@ public class ComponentsSettingsHelper {
|
||||
}
|
||||
|
||||
if (hiddenComponents.containsKey(component.getPaletteType())) {
|
||||
if (hiddenComponents.get(component.getPaletteType()).containsKey(component.getName())) {
|
||||
if (hiddenComponents.get(component.getPaletteType()).get(component.getName()).contains(family)) {
|
||||
if (hiddenComponents.get(component.getPaletteType()).containsKey(component.getDisplayName())) {
|
||||
if (hiddenComponents.get(component.getPaletteType()).get(component.getDisplayName()).contains(family)) {
|
||||
// not visible if in the hidden component list;
|
||||
return false;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ public class ComponentsSettingsHelper {
|
||||
EList list = emfProject.getComponentsSettings();
|
||||
if (!list.isEmpty()) {
|
||||
list.clear();
|
||||
IRepositoryService service = (IRepositoryService) GlobalServiceRegister.getDefault().getService(
|
||||
IRepositoryService service = GlobalServiceRegister.getDefault().getService(
|
||||
IRepositoryService.class);
|
||||
|
||||
IProxyRepositoryFactory prf = service.getProxyRepositoryFactory();
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<tcomp.version>1.1.15</tcomp.version>
|
||||
<tcomp.version>1.1.15.2</tcomp.version>
|
||||
<slf4j.version>1.7.25</slf4j.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import static org.talend.designer.maven.model.TalendJavaProjectConstants.*;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -328,26 +329,10 @@ public class AggregatorPomsHelper {
|
||||
}
|
||||
|
||||
public static void addToParentModules(IFile pomFile, Property property, boolean checkFilter) throws Exception {
|
||||
// Check relation for ESB service job, should not be added into main pom
|
||||
if (property != null) {
|
||||
List<Relation> relations = RelationshipItemBuilder.getInstance().getItemsRelatedTo(property.getId(),
|
||||
property.getVersion(), RelationshipItemBuilder.JOB_RELATION);
|
||||
for (Relation relation : relations) {
|
||||
if (RelationshipItemBuilder.SERVICES_RELATION.equals(relation.getType())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!checkIfCanAddToParentModules(property, checkFilter)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (checkFilter) {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IFilterService.class)) {
|
||||
IFilterService filterService = (IFilterService) GlobalServiceRegister.getDefault()
|
||||
.getService(IFilterService.class);
|
||||
if (property != null && !filterService.isFilterAccepted(property.getItem(), PomIdsHelper.getPomFilter())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
IFile parentPom = getParentModulePomFile(pomFile);
|
||||
if (parentPom != null) {
|
||||
if (!parentPom.isSynchronized(IResource.DEPTH_ZERO)) {
|
||||
@@ -367,6 +352,36 @@ public class AggregatorPomsHelper {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean checkIfCanAddToParentModules(Property property, boolean checkFilter) {
|
||||
// Check relation for ESB service job, should not be added into main pom
|
||||
if (property != null) {
|
||||
List<Relation> relations = RelationshipItemBuilder.getInstance().getItemsRelatedTo(property.getId(),
|
||||
property.getVersion(), RelationshipItemBuilder.JOB_RELATION);
|
||||
for (Relation relation : relations) {
|
||||
if (RelationshipItemBuilder.SERVICES_RELATION.equals(relation.getType())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// for import won't add for exclude option
|
||||
if (property.getItem() != null && property.getItem().getState() != null && property.getItem().getState().isDeleted()
|
||||
&& PomIdsHelper.getIfExcludeDeletedItems(property)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (checkFilter) {
|
||||
if (GlobalServiceRegister.getDefault().isServiceRegistered(IFilterService.class)) {
|
||||
IFilterService filterService = (IFilterService) GlobalServiceRegister.getDefault()
|
||||
.getService(IFilterService.class);
|
||||
if (property != null && !filterService.isFilterAccepted(property.getItem(), PomIdsHelper.getPomFilter())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void removeFromParentModules(IFile pomFile) throws Exception {
|
||||
IFile parentPom = getParentModulePomFile(pomFile);
|
||||
if (parentPom != null) {
|
||||
@@ -384,6 +399,69 @@ public class AggregatorPomsHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public static void removeAllVersionsFromParentModules(Property property) throws Exception {
|
||||
IFile parentPom = getParentModulePomFile(
|
||||
AggregatorPomsHelper.getItemPomFolder(property).getFile(TalendMavenConstants.POM_FILE_NAME));
|
||||
if (parentPom == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> relativePathList = new ArrayList<String>();
|
||||
List<IRepositoryViewObject> allVersion = ProxyRepositoryFactory.getInstance().getAllVersion(property.getId());
|
||||
for (IRepositoryViewObject object : allVersion) {
|
||||
IFile pomFile = AggregatorPomsHelper.getItemPomFolder(object.getProperty())
|
||||
.getFile(TalendMavenConstants.POM_FILE_NAME);
|
||||
String relativePath = pomFile.getParent().getLocation().makeRelativeTo(parentPom.getParent().getLocation())
|
||||
.toPortableString();
|
||||
if (StringUtils.isNotBlank(relativePath)) {
|
||||
relativePathList.add(relativePath);
|
||||
}
|
||||
}
|
||||
|
||||
Model model = MavenPlugin.getMaven().readModel(parentPom.getContents());
|
||||
List<String> modules = model.getModules();
|
||||
if (modules != null && modules.size() > 0) {
|
||||
modules.removeAll(relativePathList);
|
||||
PomUtil.savePom(null, model, parentPom);
|
||||
}
|
||||
}
|
||||
|
||||
public static void restoreAllVersionsFromParentModules(Property property) throws Exception {
|
||||
IFile parentPom = getParentModulePomFile(
|
||||
AggregatorPomsHelper.getItemPomFolder(property).getFile(TalendMavenConstants.POM_FILE_NAME));
|
||||
if (parentPom == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<String> relativePathList = new ArrayList<String>();
|
||||
Model model = MavenPlugin.getMaven().readModel(parentPom.getContents());
|
||||
List<String> modules = model.getModules();
|
||||
if (modules == null) {
|
||||
modules = new ArrayList<>();
|
||||
model.setModules(modules);
|
||||
}
|
||||
|
||||
List<IRepositoryViewObject> allVersion = ProxyRepositoryFactory.getInstance().getAllVersion(property.getId());
|
||||
for (IRepositoryViewObject object : allVersion) {
|
||||
Property itemProperty = object.getProperty();
|
||||
if (!checkIfCanAddToParentModules(itemProperty, true)) {
|
||||
continue;
|
||||
}
|
||||
IFile pomFile = AggregatorPomsHelper.getItemPomFolder(object.getProperty(), object.getVersion())
|
||||
.getFile(TalendMavenConstants.POM_FILE_NAME);
|
||||
|
||||
String relativePath = pomFile.getParent().getLocation().makeRelativeTo(parentPom.getParent().getLocation())
|
||||
.toPortableString();
|
||||
if (StringUtils.isNoneBlank(relativePath) && !modules.contains(relativePath)) {
|
||||
relativePathList.add(relativePath);
|
||||
}
|
||||
}
|
||||
Collections.sort(relativePathList);
|
||||
modules.addAll(relativePathList);
|
||||
PomUtil.savePom(null, model, parentPom);
|
||||
|
||||
}
|
||||
|
||||
private static IFile getParentModulePomFile(IFile pomFile) {
|
||||
IFile parentPom = null;
|
||||
if (pomFile == null || pomFile.getParent() == null || pomFile.getParent().getParent() == null) {
|
||||
@@ -538,7 +616,10 @@ public class AggregatorPomsHelper {
|
||||
String jobFolderName = getJobProjectFolderName(property.getLabel(), version);
|
||||
ERepositoryObjectType type = ERepositoryObjectType.getItemType(property.getItem());
|
||||
IFolder jobFolder = helper.getProcessFolder(type).getFolder(itemRelativePath).getFolder(jobFolderName);
|
||||
createFoldersIfNeeded(jobFolder);
|
||||
List<ERepositoryObjectType> allTypesOfProcess2 = ERepositoryObjectType.getAllTypesOfProcess2();
|
||||
if (allTypesOfProcess2.contains(type)) {
|
||||
createFoldersIfNeeded(jobFolder);
|
||||
}
|
||||
return jobFolder;
|
||||
}
|
||||
|
||||
|
||||
@@ -395,4 +395,24 @@ public class BuildCacheManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean containsMultipleVersionModules() {
|
||||
return containsMultipleVersionModules(currentJobletmodules) || containsMultipleVersionModules(currentJobmodules);
|
||||
}
|
||||
|
||||
private static boolean containsMultipleVersionModules(Set<String> mods) {
|
||||
Set<String> joblets = new HashSet<String>();
|
||||
for (String mod : mods) {
|
||||
int idx = mod.lastIndexOf('_');
|
||||
if (idx == -1) {
|
||||
continue;
|
||||
}
|
||||
String jobletWithoutVersion = mod.substring(0, idx);
|
||||
if (joblets.contains(jobletWithoutVersion)) {
|
||||
return true;
|
||||
} else {
|
||||
joblets.add(jobletWithoutVersion);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1634,6 +1634,10 @@ public final class DBConnectionContextUtils {
|
||||
String impalaPrin = conn.getParameters().get(ConnParameterKeys.IMPALA_AUTHENTICATION_PRINCIPLA);
|
||||
conn.getParameters().put(ConnParameterKeys.IMPALA_AUTHENTICATION_PRINCIPLA,
|
||||
ContextParameterUtils.getOriginalValue(contextType, impalaPrin));
|
||||
String addtionalJDBCParameters = conn.getParameters()
|
||||
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_ADDITIONAL_JDBC_SETTINGS);
|
||||
conn.getParameters().put(ConnParameterKeys.CONN_PARA_KEY_HIVE_ADDITIONAL_JDBC_SETTINGS,
|
||||
ContextParameterUtils.getOriginalValue(contextType, addtionalJDBCParameters));
|
||||
}
|
||||
|
||||
if (EDatabaseTypeName.ORACLE_CUSTOM.equals(EDatabaseTypeName.getTypeFromDbType(conn.getDatabaseType()))) {
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.talend.core.classloader.ClassLoaderFactory;
|
||||
import org.talend.core.classloader.DynamicClassLoader;
|
||||
import org.talend.core.database.EDatabase4DriverClassName;
|
||||
import org.talend.core.database.EDatabaseTypeName;
|
||||
import org.talend.core.database.EImpalaDriver;
|
||||
import org.talend.core.database.conn.ConnParameterKeys;
|
||||
import org.talend.core.hadoop.IHadoopDistributionService;
|
||||
import org.talend.core.hadoop.conf.EHadoopConfProperties;
|
||||
@@ -38,6 +39,7 @@ import org.talend.core.model.metadata.IMetadataConnection;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.core.runtime.hd.IHDistribution;
|
||||
import org.talend.core.runtime.hd.IHDistributionVersion;
|
||||
import org.talend.core.runtime.hd.hive.HiveMetadataHelper;
|
||||
import org.talend.core.utils.ReflectionUtils;
|
||||
|
||||
import metadata.managment.i18n.Messages;
|
||||
@@ -71,15 +73,13 @@ public class ImpalaConnectionManager extends DataBaseConnectionManager {
|
||||
String connURL = metadataConn.getUrl();
|
||||
String username = metadataConn.getUsername();
|
||||
String password = metadataConn.getPassword();
|
||||
|
||||
// 1. Get class loader.
|
||||
ClassLoader currClassLoader = Thread.currentThread().getContextClassLoader();
|
||||
ClassLoader impalaClassLoader = getClassLoader(metadataConn);
|
||||
Thread.currentThread().setContextClassLoader(impalaClassLoader);
|
||||
try {
|
||||
// 2. Fetch the HiveDriver from the new classloader
|
||||
Class<?> driver = Class.forName(EDatabase4DriverClassName.IMPALA.getDriverClass(), true, impalaClassLoader);
|
||||
Driver hiveDriver = (Driver) driver.newInstance();
|
||||
String driverClass = EDatabase4DriverClassName.IMPALA.getDriverClass();
|
||||
|
||||
Map<String, Object> otherParametersMap = metadataConn.getOtherParameters();
|
||||
if (otherParametersMap != null) {
|
||||
@@ -92,7 +92,60 @@ public class ImpalaConnectionManager extends DataBaseConnectionManager {
|
||||
ReflectionUtils.invokeStaticMethod("org.apache.hadoop.security.UserGroupInformation", //$NON-NLS-1$
|
||||
impalaClassLoader, "setConfiguration", new Object[] { conf }); //$NON-NLS-1$
|
||||
}
|
||||
// addtional jdbc settings
|
||||
Object jdbcObj = otherParametersMap.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_ADDITIONAL_JDBC_SETTINGS);
|
||||
if (jdbcObj != null) {
|
||||
String addJDBCSetting = String.valueOf(jdbcObj);
|
||||
if (!"".equals(addJDBCSetting.trim())) {
|
||||
if (!addJDBCSetting.startsWith(";")) {
|
||||
addJDBCSetting = ";" + addJDBCSetting;
|
||||
}
|
||||
connURL += addJDBCSetting;
|
||||
}
|
||||
}
|
||||
IHadoopDistributionService hadoopService = getHadoopDistributionService();
|
||||
if ((hadoopService != null)) {
|
||||
// driver
|
||||
Object driverObj = otherParametersMap.get(ConnParameterKeys.IMPALA_DRIVER);
|
||||
String driverType = null;
|
||||
String impalaDriver = null;
|
||||
if (driverObj != null) {
|
||||
driverType = String.valueOf(driverObj);
|
||||
}
|
||||
// distribution
|
||||
Object distObj = otherParametersMap.get(ConnParameterKeys.CONN_PARA_KEY_IMPALA_DISTRIBUTION);
|
||||
String distribution = null;
|
||||
if (distObj != null) {
|
||||
distribution = String.valueOf(distObj);
|
||||
}
|
||||
// version
|
||||
Object versionObj = otherParametersMap.get(ConnParameterKeys.CONN_PARA_KEY_IMPALA_VERSION);
|
||||
String version = null;
|
||||
if (versionObj != null) {
|
||||
version = String.valueOf(versionObj);
|
||||
}
|
||||
IHDistribution impalaDistribution = hadoopService.getImpalaDistributionManager()
|
||||
.getDistribution(distribution, false);
|
||||
if (distribution != null && version != null) {
|
||||
if (driverType != null && !"".equals(driverType.trim()) && (impalaDistribution.useCustom()
|
||||
|| HiveMetadataHelper.doSupportHive2(distribution, version, false))) {
|
||||
if (EImpalaDriver.HIVE2.getDisplayName().equalsIgnoreCase(driverType)) {
|
||||
driverClass = EImpalaDriver.HIVE2.getDriver();
|
||||
}
|
||||
if (EImpalaDriver.IMPALA40.getDisplayName().equalsIgnoreCase(driverType)) {
|
||||
driverClass = EImpalaDriver.IMPALA40.getDriver();
|
||||
}
|
||||
if (EImpalaDriver.IMPALA41.getDisplayName().equalsIgnoreCase(driverType)) {
|
||||
driverClass = EImpalaDriver.IMPALA41.getDriver();
|
||||
}
|
||||
} else {
|
||||
throw new IllegalArgumentException("impala can not work with Hive1");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Class<?> driver = Class.forName(driverClass, true, impalaClassLoader);
|
||||
Driver hiveDriver = (Driver) driver.newInstance();
|
||||
|
||||
// 3. Try to connect by driver
|
||||
Properties info = new Properties();
|
||||
|
||||
@@ -1615,11 +1615,14 @@ public class DBConnectionFillerImpl extends MetadataFillerImpl<DatabaseConnectio
|
||||
ExtractMetaDataUtils.getInstance().getIntMetaDataInfo(columns, "DECIMAL_DIGITS"));
|
||||
column.setTalendType(talendType);
|
||||
column.setSourceType(typeName);
|
||||
if (JavaTypesManager.DATE.getId().equals(talendType)
|
||||
|| PerlTypesManager.DATE.equals(talendType)) {
|
||||
String pattern1 = mappingTypeRetriever.getDefaultPattern(dbmsId, typeName);
|
||||
column.setPattern(StringUtils.isNotBlank(pattern1) ? TalendQuoteUtils.addQuotes(pattern1)
|
||||
: TalendQuoteUtils.addQuotes("dd-MM-yyyy"));//$NON-NLS-1$
|
||||
if (StringUtils.isBlank(column.getPattern())) {
|
||||
if (JavaTypesManager.DATE.getId().equals(talendType)
|
||||
|| PerlTypesManager.DATE.equals(talendType)) {
|
||||
String pattern1 = mappingTypeRetriever.getDefaultPattern(dbmsId, typeName);
|
||||
column.setPattern(
|
||||
StringUtils.isNotBlank(pattern1) ? TalendQuoteUtils.addQuotes(pattern1)
|
||||
: TalendQuoteUtils.addQuotes("dd-MM-yyyy"));//$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1809,12 +1812,16 @@ public class DBConnectionFillerImpl extends MetadataFillerImpl<DatabaseConnectio
|
||||
column.setTalendType(talendType);
|
||||
String defaultSelectedDbType = mappingTypeRetriever.getDefaultSelectedDbType(talendType);
|
||||
column.setSourceType(defaultSelectedDbType);
|
||||
if (JavaTypesManager.DATE.getId().equals(talendType)
|
||||
|| PerlTypesManager.DATE.equals(talendType)) {
|
||||
String pattern1 = mappingTypeRetriever.getDefaultPattern(dbmsId, defaultSelectedDbType);
|
||||
column.setPattern(StringUtils.isNotBlank(pattern1) ? TalendQuoteUtils.addQuotes(pattern1)
|
||||
: TalendQuoteUtils.addQuotes("dd-MM-yyyy"));//$NON-NLS-1$
|
||||
if (StringUtils.isBlank(column.getPattern())) {
|
||||
if (JavaTypesManager.DATE.getId().equals(talendType)
|
||||
|| PerlTypesManager.DATE.equals(talendType)) {
|
||||
String pattern1 = mappingTypeRetriever.getDefaultPattern(dbmsId, defaultSelectedDbType);
|
||||
column.setPattern(
|
||||
StringUtils.isNotBlank(pattern1) ? TalendQuoteUtils.addQuotes(pattern1)
|
||||
: TalendQuoteUtils.addQuotes("dd-MM-yyyy"));//$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Comment
|
||||
|
||||
@@ -850,6 +850,8 @@ DatabaseForm.hbase.distributionAlert=Distribution must be specified
|
||||
DatabaseForm.impala.distributionAlert=Distribution must be specified
|
||||
DatabaseForm.hbase.versionAlert=HBase version must be specified
|
||||
DatabaseForm.impala.versionAlert=Impala version must be specified
|
||||
DatabaseForm.impala.driverVersion=Impala Driver
|
||||
DatabaseForm.impala.driverVersion.tip=Select a hive impala driver
|
||||
DatabaseForm.maprdb.settings=Version
|
||||
DatabaseForm.maprdb.distribution=Distribution
|
||||
DatabaseForm.maprdb.distribution.tooltip=Set the hadoop distribution
|
||||
|
||||
@@ -89,6 +89,7 @@ import org.talend.core.GlobalServiceRegister;
|
||||
import org.talend.core.ILibraryManagerService;
|
||||
import org.talend.core.ILibraryManagerUIService;
|
||||
import org.talend.core.database.EDatabaseTypeName;
|
||||
import org.talend.core.database.EImpalaDriver;
|
||||
import org.talend.core.database.conn.ConnParameterKeys;
|
||||
import org.talend.core.database.conn.DatabaseConnStrUtil;
|
||||
import org.talend.core.database.conn.EDatabaseConnVar;
|
||||
@@ -214,6 +215,8 @@ public class DatabaseForm extends AbstractForm {
|
||||
*/
|
||||
private LabelledCombo hiveServerVersionCombo;
|
||||
|
||||
private LabelledCombo impalaDriverCombo;
|
||||
|
||||
private LabelledText serverText;
|
||||
|
||||
private LabelledText portText;
|
||||
@@ -980,6 +983,7 @@ public class DatabaseForm extends AbstractForm {
|
||||
.getString("DatabaseForm.dbversion.tip"), new String[0], 2, true); //$NON-NLS-1$
|
||||
|
||||
createHiveServerVersionField(typeDbCompositeParent);
|
||||
createImpalaDriverField(typeDbCompositeParent);
|
||||
|
||||
setHideVersionInfoWidgets(true);
|
||||
|
||||
@@ -1826,7 +1830,7 @@ public class DatabaseForm extends AbstractForm {
|
||||
}
|
||||
|
||||
private void showIfAdditionalJDBCSettings() {
|
||||
setHidAdditionalJDBCSettings(!isSupportHiveAdditionalSettings());
|
||||
setHidAdditionalJDBCSettings(!isSupportHiveAdditionalSettings() && !isSupportImpalaAdditionalSettings());
|
||||
}
|
||||
|
||||
private void showIfHiveMetastore() {
|
||||
@@ -1870,6 +1874,20 @@ public class DatabaseForm extends AbstractForm {
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isSupportImpalaAdditionalSettings() {
|
||||
if (isImpalaDBConnSelected()) {
|
||||
IHDistribution hiveDistribution = getCurrentImpalaDistribution(true);
|
||||
String hiveVerson = getImpalaVersionCombo().getText();
|
||||
if (hiveDistribution != null && hiveVerson != null) {
|
||||
if (!EImpalaDriver.isSupport(hiveDistribution.getDisplayName(), hiveVerson, true, "useCloudLauncher")
|
||||
&& HiveMetadataHelper.doSupportHive2(hiveDistribution.getDisplayName(), hiveVerson, true)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void updateCheckButtonStatus() {
|
||||
if (isHiveDBConnSelected()) {
|
||||
boolean update = HiveMetadataHelper.isHiveWizardCheckEnabled(hiveDistributionCombo.getText(),
|
||||
@@ -3209,6 +3227,7 @@ public class DatabaseForm extends AbstractForm {
|
||||
hcPropertyTypeCombo.setReadOnly(isContextMode());
|
||||
hiveModeCombo.setReadOnly(isContextMode());
|
||||
hiveServerVersionCombo.setReadOnly(isContextMode());
|
||||
impalaDriverCombo.setReadOnly(isContextMode());
|
||||
|
||||
useKerberos.setEnabled(!isContextMode());
|
||||
useKeyTab.setEnabled(!isContextMode());
|
||||
@@ -3745,6 +3764,14 @@ public class DatabaseForm extends AbstractForm {
|
||||
hiveServerVersionCombo.setHideWidgets(true);
|
||||
}
|
||||
|
||||
private void createImpalaDriverField(Composite parent) {
|
||||
impalaDriverCombo = new LabelledCombo(parent, Messages.getString("DatabaseForm.impala.driverVersion"), //$NON-NLS-1$
|
||||
Messages.getString("DatabaseForm.impala.driverVersion.tip"), //$NON-NLS-1$
|
||||
new String[] {}, 2, true);
|
||||
|
||||
impalaDriverCombo.setHideWidgets(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Added by Marvin Wang on Oct. 15, 2012.
|
||||
*
|
||||
@@ -5085,6 +5112,8 @@ public class DatabaseForm extends AbstractForm {
|
||||
}
|
||||
if (isImpalaDBConnSelected()) {
|
||||
fillDefaultsWhenImpalaVersionChanged();
|
||||
} else {
|
||||
doImpalaNotSelected();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5551,8 +5580,10 @@ public class DatabaseForm extends AbstractForm {
|
||||
handleHadoopCustomVersion(ECustomVersionType.HIVE);
|
||||
}
|
||||
});
|
||||
regHiveRelatedWidgetImpalaDriverComboListener();
|
||||
}
|
||||
|
||||
|
||||
private void handleHadoopCustomVersion(final ECustomVersionType type) {
|
||||
HadoopCustomVersionDefineDialog customVersionDialog = new HadoopCustomVersionDefineDialog(getShell(),
|
||||
HadoopVersionControlUtils.getCustomVersionMap(getConnection(), type.getGroup())) {
|
||||
@@ -6525,7 +6556,8 @@ public class DatabaseForm extends AbstractForm {
|
||||
passwordText.hide();
|
||||
} else if (isImpala) {
|
||||
// usernameText.hide();
|
||||
passwordText.hide();
|
||||
// passwordText.hide();
|
||||
impalaDriverCombo.setHideWidgets(false);
|
||||
} else if (isHiveDBConnSelected()) {
|
||||
if (isHiveEmbeddedMode()) {
|
||||
// Need to revert if required, changed by Marvin Wang on Nov. 22, 2012.
|
||||
@@ -6728,6 +6760,8 @@ public class DatabaseForm extends AbstractForm {
|
||||
addContextParams(EDBParamName.Port, true);
|
||||
addContextParams(EDBParamName.Database, true);
|
||||
addContextParams(EDBParamName.ImpalaPrincipal, useKerberosForImpala.getSelection());
|
||||
addContextParams(EDBParamName.Password, true);
|
||||
addContextParams(EDBParamName.hiveAdditionalJDBCParameters, isSupportImpalaAdditionalSettings());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7026,6 +7060,7 @@ public class DatabaseForm extends AbstractForm {
|
||||
if (isImpalaDBConnSelected()) {
|
||||
adaptImpalaHadoopPartEditable();
|
||||
updateHadoopProperties(!isContextMode());
|
||||
additionalJDBCSettingsText.setEditable(!isContextMode());
|
||||
}
|
||||
if (isOracleCustomDBConnSelected()) {
|
||||
adaptOracleCustomPartEditable();
|
||||
@@ -7085,7 +7120,6 @@ public class DatabaseForm extends AbstractForm {
|
||||
|
||||
String useKrb = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_USE_KRB);
|
||||
String impalaPrincipla = connection.getParameters().get(ConnParameterKeys.IMPALA_AUTHENTICATION_PRINCIPLA);
|
||||
|
||||
if (Boolean.valueOf(useKrb)) {
|
||||
useKerberosForImpala.setSelection(true);
|
||||
GridData hadoopData = (GridData) authenticationComForImpala.getLayoutData();
|
||||
@@ -7097,7 +7131,23 @@ public class DatabaseForm extends AbstractForm {
|
||||
authenticationComForImpala.getParent().layout();
|
||||
}
|
||||
impalaPrincipalTxt.setText(impalaPrincipla == null ? "impala/_HOST@EXAMPLE.COM" : impalaPrincipla); //$NON-NLS-1$
|
||||
|
||||
String distributionObj = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_IMPALA_DISTRIBUTION);
|
||||
String impalaVersion = connection.getParameters().get(ConnParameterKeys.CONN_PARA_KEY_IMPALA_VERSION);
|
||||
IHadoopDistributionService hadoopService = getHadoopDistributionService();
|
||||
if (hadoopService != null) {
|
||||
IHDistribution impalaDistribution = hadoopService.getImpalaDistributionManager().getDistribution(distributionObj,
|
||||
false);
|
||||
IHDistributionVersion hdVersion = null;
|
||||
if (impalaDistribution != null) {
|
||||
hdVersion = impalaDistribution.getHDVersion(impalaVersion, false);
|
||||
}
|
||||
updateImpalaVersionPart(impalaDistribution);
|
||||
updateImpalaDriverAndMakeSelection(impalaDistribution, hdVersion);
|
||||
}
|
||||
// addtional jdbc setting
|
||||
String additionalJDBCSettings = connection.getParameters()
|
||||
.get(ConnParameterKeys.CONN_PARA_KEY_HIVE_ADDITIONAL_JDBC_SETTINGS);
|
||||
additionalJDBCSettingsText.setText(additionalJDBCSettings == null ? "" : additionalJDBCSettings);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7483,6 +7533,16 @@ public class DatabaseForm extends AbstractForm {
|
||||
});
|
||||
}
|
||||
|
||||
private void regHiveRelatedWidgetImpalaDriverComboListener() {
|
||||
impalaDriverCombo.getCombo().addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
doImpalaDriverSelected();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a listener for the text widget of metastore connection url, it invokes
|
||||
* {@link #doMetastoreConnURLModify()()} when the text contents is changed. Added by Marvin Wang on Oct 17, 2012.
|
||||
@@ -8068,6 +8128,14 @@ public class DatabaseForm extends AbstractForm {
|
||||
updateHiveServerAndMakeSelection(hiveDistribution, hiveVersion);
|
||||
}
|
||||
|
||||
protected void doImpalaDriverSelected() {
|
||||
if (!isContextMode()) {
|
||||
modifyFieldValue();
|
||||
getConnection().getParameters().put(ConnParameterKeys.IMPALA_DRIVER,
|
||||
EImpalaDriver.getByDisplay(impalaDriverCombo.getText()).getName());
|
||||
}
|
||||
}
|
||||
|
||||
protected void updateHiveDistributionAndMakeSelection(IHDistribution hiveDistribution) {
|
||||
hiveDistributionCombo.getCombo().setItems(HiveMetadataHelper.getDistributionsDisplay());
|
||||
if (hiveDistribution != null) {
|
||||
@@ -8089,6 +8157,18 @@ public class DatabaseForm extends AbstractForm {
|
||||
return hiveDistribution;
|
||||
}
|
||||
|
||||
private IHDistribution getCurrentImpalaDistribution(boolean withDefault) {
|
||||
IHDistribution hiveDistribution = HiveMetadataHelper.getDistribution(impalaDistributionCombo.getText(), true);
|
||||
IHadoopDistributionService hadoopService = getHadoopDistributionService();
|
||||
if (withDefault && hiveDistribution == null && hadoopService != null) {
|
||||
IHDistribution[] distributions = hadoopService.getImpalaDistributionManager().getDistributions();
|
||||
if (distributions.length > 0) {
|
||||
hiveDistribution = distributions[0];
|
||||
}
|
||||
}
|
||||
return hiveDistribution;
|
||||
}
|
||||
|
||||
protected void updateHiveVersionAndMakeSelection(IHDistribution hiveDistribution, IHDistributionVersion hiveVersion) {
|
||||
if (hiveDistribution == null) {
|
||||
hiveDistribution = getCurrentHiveDistribution(true);
|
||||
@@ -8171,6 +8251,43 @@ public class DatabaseForm extends AbstractForm {
|
||||
}
|
||||
}
|
||||
|
||||
protected void updateImpalaDriverAndMakeSelection(IHDistribution hiveDistribution,
|
||||
IHDistributionVersion hiveVersion) {
|
||||
if (hiveDistribution == null) {
|
||||
hiveDistribution = getCurrentHiveDistribution(true);
|
||||
}
|
||||
IHadoopDistributionService hadoopDistributionService = getHadoopDistributionService();
|
||||
if (hiveDistribution == null || hadoopDistributionService == null) {
|
||||
return;
|
||||
}
|
||||
IHDistributionVersion[] hdVersions = hiveDistribution.getHDVersions();
|
||||
if (hiveVersion == null && hdVersions.length > 0) {
|
||||
hiveVersion = hdVersions[0];
|
||||
}
|
||||
|
||||
DatabaseConnection conn = getConnection();
|
||||
String[] impalaDriverDisplay = EImpalaDriver.getImpalaDriverDisplay(hiveDistribution.getName(),
|
||||
hiveVersion == null ? null : hiveVersion.getVersion(), false);
|
||||
if (impalaDriverDisplay != null && impalaDriverDisplay.length == 0) {
|
||||
// hive2 by default
|
||||
impalaDriverCombo.getCombo().setItems(EImpalaDriver.HIVE2.getDisplayName());
|
||||
} else {
|
||||
impalaDriverCombo.getCombo().setItems(impalaDriverDisplay);
|
||||
}
|
||||
String impalaDriver = conn.getParameters().get(ConnParameterKeys.IMPALA_DRIVER);
|
||||
if (impalaDriver != null) {
|
||||
EImpalaDriver driver = EImpalaDriver.getByName(impalaDriver);
|
||||
if (driver != null) {
|
||||
impalaDriverCombo.setText(driver.getDisplayName());
|
||||
} else {
|
||||
impalaDriverCombo.select(0);
|
||||
}
|
||||
} else {
|
||||
impalaDriverCombo.select(0);
|
||||
}
|
||||
getConnection().getParameters().put(ConnParameterKeys.IMPALA_DRIVER,
|
||||
EImpalaDriver.getByDisplay(impalaDriverCombo.getText()).getName());
|
||||
}
|
||||
/**
|
||||
* It is invoked when the mode STANDALONE is selected. Added by Marvin Wang on Aug. 3, 2012.
|
||||
*/
|
||||
@@ -8304,6 +8421,9 @@ public class DatabaseForm extends AbstractForm {
|
||||
doHiveUIContentsLayout();
|
||||
}
|
||||
|
||||
protected void doImpalaNotSelected() {
|
||||
impalaDriverCombo.setHideWidgets(true);
|
||||
}
|
||||
/**
|
||||
* This method is used to handle the groups including version info, hadoop info and metastore info are hide or
|
||||
* visible. Added by Marvin Wang on Oct 16, 2012.
|
||||
@@ -8646,6 +8766,10 @@ public class DatabaseForm extends AbstractForm {
|
||||
return this.hiveVersionCombo;
|
||||
}
|
||||
|
||||
public LabelledCombo getImpalaVersionCombo() {
|
||||
return this.impalaVersionCombo;
|
||||
}
|
||||
|
||||
public ContextType getSelectedContextType() {
|
||||
return this.selectedContextType;
|
||||
}
|
||||
|
||||
@@ -1168,10 +1168,10 @@ public class DatabaseTableForm extends AbstractForm {
|
||||
metadataColumn.setPattern(pattern);// $NON-NLS-1$
|
||||
} else {
|
||||
metadataColumn.setPattern(TalendQuoteUtils.addQuotes("dd-MM-yyyy")); //$NON-NLS-1$
|
||||
}
|
||||
if (EDatabaseTypeName.MSSQL.getDisplayName().equals(metadataconnection.getDbType())) {
|
||||
if ("TIME".equals(metadataColumn.getSourceType())) {
|
||||
metadataColumn.setPattern(TalendQuoteUtils.addQuotes("HH:mm:ss")); //$NON-NLS-1$
|
||||
if (EDatabaseTypeName.MSSQL.getDisplayName().equals(metadataconnection.getDbType())) {
|
||||
if ("TIME".equals(metadataColumn.getSourceType())) {
|
||||
metadataColumn.setPattern(TalendQuoteUtils.addQuotes("HH:mm:ss")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1253,11 +1253,14 @@ public class DatabaseTableForm extends AbstractForm {
|
||||
}
|
||||
oneColum.setSourceType(dbType);
|
||||
if (mappingTypeRetriever != null) {
|
||||
if (JavaTypesManager.DATE.getId().equals(talendType)
|
||||
|| PerlTypesManager.DATE.equals(talendType)) {
|
||||
String pattern1 = getPatternFromMapping(mappingTypeRetriever, dbType);
|
||||
oneColum.setPattern(pattern1);// $NON-NLS-1$
|
||||
if (StringUtils.isBlank(oneColum.getPattern())) {
|
||||
if (JavaTypesManager.DATE.getId().equals(talendType)
|
||||
|| PerlTypesManager.DATE.equals(talendType)) {
|
||||
String pattern1 = getPatternFromMapping(mappingTypeRetriever, dbType);
|
||||
oneColum.setPattern(pattern1);// $NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1305,8 +1308,15 @@ public class DatabaseTableForm extends AbstractForm {
|
||||
}
|
||||
|
||||
private String getPatternFromMapping(MappingTypeRetriever mappingTypeRetriever, String dbType) {
|
||||
String pattern1 = mappingTypeRetriever.getDefaultPattern(metadataconnection.getMapping(), dbType);
|
||||
return StringUtils.isNotBlank(pattern1) ? TalendQuoteUtils.addQuotes(pattern1)
|
||||
boolean isMssql = EDatabaseTypeName.MSSQL.getDisplayName().equals(metadataconnection.getDbType());
|
||||
String pattern = mappingTypeRetriever.getDefaultPattern(metadataconnection.getMapping(), dbType);
|
||||
if (isMssql) {
|
||||
if ("TIME".equals(dbType)) {//$NON-NLS-1$
|
||||
return StringUtils.isNotBlank(pattern) ? TalendQuoteUtils.addQuotes(pattern)
|
||||
: TalendQuoteUtils.addQuotes("HH:mm:ss");//$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
return StringUtils.isNotBlank(pattern) ? TalendQuoteUtils.addQuotes(pattern)
|
||||
: TalendQuoteUtils.addQuotes("dd-MM-yyyy");//$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user