From a8f65bcd1e7b1f656a883b0fa6314b5a058294bd Mon Sep 17 00:00:00 2001 From: mozhenghua Date: Tue, 7 Feb 2023 21:04:17 +0800 Subject: [PATCH] enable TIS dataFlow offline process,make DataXReader DataXWriter StoreResType aware --- .../datax/plugin/rdbms/util/DBUtil.java | 28 +++++++------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/util/DBUtil.java b/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/util/DBUtil.java index 6cceed9fb3..53539e4b24 100755 --- a/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/util/DBUtil.java +++ b/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/util/DBUtil.java @@ -11,7 +11,6 @@ import com.google.common.collect.Lists; import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.qlangtech.tis.TIS; -import com.qlangtech.tis.datax.impl.DataxReader; import com.qlangtech.tis.datax.impl.DataxWriter; import com.qlangtech.tis.offline.DataxUtils; import com.qlangtech.tis.plugin.KeyedPluginStore; @@ -872,23 +871,16 @@ public static IDataSourceFactoryGetter getWriterDataSourceFactoryGetter(Configur public static IDataSourceFactoryGetter getReaderDataSourceFactoryGetter(Configuration config) { return getDataSourceFactoryGetter(config, (res) -> { - if (res.resType == KeyedPluginStore.StoreResourceType.DataApp) { - return DataxReader.load(null, res.resourceName); - } else { - return new IDataSourceFactoryGetter() { - @Override - public DataSourceFactory getDataSourceFactory() { - return TIS.getDataBasePlugin(new PostedDSProp(res.dbFactoryId)); - } - @Override - public Integer getRowFetchSize() { - return 2000; - } - }; - } - -// KeyedPluginStore pluginStore = DataxReader.getPluginStore(null, dataXName); -// return pluginStore.getPlugin(); + return new IDataSourceFactoryGetter() { + @Override + public DataSourceFactory getDataSourceFactory() { + return TIS.getDataBasePlugin(new PostedDSProp(res.dbFactoryId)); + } + @Override + public Integer getRowFetchSize() { + return 2000; + } + }; }); }