Skip to content

Commit

Permalink
enable TIS dataFlow offline process,make DataXReader DataXWriter Stor…
Browse files Browse the repository at this point in the history
…eResType aware
  • Loading branch information
baisui1981 committed Feb 7, 2023
1 parent 67906a0 commit a8f65bc
Showing 1 changed file with 10 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<DataxReader> 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;
}
};
});
}

Expand Down

0 comments on commit a8f65bc

Please sign in to comment.