Browse Source

日志表增加主建

shaohongbo 3 years ago
parent
commit
8187d6d941

+ 2 - 2
src/main/java/com/persagy/apm/diagnose/indicatorrecord/service/impl/MonitorIndicatorRecordServiceImpl.java

@@ -180,7 +180,7 @@ public class MonitorIndicatorRecordServiceImpl implements IMonitorIndicatorRecor
                 save.setComputeRound(projectIndicatorCompute==null?1:projectIndicatorCompute.getComputeRound());
                 save.setLogInfo(CommonUtils.getExceptionStackTrace(e));
                 save.setLogTime(new Date());
-                save.setId(UUID.randomUUID().toString());
+//                save.setId(UUID.randomUUID().toString());
                 coredao.save(save);
                 e.printStackTrace();
             }
@@ -502,7 +502,7 @@ public class MonitorIndicatorRecordServiceImpl implements IMonitorIndicatorRecor
 
                 IndicatorComputeLog save = new IndicatorComputeLog();
                 save.setProject(projectDTO.getProjectId());
-                save.setId(UUID.randomUUID().toString());
+//                save.setId(UUID.randomUUID().toString());
                 save.setCode(alarmItemCode);
                 save.setObjId(objId);
                 save.setLogType(EnumComputeLogType.SendDataType.getCode());

+ 4 - 8
src/main/java/com/persagy/framework/ems/data/pojo/hbase/IndicatorComputeLog.java

@@ -15,22 +15,18 @@ import java.util.Date;
 @Entity(name = "IndicatorComputeLog")
 @Table(name = "indicator_compute_log", comment = "运行诊断计算发数日志", schema = Schema.UDM,
 		indexes = {
-				@Index(columns = {"c_id"},unique = true),
-				@Index(columns = {"project", "obj_id", "code", "log_time"}),
-				@Index(columns = {"project", "obj_id", "code","log_type","log_time"}),
+				@Index(columns = {"project","obj_id","code","log_type","log_time"},unique = true),
+				@Index(columns = {"project", "obj_id", "code", "log_time","data_time"}),
+				@Index(columns = {"project", "obj_id", "code","log_type","log_time","data_time"}),
 				@Index(columns = {"project", "obj_id", "code","log_type","data_time"})
 		})
 @Dimension
-@TimePatition(column = "data_time", type = TimePatitionType.month)
+@TimePatition(column = "log_time", type = TimePatitionType.month)
 @Data
 public class IndicatorComputeLog extends BusinessObject {
 
 	private static final long serialVersionUID = 9123470427203487460L;
 
-	@Column(order = 10, name = "c_id", length = 50, nullable = false, comment = "项目/建筑id")
-	@JsonProperty("id")
-	private String id;
-
 	@Column(order = 20, name = "project", length = 50, nullable = false, comment = "项目/建筑id")
 	@JsonProperty("project")
 	private String project;