Browse Source

0703 增加对csv文件的支持

allen 3 năm trước cách đây
mục cha
commit
62d6fe3375

BIN
aupload/DriveMotor.xls


+ 6 - 0
pom.xml

@@ -315,6 +315,12 @@
 			<version>3.1</version>
 		</dependency>
 
+		<!-- csv文件解析依赖 -->
+		<dependency>
+			<groupId>net.sf.supercsv</groupId>
+			<artifactId>super-csv-java8</artifactId>
+			<version>2.4.0</version>
+		</dependency>
 	</dependencies>
 
 	<build>

+ 6 - 28
src/main/java/io/renren/modules/dataSet/service/impl/DynamicSystemServiceImpl.java

@@ -134,7 +134,7 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
     public List  getEqumentLimit(String hbaseTableName,Integer limit){
         Connection connection = null;
         Table table = null;
-        System.out.println(hbaseTableName);
+//        System.out.println(hbaseTableName);
         List<Map<String,String>> equmentContextLists = new ArrayList();
         try {
             connection= hBaseTemplate.getConnection();
@@ -170,7 +170,7 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
             }
         }
 
-        equmentContextLists.forEach(System.out::println);
+//        equmentContextLists.forEach(System.out::println);
         return equmentContextLists;
     }
     @Override
@@ -239,13 +239,10 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
             String subEquipmentID = subeqpment.getSubEquipmentID();
             String hbaseTableName = subeqpment.getHbaseTableName();
             final String[] chosedatas = subeqpment.getChosedata();
