|
@@ -1,15 +1,20 @@
|
|
|
package com.sagacloud.util.compute_engine.fjd;
|
|
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
+import cn.hutool.core.io.resource.ResourceUtil;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.alibaba.fastjson.JSONReader;
|
|
|
import com.sagacloud.repository.HBaseSaveManagerRepository;
|
|
|
import com.sagacloud.util.compute_engine.util.ConstantCE;
|
|
|
import com.sagacloud.util.compute_engine.util.QueryUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.zillion.util.json.FastJsonReaderUtil;
|
|
|
+import org.zillion.util.json.FastJsonUtil;
|
|
|
|
|
|
import java.io.File;
|
|
|
+import java.io.InputStreamReader;
|
|
|
+import java.io.Reader;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -208,7 +213,12 @@ public class TableUtil {
|
|
|
if (table_name.startsWith("fjd_3")) {
|
|
|
file_name = "fjd_2" + table_name.substring("fjd_2".length());
|
|
|
}
|
|
|
- JSONObject table_schema = FastJsonReaderUtil.Instance().ReadJSONObject(FileUtil.file("def_" + file_name + ".json"));
|
|
|
+ //JSONObject table_schema = FastJsonReaderUtil.Instance().ReadJSONObject(FileUtil.file("def_" + file_name + ".json"));
|
|
|
+ JSONReader json_reader = new JSONReader(ResourceUtil.getUtf8Reader("def_" + file_name + ".json"));
|
|
|
+ Object result = json_reader.readObject();
|
|
|
+ FastJsonUtil.Normalize(result);
|
|
|
+ JSONObject table_schema = (JSONObject)result;
|
|
|
+
|
|
|
JSONArray Indexes = (JSONArray) table_schema.get("Indexes");
|
|
|
table_schema.remove("Indexes");
|
|
|
try {
|