Commit 05bd9885715b3936ccf508cb96876542d259058a

Authored by 潘钊
1 parent 3cd40e68

update...

src/main/java/com/bsth/data/gpsdata_v2/DataHandleProcess.java
... ... @@ -75,36 +75,13 @@ public class DataHandleProcess {
75 75  
76 76 List<Future> fRs = new ArrayList<>(ks.size());
77 77 for (Integer index : ks) {
78   - fRs.add(threadPool.submit(new SignalHandleThread(dataListMap.get(index), count)));
  78 + threadPool.submit(new SignalHandleThread(dataListMap.get(index), count));
79 79 }
80 80  
81   - //按线路分组gps
82   - /*ArrayListMultimap multimap = ArrayListMultimap.create();
83   - for (GpsEntity gps : list) {
84   - multimap.put(gps.getLineId(), gps);
85   - }
86   -
87   - Set<String> ks = multimap.keySet();
88   -
89   - logger.info("analyse gps size: " + list.size() + ", ks: " + ks.size());
90   - count = new CountDownLatch(ks.size());
91   -
92   - for (String lineCode : ks) {
93   - threadPool.execute(new SignalHandleThread(multimap.get(lineCode), count));
94   - }*/
95 81  
96 82 //等待子线程结束
97 83 count.await();
98 84  
99   - for (Future f : fRs) {
100   - try {
101   - f.get();
102   - } catch (InterruptedException e) {
103   - } catch (ExecutionException e) {
104   - logger.error(e.getCause().getMessage());
105   - }
106   - }
107   -
108 85 //加入实时gps对照
109 86 for (GpsEntity gps : list)
110 87 gpsRealData.put(gps);
... ...