-            for (String chosedata : chosedatas) {
-                System.out.println(chosedata);
-            }
+
             final Map<String, List<String>> equmentOneColumn = getEqumentOneColumn(hbaseTableName, chosedatas,limit);
             for (String chosedata : chosedatas) {
                 final List<String> strings = equmentOneColumn.get(chosedata);
-                strings.forEach(System.out::println);
                 for (int i = 0; i < 10; i++) {
                     final String s = strings.get(i);
                     final HashMap<String, Object> clumData = new HashMap<>();
@@ -267,8 +264,6 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
 
     @Override
     public String runSave(Map map) {
-        System.out.println("+++++++++++++++++=");
-        System.out.println(map);
         runSave_coal(map);
         Date date = new Date();
         SimpleDateFormat ft = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
@@ -284,7 +279,7 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
         List choosedatas = (List<String>) map.get("chosedata");
         String newFileName  = (String) map.get("newFileName") ;
         String oldFileName = (String)map.get("oldFileName");
-        System.out.println(oldFileName+"--->"+newFileName);
+//        System.out.println(oldFileName+"--->"+newFileName);
         final String userID =  map.get("userID").toString();
         // path 文件保存路径 需要改四次  本类三次  StaticSystemServiceImpl 一次
         String path  = System.getProperty("user.dir")+ File.separator+"csv" + File.separator + userID;  // 文件路径  记得后面的dySubmit也要改
@@ -292,10 +287,9 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
         List<String> fileds = new ArrayList<>();
 
         String[] chooseDates = (String[]) choosedatas.toArray(new String[choosedatas.size()]);
-        final Map<String, List<String>> equmentOneColumn = getEqumentOneColumn(hbaseTableName, chooseDates);
+        final Map<String, List<String>> equmentOneColumn = getEqumentOneColumn(hbaseTableName, chooseDates,1000);
         for (int i = 0; i < choosedatas.size(); i++) {
             filed = (String) choosedatas.get(i);
-            System.out.println(filed);
             // 添加表头
             if(i==0){
                 fileds.add(filed);
@@ -307,9 +301,6 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
             int size = columns.size();
             for (int j = 0; j < size; j++) {
                 String str = JSON.toJSONString(columns.get(j)).replaceAll("\\{|\\}", "");
-//                for (String s : str) {
-//                    System.out.println(s);
-//                }
                 // 判断数据库中的数据是否为空
                 if (str != null && !str.isEmpty()) {
                     if(i==0){
@@ -328,8 +319,7 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
             }
 
         }
-//        System.out.println("66666666666666666666666666666");
-//        fileds.forEach(System.out::println);
+
 
         final File file = new File(path);
         if(!file.isDirectory() && !file.exists()){
@@ -339,14 +329,12 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
         File creatFileName = new File(path,oldFileName+ ".csv");
         if (!creatFileName.exists()) {
             try {
-                System.out.println(oldFileName);
                 creatCSV(creatFileName, fileds);
             } catch (IOException e) {
                 e.printStackTrace();
             }
         }else {
             try {
-                System.out.println(oldFileName+"--->"+newFileName);
                 addColumn(creatFileName,fileds,newFileName+ ".csv",userID);
             } catch (IOException e) {
                 e.printStackTrace();
@@ -392,7 +380,6 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
             for ( line = br.readLine(); line != null || i < fileds.size(); line = br.readLine(),i++)
             {
                 String addedColumn = "";
-//                System.out.println(addlenMax);
                 Integer addlen = 0;
                 if(i >= fileds.size()){
                     for (Integer iteger = 0; iteger < addlenMax; iteger++) {
@@ -432,7 +419,6 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
                 }
 
                 newColumn = line+","+addedColumn+lineSep;
-//                System.out.println(newColumn);
 
                 bw.write(newColumn);
             }
@@ -451,7 +437,6 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
 
     @Override
     public String dySubmit(Map map){
-        System.out.println(map);
         //文件重命名
         String oldname =(String) map.get("oldname");
         String datasetName =(String) map.get("datasetName");
@@ -489,12 +474,6 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
         Long jobID = dySubmit_sava_jobSQL(map, chooseDataSavaID);
 
         dySubmit_sava(map,chooseDataSavaID,jobID);
-//        UserChooseFiled userChooseFiled = new UserChooseFiled();
-//        userChooseFiled.setUserid(userID);
-//        userChooseFiled.setChosefiled(sumChooseFiled);
-//        System.out.println(userChooseFiled);
-//        int insert = userChooseFiledMapper.insert(userChooseFiled);
-//        System.out.println(insert);
         return "111";
     }
 
@@ -556,7 +535,6 @@ public class DynamicSystemServiceImpl implements DynamicSystemService {
             }
             sumChooseFiled = sumChooseFiled+ ";";
         }
-        System.out.println(sumChooseFiled);
         DataSetDychoosedata dataSetDychoosedata = new DataSetDychoosedata();
 
         dataSetDychoosedata.setChooseData(sumChooseFiled);

+ 19 - 5
src/main/java/io/renren/modules/dataSet/service/impl/StaticSystemServiceImpl.java

@@ -6,6 +6,7 @@ import io.minio.PutObjectOptions;
 import io.renren.common.utils.MinIoUtils;
 import io.renren.modules.dataSet.service.StaticSystemService;
 import io.renren.modules.dataSet.upload.NoModelDataListener_pre;
+import io.renren.modules.dataSet.upload.UpLoadService;
 import io.renren.modules.sys.dao.dataset.DataSetMapper;
 import io.renren.modules.sys.entity.dataset.DataSet;
 import org.checkerframework.checker.units.qual.A;
@@ -23,6 +24,9 @@ public class StaticSystemServiceImpl implements StaticSystemService {
 
     @Autowired
     DynamicSystemServiceImpl dynamicSystemService;
+
+    @Autowired
+    UpLoadService upLoadService;
     @Override
     public String runStaticSave(Map onemap1)   {
         System.out.println(onemap1);
@@ -34,13 +38,23 @@ public class StaticSystemServiceImpl implements StaticSystemService {
         final String upUrl = onemap1.get("upUrl").toString();
         final String oldname = onemap1.get("oldFileName").toString();
         final String lastNewFileName = onemap1.get("newFileName").toString();
-
+        final String type = onemap1.get("type").toString();
         String path  = System.getProperty("user.dir")+ File.separator+"csv" + File.separator + userID;
 
-        NoModelDataListener_pre noModelDataListener_pre = new NoModelDataListener_pre(sqls);
-        EasyExcel.read(upUrl, noModelDataListener_pre).doReadAll();
-        final List<Map<String, Object>> allList = noModelDataListener_pre.getAllList();
-//        allList.forEach(System.out::println);
+
+
+        List<Map<String, Object>> allList = null;
+        if ("excel".equals(type)) {
+            NoModelDataListener_pre noModelDataListener_pre = new NoModelDataListener_pre(sqls);
+            EasyExcel.read(upUrl, noModelDataListener_pre).doReadAll();
+            allList = noModelDataListener_pre.getAllList();
+        } else if ("word".equals(type)) {
+            allList = upLoadService.readWithCsvMapReaderColumns(upUrl,sqls,false);
+        } else {
+            allList = new ArrayList<>();
+        }
+
+
 
 
         String oldFileName =path+   File.separator + oldname+".csv";

+ 4 - 4
src/main/java/io/renren/modules/dataSet/upload/NoModelDataListener.java

@@ -36,7 +36,7 @@ public class NoModelDataListener extends AnalysisEventListener<Map<Integer, Stri
 
     @Override
     public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
-        LOGGER.info("解析到一条头数据:{}, currentRowHolder: {}", headMap.toString(), context.readRowHolder().getRowIndex());
+//        LOGGER.info("解析到一条头数据:{}, currentRowHolder: {}", headMap.toString(), context.readRowHolder().getRowIndex());
 //        System.out.println(context.readSheetHolder().getSheetNo());
 //        System.out.println(context.readSheetHolder().getSheetName());
 //        {0=日期标题, 1=字符串标题, 2=数字标题}
@@ -49,7 +49,7 @@ public class NoModelDataListener extends AnalysisEventListener<Map<Integer, Stri
 
     @Override
     public void invoke(Map<Integer, String> data, AnalysisContext context) {
-        LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data));
+//        LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data));
         Map<String,String> newData = new LinkedHashMap<String, String>();
 
         for (Integer i =0;i< (data.values().toArray().length);i++) {
@@ -75,11 +75,11 @@ public class NoModelDataListener extends AnalysisEventListener<Map<Integer, Stri
      * 加上存储数据库
      */
     private void saveData() {
-        LOGGER.info("{}条数据,开始存储数据库!", list.size());
+//        LOGGER.info("{}条数据,开始存储数据库!", list.size());
 //        for (Map<Integer, String> integerStringMap : list) {
 //
 //            needList.add(integerStringMap.get(this.needDataIndex));
 //        }
-        LOGGER.info("存储数据库成功!");
+//        LOGGER.info("存储数据库成功!");
     }
 }

+ 5 - 6
src/main/java/io/renren/modules/dataSet/upload/NoModelDataListener_pre.java

@@ -47,7 +47,7 @@ public class NoModelDataListener_pre extends AnalysisEventListener<Map<Integer,
 
     @Override
     public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
-        LOGGER.info("解析到一条头数据:{}, currentRowHolder: {}", headMap.toString(), context.readRowHolder().getRowIndex());
+//        LOGGER.info("解析到一条头数据:{}, currentRowHolder: {}", headMap.toString(), context.readRowHolder().getRowIndex());
 //        System.out.println(context.readSheetHolder().getSheetNo());
 //        System.out.println(context.readSheetHolder().getSheetName());
 //        {0=日期标题, 1=字符串标题, 2=数字标题}
@@ -60,8 +60,7 @@ public class NoModelDataListener_pre extends AnalysisEventListener<Map<Integer,
                 }
             }
         }
-//        System.out.println("filedMap");
-//        System.out.println(filedMap);
+
 
 
 
@@ -69,7 +68,7 @@ public class NoModelDataListener_pre extends AnalysisEventListener<Map<Integer,
 
     @Override
     public void invoke(Map<Integer, String> data, AnalysisContext context) {
-        LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data));
+//        LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data));
 
 
         Map<String,Object> needdata = new LinkedHashMap<>();
@@ -111,11 +110,11 @@ public class NoModelDataListener_pre extends AnalysisEventListener<Map<Integer,
      * 加上存储数据库
      */
     private void saveData() {
-        LOGGER.info("{}条数据,开始存储数据库!", list.size());
+//        LOGGER.info("{}条数据,开始存储数据库!", list.size());
 //        for (Map<Integer, String> integerStringMap : list) {
 //
 //            needList.add(integerStringMap.get(this.needDataIndex));
 //        }
-        LOGGER.info("存储数据库成功!");
+//        LOGGER.info("存储数据库成功!");
     }
 }

+ 8 - 1
src/main/java/io/renren/modules/dataSet/upload/UpLoadController.java

@@ -40,7 +40,7 @@ public class UpLoadController {
     private UpLoadService upLoadService;
     @PostMapping("upload")
     @ResponseBody
-    public R upload(MultipartFile file) throws IOException {
+    public R uploadExcel(MultipartFile file) throws IOException {
 //        EasyExcel.read(file.getInputStream(), UploadData.class, new UploadDataListener(uploadDAO)).sheet().doRead();
 
         Map map = upLoadService.upload(file);
@@ -50,6 +50,13 @@ public class UpLoadController {
 
     }
 
+    @RequestMapping("uploadcsv")
+    public R uploadCSV(MultipartFile file) throws Exception {
+        System.out.println(file);
+        Map map = upLoadService.uploadCSV(file);
+//        System.out.println(map);
+        return R.ok().put("data",map);
+    }
     @RequestMapping("getstapre")
     public R getstaticprecontent(@RequestBody Map map){
 

+ 126 - 37
src/main/java/io/renren/modules/dataSet/upload/UpLoadService.java

@@ -6,19 +6,21 @@ import com.alibaba.fastjson.JSON;
 import io.renren.common.exception.RRException;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
+import org.supercsv.cellprocessor.ift.CellProcessor;
+import org.supercsv.io.CsvMapReader;
+import org.supercsv.io.ICsvMapReader;
+import org.supercsv.prefs.CsvPreference;
 
 import java.io.File;
+import java.io.FileReader;
 import java.io.IOException;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 @Service
 public class UpLoadService {
     public Map upload(MultipartFile file) throws IOException {
-        Map<String,Object> map = new HashMap<>();
+        Map<String, Object> map = new HashMap<>();
 
 
         if (file.isEmpty()) {
@@ -26,17 +28,17 @@ public class UpLoadService {
         }
         //获取上传的文件的文件名
         String fileName = file.getOriginalFilename();
-        map.put("fileName",fileName);
+        map.put("fileName", fileName);
         //处理文件重名问题
 //        String hzName = fileName.substring(fileName.lastIndexOf("."));
 //        fileName = UUID.randomUUID().toString() + hzName;
         //获取服务器中photo目录的路径
 //        ServletContext servletContext = session.getServletContext();
 //        String photoPath = servletContext.getRealPath("file");
-        String newfileName =  System.getProperty("user.dir") + File.separator + "aupload" + File.separator + fileName;
+        String newfileName = System.getProperty("user.dir") + File.separator + "aupload" + File.separator + fileName;
         File newfile = new File(newfileName);
         file.transferTo(newfile);
-        map.put("upUrl",newfileName);
+        map.put("upUrl", newfileName);
 
         NoModelDataListener noModelDataListener1 = new NoModelDataListener();
         // 读取全部sheet
@@ -49,16 +51,13 @@ public class UpLoadService {
         map.put("columns", headList);
         // 获取excel 内容
         List<Map<String, String>> allDataList = noModelDataListener1.getAllDataList();
-        map.put("excelData",allDataList);
+        map.put("excelData", allDataList);
 
         return map;
     }
-    public List getstaticprecontent(Map map){
-//        System.out.println("555555555");
-//        System.out.println(map);
 
-
-        List<Map<String,Object>> locals = (List<Map<String,Object>>)map.get("loacl");
+    public List getstaticprecontent(Map map) {
+        List<Map<String, Object>> locals = (List<Map<String, Object>>) map.get("loacl");
         List<Map<String, Object>> needLists = new LinkedList<>();
         List<Map<String, Object>> tempLists = new LinkedList<>();
 
@@ -66,48 +65,54 @@ public class UpLoadService {
             final String id = local.get("id").toString();
             final String userID = local.get("userID").toString();
 
-            final String[] sqls = local.get("sql").toString().replaceAll("\\[|\\]","").split(", ");//time, string_title
+            final String[] sqls = local.get("sql").toString().replaceAll("\\[|\\]", "").split(", ");//time, string_title
             String upUrl = local.get("upUrl").toString(); // E:\test\615\renren-fast\aupload\demo 1.xlsx
-//            System.out.println("sql---->" + sqls);
-//            System.out.println("id---->"+ id);
-//            System.out.println("userID---->"+ userID);
-//            System.out.println("upUrl---->"+ upUrl);
-            NoModelDataListener_pre noModelDataListener_pre = new NoModelDataListener_pre(sqls,id);
-            // 读取全部sheet
-            // 这里需要注意 DemoDataListener的doAfterAllAnalysed 会在每个sheet读取完毕后调用一次。然后所有sheet都会往同一个DemoDataListener里面写
-            EasyExcel.read(upUrl, noModelDataListener_pre).doReadAll();
-            List<Map<String, Object>> allNeedLists = noModelDataListener_pre.getNeedList();
+            String type = local.get("type").toString();
+            List<Map<String, Object>> allNeedLists = null;
+            if ("excel".equals(type)) {
+                NoModelDataListener_pre noModelDataListener_pre = new NoModelDataListener_pre(sqls, id);
+                // 读取全部sheet
+                // 这里需要注意 DemoDataListener的doAfterAllAnalysed 会在每个sheet读取完毕后调用一次。然后所有sheet都会往同一个DemoDataListener里面写
+                EasyExcel.read(upUrl, noModelDataListener_pre).doReadAll();
+                allNeedLists = noModelDataListener_pre.getNeedList();
+            } else if ("word".equals(type)) {
+                allNeedLists = readWithCsvMapReaderColumns(upUrl,id,sqls,true);
+            } else {
+                allNeedLists = new ArrayList<>();
+            }
+
             Integer needNumber = 1;
             for (Map<String, Object> allNeedList : allNeedLists) {
-                if(needNumber <= 10){
-                    allNeedList.put("id",needNumber);
+                if (needNumber <= 10) {
+                    allNeedList.put("id", needNumber);
                     tempLists.add(allNeedList);
-                    needNumber ++;
+                    needNumber++;
                 }
 
             }
             // 利用临时遍历 tempLists 存储每次遍历获取到了数据
-            if(needLists.isEmpty()){
+            if (needLists.isEmpty()) {
                 needLists = tempLists;
-            }else {
+            } else {
                 needLists.addAll(tempLists);
                 needLists = subListMap(needLists);
             }
-            needLists.forEach(System.out::println);
+//            needLists.forEach(System.out::println);
         }
 
-        List<Map<String,Object>> datas = (List<Map<String,Object>>)map.get("data");
+        List<Map<String, Object>> datas = (List<Map<String, Object>>) map.get("data");
         Integer data_i = 1;
         for (Map data : datas) {
-            data.put("id",data_i);
+            data.put("id", data_i);
             data_i++;
 //            System.out.println(data);
         }
         datas.addAll(needLists);
         return subListMap(datas);
     }
-    private List subListMap(List<Map<String, Object>> datas){
-        List<Map<String,Object>> combine = datas.stream()
+
+    private List subListMap(List<Map<String, Object>> datas) {
+        List<Map<String, Object>> combine = datas.stream()
                 .collect(Collectors.groupingBy(group -> group.get("id").toString())) // 根据map中id的value值进行分组, 这一步的返回结果Map<String,List<Map<String, Object>>>,目的是将相同id下的value归类到一个value下
                 .entrySet() // 得到Set<Map.Entry<String, List<Map<String, Object>>>
                 .stream() // 使用Java8的流
@@ -120,10 +125,94 @@ public class UpLoadService {
                             .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (m1, m2) -> m2));
                     return collect;
                 }).collect(Collectors.toList());
-//        combine.forEach(System.err::println);
-//        System.out.println("++++++++++++++++");
-//        combine.forEach(System.out::println);
         return combine;
     }
+
+    public Map uploadCSV(MultipartFile file) throws Exception {
+        Map<String, Object> map = new HashMap<>();
+
+
+        if (file.isEmpty()) {
+            throw new RRException("上传文件不能为空");
+        }
+        //获取上传的文件的文件名
+        String fileName = file.getOriginalFilename();
+        map.put("fileName", fileName);
+        String newfileName = System.getProperty("user.dir") + File.separator + "aupload" + File.separator + fileName;
+        File newfile = new File(newfileName);
+        file.transferTo(newfile);
+        map.put("upUrl", newfileName);
+
+
+        return readWithCsvMapReader(newfileName, map, false);
+    }
+
+    public Map readWithCsvMapReader(String fileName, Map map, boolean isPre) throws Exception {
+
+        ICsvMapReader mapReader = null;
+        try {
+            mapReader = new CsvMapReader(new FileReader(fileName), CsvPreference.STANDARD_PREFERENCE);
+
+            // the header columns are used as the keys to the Map
+            final String[] header = mapReader.getHeader(true);
+            map.put("columns", header);
+            final CellProcessor[] processors = new CellProcessor[mapReader.length()];
+
+            Map<String, Object> customerMap;
+            ArrayList<Map<String, Object>> allDataList = new ArrayList<>();
+            int limit = 10;
+            while (limit > 0 && (customerMap = mapReader.read(header, processors)) != null) {
+                allDataList.add(customerMap);
+                if (isPre) {
+                    limit--;
+                }
+            }
+            map.put("excelData", allDataList);
+        } finally {
+            if (mapReader != null) {
+                mapReader.close();
+            }
+        }
+        return map;
+    }
+
+    public ArrayList<Map<String, Object>> readWithCsvMapReaderColumns(String fileName, String id,String[] columns, boolean isPre) {
+        HashMap<String, ArrayList> map = new HashMap<>();
+        try {
+            readWithCsvMapReader(fileName, map, isPre);
+            ArrayList<Map<String, String>> allDataList = map.get("excelData");
+            ArrayList<Map<String, Object>> dataList = new ArrayList<>();
+            HashMap<String, String> hashMap = new HashMap<>(columns.length);
+            for (Map<String, String> oneColumn : allDataList) {
+                for (String column : columns) {
+                    hashMap.put(id + "_" +column,oneColumn.get(column));
+                }
+                dataList.add(new HashMap<>(hashMap));
+            }
+            return dataList;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return new ArrayList<>();
+    }
+    public ArrayList<Map<String, Object>> readWithCsvMapReaderColumns(String fileName,String[] columns, boolean isPre) {
+        HashMap<String, ArrayList> map = new HashMap<>();
+        try {
+            readWithCsvMapReader(fileName, map, isPre);
+            ArrayList<Map<String, String>> allDataList = map.get("excelData");
+            ArrayList<Map<String, Object>> dataList = new ArrayList<>();
+            HashMap<String, String> hashMap = new HashMap<>(columns.length);
+            for (Map<String, String> oneColumn : allDataList) {
+                for (String column : columns) {
+                    hashMap.put(column,oneColumn.get(column));
+                }
+                dataList.add(new HashMap<>(hashMap));
+            }
+            return dataList;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return new ArrayList<>();
+    }
 }
 

+ 2 - 0
src/main/resources/application.yml

@@ -127,6 +127,8 @@ argo:
   sparkMasterRest: spark://150.158.138.99:16066
   sparkMaster: spark://150.158.138.99:7077
   sparkHdfsurl: hdfs://150.158.138.99:8020
+  sparkYarnAddress: spark://150.158.138.99:8088
+  sparkYarnJARS: hdfs://150.158.138.99:8020
 #kubenetes  Argo部分获取pod日志
 Akubenetes:
   basepath: https://42.192.195.253:6443