diff --git a/core/src/main/java/com/alibaba/datax/core/util/container/LoadUtil.java b/core/src/main/java/com/alibaba/datax/core/util/container/LoadUtil.java index 9a6a830291..ec64e73ce2 100755 --- a/core/src/main/java/com/alibaba/datax/core/util/container/LoadUtil.java +++ b/core/src/main/java/com/alibaba/datax/core/util/container/LoadUtil.java @@ -12,8 +12,8 @@ import com.alibaba.datax.core.util.FrameworkErrorCode; import org.apache.commons.lang3.StringUtils; -import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; /** * Created by jingxing on 14-8-24. @@ -44,12 +44,12 @@ public String value() { * 所有插件配置放置在pluginRegisterCenter中,为区别reader、transformer和writer,还能区别 * 具体pluginName,故使用pluginType.pluginName作为key放置在该map中 */ - private static Configuration pluginRegisterCenter; + private static ThreadLocal pluginRegisterCenter = new InheritableThreadLocal<>(); /** * jarLoader的缓冲 */ - private static Map jarLoaderCenter = new HashMap(); + private static Map jarLoaderCenter = new ConcurrentHashMap(); /** * 设置pluginConfigs,方便后面插件来获取 @@ -57,7 +57,7 @@ public String value() { * @param pluginConfigs */ public static void bind(Configuration pluginConfigs) { - pluginRegisterCenter = pluginConfigs; + pluginRegisterCenter.set(pluginConfigs); } private static String generatePluginKey(PluginType pluginType, @@ -68,7 +68,7 @@ private static String generatePluginKey(PluginType pluginType, private static Configuration getPluginConf(PluginType pluginType, String pluginName) { - Configuration pluginConf = pluginRegisterCenter + Configuration pluginConf = pluginRegisterCenter.get() .getConfiguration(generatePluginKey(pluginType, pluginName)); if (null == pluginConf) { diff --git a/core/src/main/job/job.json b/core/src/main/job/job.json index cc35387778..1fdc620be9 100755 --- a/core/src/main/job/job.json +++ b/core/src/main/job/job.json @@ -20,11 +20,11 @@ "type": "string" }, { - "value": 19890604, + "value": 19491001, "type": "long" }, { - "value": "1989-06-04 00:00:00", + "value": "1949-10-01 00:00:00", "type": "date" }, { diff --git a/elasticsearchwriter/doc/elasticsearchwriter.md b/elasticsearchwriter/doc/elasticsearchwriter.md index 9a22f13c22..2e09247198 100644 --- a/elasticsearchwriter/doc/elasticsearchwriter.md +++ b/elasticsearchwriter/doc/elasticsearchwriter.md @@ -183,9 +183,9 @@ ``` {"value": "1.1.1.1", "type": "string"}, -{"value": 19890604.0, "type": "double"}, -{"value": 19890604, "type": "long"}, -{"value": 19890604, "type": "long"}, +{"value": 19491001.0, "type": "double"}, +{"value": 19491001, "type": "long"}, +{"value": 19491001, "type": "long"}, {"value": "hello world", "type": "string"}, {"value": "hello world", "type": "string"}, {"value": "41.12,-71.34", "type": "string"}, diff --git a/selectdbwriter/doc/stream2selectdb.json b/selectdbwriter/doc/stream2selectdb.json index d5e14c4884..ee3ac75dbf 100644 --- a/selectdbwriter/doc/stream2selectdb.json +++ b/selectdbwriter/doc/stream2selectdb.json @@ -21,11 +21,11 @@ }, { "type":"int", - "value":19890604 + "value":19491001 }, { "type":"date", - "value":"1989-06-04 00:00:00" + "value":"1949-10-01 00:00:00" }, { "type":"bool", diff --git a/transformer/doc/transformer.md b/transformer/doc/transformer.md index 0a00dbaa9c..30aa0ccbaa 100644 --- a/transformer/doc/transformer.md +++ b/transformer/doc/transformer.md @@ -145,11 +145,11 @@ String code3 = "Column column = record.getColumn(1);\n" + "type": "string" }, { - "value": 19890604, + "value": 19491001, "type": "long" }, { - "value": "1989-06-04 00:00:00", + "value": "1949-10-01 00:00:00", "type": "date" }, {