Skip to content

Commit

Permalink
upgrade doris dataXWriter from dorisdb to the refresh version store in
Browse files Browse the repository at this point in the history
  • Loading branch information
baisui1981 committed Sep 17, 2022
1 parent 2116853 commit f879505
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions doriswriter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ under the License.
<groupId>com.qlangtech.tis</groupId>
<artifactId>tis-plugin</artifactId>
</dependency>

</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.alibaba.datax.plugin.rdbms.writer.Constant;
import com.alibaba.druid.sql.parser.ParserException;
import com.google.common.base.Strings;
import com.qlangtech.tis.offline.DataxUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import com.qlangtech.tis.datax.impl.DataxWriter;
import com.qlangtech.tis.extension.Describable;
import com.qlangtech.tis.offline.DataxUtils;
import com.qlangtech.tis.plugin.KeyedPluginStore;
import com.qlangtech.tis.plugin.ds.IDataSourceFactoryGetter;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.ImmutableTriple;
Expand Down Expand Up @@ -820,15 +819,17 @@ public static void loadDriverClass(String pluginType, String pluginName) {

public static IDataSourceFactoryGetter getWriterDataSourceFactoryGetter(Configuration config) {
return getDataSourceFactoryGetter(config, (dataXName) -> {
KeyedPluginStore<DataxWriter> pluginStore = DataxWriter.getPluginStore(null, dataXName);
return pluginStore.getPlugin();
return DataxWriter.load(null, dataXName);
// KeyedPluginStore<DataxWriter> pluginStore = DataxWriter.getPluginStore(null, dataXName);
// return pluginStore.getPlugin();
});
}

public static IDataSourceFactoryGetter getReaderDataSourceFactoryGetter(Configuration config) {
return getDataSourceFactoryGetter(config, (dataXName) -> {
KeyedPluginStore<DataxReader> pluginStore = DataxReader.getPluginStore(null, dataXName);
return pluginStore.getPlugin();
return DataxReader.load(null, dataXName);
// KeyedPluginStore<DataxReader> pluginStore = DataxReader.getPluginStore(null, dataXName);
// return pluginStore.getPlugin();
});
}

Expand Down

0 comments on commit f879505

Please sign in to comment.