upgrade fastjson 1.2.58
This commit is contained in:
@@ -29,7 +29,10 @@ public class JsonUtils {
|
||||
SerializeConfig.getGlobalInstance().put(InetAddress.class, InetAddressSerializer.instance);
|
||||
SerializeConfig.getGlobalInstance().put(Inet4Address.class, InetAddressSerializer.instance);
|
||||
SerializeConfig.getGlobalInstance().put(Inet6Address.class, InetAddressSerializer.instance);
|
||||
ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
|
||||
// ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
|
||||
|
||||
ParserConfig.getGlobalInstance().addAccept("com.alibaba.otter.");
|
||||
ParserConfig.getGlobalInstance().addAccept("com.taobao.tddl.dbsync.");
|
||||
}
|
||||
|
||||
public static <T> T unmarshalFromByte(byte[] bytes, Class<T> targetClass) {
|
||||
|
||||
+23
@@ -3,6 +3,7 @@ package com.alibaba.otter.canal.parse.inbound.mysql.tsdb;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.net.URL;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
@@ -12,7 +13,9 @@ import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import com.alibaba.fastsql.sql.repository.Schema;
|
||||
import com.alibaba.otter.canal.parse.inbound.TableMeta;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
/**
|
||||
* @author agapple 2017年8月1日 下午7:15:54
|
||||
@@ -66,4 +69,24 @@ public class MemoryTableMeta_DDL_Test {
|
||||
System.out.println(meta);
|
||||
Assert.assertTrue(meta.getFields().get(0).getColumnName().equalsIgnoreCase("id"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_any() throws Throwable {
|
||||
MemoryTableMeta memoryTableMeta = new MemoryTableMeta();
|
||||
URL url = Thread.currentThread().getContextClassLoader().getResource("dummy.txt");
|
||||
File dummyFile = new File(url.getFile());
|
||||
File create = new File(dummyFile.getParent() + "/ddl", "ddl_any.sql");
|
||||
String sql = StringUtils.join(IOUtils.readLines(new FileInputStream(create)), "\n");
|
||||
memoryTableMeta.apply(null, "test", sql, null);
|
||||
|
||||
List<String> tableNames = Lists.newArrayList();
|
||||
for (Schema schema : memoryTableMeta.getRepository().getSchemas()) {
|
||||
tableNames.addAll(schema.showTables());
|
||||
}
|
||||
|
||||
for (String table : tableNames) {
|
||||
TableMeta sourceMeta = memoryTableMeta.find("test", table);
|
||||
System.out.println(sourceMeta.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE procs_priv (
|
||||
Host char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
Db char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
User char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
Routine_name char(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
|
||||
Routine_type enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
|
||||
Grantor char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
Proc_priv set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
|
||||
Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (Host,Db,User,Routine_name,Routine_type),
|
||||
KEY Grantor (Grantor)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
|
||||
@@ -98,6 +98,7 @@
|
||||
<java_source_version>1.8</java_source_version>
|
||||
<java_target_version>1.8</java_target_version>
|
||||
<file_encoding>UTF-8</file_encoding>
|
||||
<javadoc_skip>true</javadoc_skip>
|
||||
<spring_version>3.2.18.RELEASE</spring_version>
|
||||
<rocketmq_version>4.5.2</rocketmq_version>
|
||||
<maven-jacoco-plugin.version>0.8.3</maven-jacoco-plugin.version>
|
||||
@@ -221,7 +222,7 @@
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.28</version>
|
||||
<version>1.2.58</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
@@ -417,6 +418,7 @@
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<skip>${javadoc_skip}</skip>
|
||||
<!-- workaround for https://bugs.openjdk.java.net/browse/JDK-8212233 -->
|
||||
<javaApiLinks>
|
||||
<property>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.alibaba.otter.cancel.store.memory.buffer;
|
||||
package com.alibaba.otter.canal.store.memory.buffer;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.alibaba.otter.cancel.store.memory.buffer;
|
||||
package com.alibaba.otter.canal.store.memory.buffer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.alibaba.otter.cancel.store.memory.buffer;
|
||||
package com.alibaba.otter.canal.store.memory.buffer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.alibaba.otter.cancel.store.memory.buffer;
|
||||
package com.alibaba.otter.canal.store.memory.buffer;
|
||||
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.alibaba.otter.cancel.store.memory.buffer;
|
||||
package com.alibaba.otter.canal.store.memory.buffer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
Reference in New Issue
Block a user