为日志添加clickhouse数据源及添加开关切换
This commit is contained in:
@@ -17,7 +17,6 @@ import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.nis.web.service.AuditLogThread;
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -30,8 +29,10 @@ import com.nis.restful.RestBusinessCode;
|
||||
import com.nis.restful.RestConstants;
|
||||
import com.nis.restful.RestResult;
|
||||
import com.nis.restful.RestServiceException;
|
||||
import com.nis.util.Configurations;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.web.service.AuditLogThread;
|
||||
import com.nis.web.service.ServicesRequestLogService;
|
||||
|
||||
/**
|
||||
@@ -44,6 +45,7 @@ import com.nis.web.service.ServicesRequestLogService;
|
||||
public class BaseRestController {
|
||||
protected final Logger logger = Logger.getLogger(this.getClass());
|
||||
private SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
|
||||
|
||||
/**
|
||||
*
|
||||
* @Title: serviceResponse
|
||||
@@ -64,7 +66,7 @@ public class BaseRestController {
|
||||
*/
|
||||
|
||||
public Map serviceResponse(AuditLogThread thread, long time, HttpServletRequest request,
|
||||
HttpServletResponse response, String msg) {
|
||||
HttpServletResponse response, String msg) {
|
||||
RestResult restResult = new RestResult();
|
||||
String requestMethod = request.getMethod();
|
||||
if (requestMethod.equals(RequestMethod.GET.name())) {
|
||||
@@ -110,7 +112,7 @@ public class BaseRestController {
|
||||
* @version V1.0
|
||||
*/
|
||||
public Map serviceResponse(AuditLogThread thread, long time, HttpServletRequest request,
|
||||
HttpServletResponse response, String msg, Object data) {
|
||||
HttpServletResponse response, String msg, Object data) {
|
||||
RestResult restResult = new RestResult();
|
||||
String requestMethod = request.getMethod();
|
||||
if (requestMethod.equals(RequestMethod.GET.name())) {
|
||||
@@ -135,10 +137,7 @@ public class BaseRestController {
|
||||
new Thread(thread).start();
|
||||
return convert(restResult);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 不将日志插入到数据库中,只返回到前台
|
||||
* @param time
|
||||
@@ -148,8 +147,8 @@ public class BaseRestController {
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
public Map testServiceResponse(long time, HttpServletRequest request,
|
||||
HttpServletResponse response, String msg, Object data) {
|
||||
public Map testServiceResponse(long time, HttpServletRequest request, HttpServletResponse response, String msg,
|
||||
Object data) {
|
||||
RestResult restResult = new RestResult();
|
||||
String requestMethod = request.getMethod();
|
||||
if (requestMethod.equals(RequestMethod.GET.name())) {
|
||||
@@ -192,7 +191,7 @@ public class BaseRestController {
|
||||
* @version V1.0
|
||||
*/
|
||||
public Map compileServiceResponse(AuditLogThread thread, long time, HttpServletRequest request,
|
||||
HttpServletResponse response, String msg, Object data) {
|
||||
HttpServletResponse response, String msg, Object data) {
|
||||
RestResult restResult = new RestResult();
|
||||
String requestMethod = request.getMethod();
|
||||
if (requestMethod.equals(RequestMethod.GET.name())) {
|
||||
@@ -219,18 +218,18 @@ public class BaseRestController {
|
||||
return convert(restResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* 日志结果响应格式规范
|
||||
* @param auditLogThread
|
||||
* @param executedTime
|
||||
* @param request
|
||||
* @param msg
|
||||
* @param data
|
||||
* @param logSource
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 日志结果响应格式规范
|
||||
* @param auditLogThread
|
||||
* @param executedTime
|
||||
* @param request
|
||||
* @param msg
|
||||
* @param data
|
||||
* @param logSource
|
||||
* @return
|
||||
*/
|
||||
public Map serviceLogResponse(AuditLogThread auditLogThread, long executedTime, HttpServletRequest request,
|
||||
String msg, Object data, Integer logSource) {
|
||||
String msg, Object data, Integer logSource) {
|
||||
RestResult restResult = new RestResult();
|
||||
String requestMethod = request.getMethod();
|
||||
if (requestMethod.equals(RequestMethod.GET.name())) {
|
||||
@@ -251,8 +250,8 @@ public class BaseRestController {
|
||||
restResult.setMsg(msg);
|
||||
restResult.setLogSource(logSource);
|
||||
restResult.setTraceCode(auditLogThread.getTraceCode());
|
||||
auditLogThread.setConsumerTime(executedTime);
|
||||
auditLogThread.setBusinessCode(restResult.getBusinessCode().getValue());
|
||||
auditLogThread.setConsumerTime(executedTime);
|
||||
auditLogThread.setBusinessCode(restResult.getBusinessCode().getValue());
|
||||
new Thread(auditLogThread).start();
|
||||
return convert(restResult);
|
||||
}
|
||||
@@ -359,19 +358,19 @@ public class BaseRestController {
|
||||
}
|
||||
}
|
||||
|
||||
protected AuditLogThread saveRequestLog(ServicesRequestLogService service, int opAction,
|
||||
HttpServletRequest request, Object data) {
|
||||
protected AuditLogThread saveRequestLog(ServicesRequestLogService service, int opAction, HttpServletRequest request,
|
||||
Object data) {
|
||||
logger.debug("SaveRequestLogThread初始化开始----" + System.currentTimeMillis());
|
||||
AuditLogThread thread = AuditLogThread.getNewSaveRequestLogThread(request);
|
||||
thread.setService(service);
|
||||
thread.setOpAction(opAction);
|
||||
thread.setTraceCode(sdf.format(new Date())+(Math.round((Math.random()*9+1)*10000)+""));
|
||||
thread.setTraceCode(sdf.format(new Date()) + (Math.round((Math.random() * 9 + 1) * 10000) + ""));
|
||||
if (data != null && ConfigCommonSource.class.isAssignableFrom(data.getClass())) {
|
||||
ConfigCommonSource source = (ConfigCommonSource) data;
|
||||
thread.setOperator(source.getOperator());
|
||||
thread.setVersion(source.getVersion());
|
||||
thread.setOpTime(source.getOpTime());
|
||||
}else{
|
||||
} else {
|
||||
thread.setOperator("admin");
|
||||
thread.setOpTime(new Date());
|
||||
}
|
||||
@@ -381,13 +380,13 @@ public class BaseRestController {
|
||||
}
|
||||
|
||||
// 文件上传用
|
||||
protected AuditLogThread saveRequestLog(ServicesRequestLogService service, int opAction,
|
||||
HttpServletRequest request, Object data, Object fileInfo) {
|
||||
protected AuditLogThread saveRequestLog(ServicesRequestLogService service, int opAction, HttpServletRequest request,
|
||||
Object data, Object fileInfo) {
|
||||
AuditLogThread thread = AuditLogThread.getNewSaveRequestLogThread(request);
|
||||
thread.setService(service);
|
||||
// thread.setContent(fileInfo);
|
||||
// thread.setContent(fileInfo);
|
||||
thread.setOpAction(opAction);
|
||||
thread.setTraceCode(sdf.format(new Date())+(Math.round((Math.random()*9+1)*10000)+""));
|
||||
thread.setTraceCode(sdf.format(new Date()) + (Math.round((Math.random() * 9 + 1) * 10000) + ""));
|
||||
if (data != null && ConfigCommonSource.class.isAssignableFrom(data.getClass())) {
|
||||
System.out.println(data.getClass().getSimpleName());
|
||||
ConfigCommonSource source = (ConfigCommonSource) data;
|
||||
@@ -398,4 +397,12 @@ public class BaseRestController {
|
||||
return thread;
|
||||
|
||||
}
|
||||
|
||||
protected String getTableName(String key, String defaultTableName) {
|
||||
if (Constants.ISUSECLICKHOUSE) {
|
||||
key = key.replace("HiveTable", "ClickHouseTable");
|
||||
}
|
||||
return Configurations.getStringProperty(key, defaultTableName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class LogController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, dkBehaviorLog,
|
||||
Configurations.getStringProperty(DkBehaviorLog.class.getSimpleName() + "HiveTable", "DK_BEHAVIOR_LOG"),
|
||||
getTableName(DkBehaviorLog.class.getSimpleName() + "HiveTable", "DK_BEHAVIOR_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, DkBehaviorLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -127,7 +127,7 @@ public class LogController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, pxyHttpLog,
|
||||
Configurations.getStringProperty(PxyHttpLog.class.getSimpleName() + "HiveTable", "PXY_HTTP_LOG"),
|
||||
getTableName(PxyHttpLog.class.getSimpleName() + "HiveTable", "PXY_HTTP_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, PxyHttpLog.class, "foundTime",
|
||||
"recvTime");
|
||||
|
||||
@@ -83,7 +83,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmAvIpLog,
|
||||
Configurations.getStringProperty(MmAvIpLog.class.getSimpleName() + "HiveTable", "MM_AV_IP_LOG"),
|
||||
getTableName(MmAvIpLog.class.getSimpleName() + "HiveTable", "MM_AV_IP_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmAvIpLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -136,7 +136,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmAvUrlLog,
|
||||
Configurations.getStringProperty(MmAvUrlLog.class.getSimpleName() + "HiveTable", "MM_AV_URL_LOG"),
|
||||
getTableName(MmAvUrlLog.class.getSimpleName() + "HiveTable", "MM_AV_URL_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmAvUrlLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -189,7 +189,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmPicIpLog,
|
||||
Configurations.getStringProperty(MmPicIpLog.class.getSimpleName() + "HiveTable", "MM_PIC_IP_LOG"),
|
||||
getTableName(MmPicIpLog.class.getSimpleName() + "HiveTable", "MM_PIC_IP_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmPicIpLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -242,7 +242,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmPicUrlLog,
|
||||
Configurations.getStringProperty(MmPicUrlLog.class.getSimpleName() + "HiveTable", "MM_PIC_URL_LOG"),
|
||||
getTableName(MmPicUrlLog.class.getSimpleName() + "HiveTable", "MM_PIC_URL_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmPicUrlLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -296,7 +296,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmVoipIpLog,
|
||||
Configurations.getStringProperty(MmVoipIpLog.class.getSimpleName() + "HiveTable", "MM_VOIP_IP_LOG"),
|
||||
getTableName(MmVoipIpLog.class.getSimpleName() + "HiveTable", "MM_VOIP_IP_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmVoipIpLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -349,7 +349,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmVoipLog,
|
||||
Configurations.getStringProperty(MmVoipAccountLog.class.getSimpleName() + "HiveTable", "MM_VOIP_ACCOUNT_LOG"),
|
||||
getTableName(MmVoipAccountLog.class.getSimpleName() + "HiveTable", "MM_VOIP_ACCOUNT_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmVoipAccountLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -403,7 +403,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmSampleAudioLog,
|
||||
Configurations.getStringProperty(MmSampleAudioLog.class.getSimpleName() + "HiveTable", "MM_SAMPLE_AUDIO_LOG"),
|
||||
getTableName(MmSampleAudioLog.class.getSimpleName() + "HiveTable", "MM_SAMPLE_AUDIO_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmSampleAudioLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -456,7 +456,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmSampleVideoLog,
|
||||
Configurations.getStringProperty(MmSampleVideoLog.class.getSimpleName() + "HiveTable", "MM_SAMPLE_VIDEO_LOG"),
|
||||
getTableName(MmSampleVideoLog.class.getSimpleName() + "HiveTable", "MM_SAMPLE_VIDEO_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmSampleVideoLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -509,7 +509,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmPornAudioLevelLog,
|
||||
Configurations.getStringProperty(MmPornAudioLevelLog.class.getSimpleName() + "HiveTable", "MM_PORN_AUDIO_LEVEL_LOG"),
|
||||
getTableName(MmPornAudioLevelLog.class.getSimpleName() + "HiveTable", "MM_PORN_AUDIO_LEVEL_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmPornAudioLevelLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -562,7 +562,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmPornVideoLevelLog,
|
||||
Configurations.getStringProperty(MmPornVideoLevelLog.class.getSimpleName() + "HiveTable", "MM_PRON_VIDEO_LOG"),
|
||||
getTableName(MmPornVideoLevelLog.class.getSimpleName() + "HiveTable", "MM_PRON_VIDEO_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmPornVideoLevelLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -616,7 +616,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmSamplePicLog,
|
||||
Configurations.getStringProperty(MmSamplePicLog.class.getSimpleName() + "HiveTable", "MM_SAMPLE_PIC_LOG"),
|
||||
getTableName(MmSamplePicLog.class.getSimpleName() + "HiveTable", "MM_SAMPLE_PIC_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmSamplePicLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -669,7 +669,7 @@ public class MmLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, mmSampleVoipLog,
|
||||
Configurations.getStringProperty(MmSampleVoipLog.class.getSimpleName() + "HiveTable", "MM_SAMPLE_VOIP_LOG"),
|
||||
getTableName(MmSampleVoipLog.class.getSimpleName() + "HiveTable", "MM_SAMPLE_VOIP_LOG"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, MmSampleVoipLog.class, "foundTime",
|
||||
"recvTime");
|
||||
|
||||
@@ -84,12 +84,12 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
// ResultSet rs = HiveSqlService.getResultSet(page, ntcIpLog,
|
||||
// Configurations.getStringProperty(NtcIpLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||
// getTableName(NtcIpLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||
// getCol2Col(), orderBy, null);
|
||||
// Map<String, List> tableMapping = HiveJDBC.tableMapping(page, null, rs, NtcIpLog.class, "foundTime",
|
||||
// "recvTime");
|
||||
String sql = HiveSqlService.getSql(page, ntcIpLog,
|
||||
Configurations.getStringProperty(NtcIpLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||
getTableName(NtcIpLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null,sql , NtcIpLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -112,7 +112,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
// ntcIpLogPage
|
||||
// .setCount(
|
||||
// HiveSqlService.getHivePageCount(ntcIpLog, null,
|
||||
// Configurations.getStringProperty(
|
||||
// getTableName(
|
||||
// NtcIpLog.class.getSimpleName() + "HiveTable", "ntc_ip_log"),
|
||||
// getCol2Col(), null));
|
||||
} else {
|
||||
@@ -155,7 +155,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcHttpLog,
|
||||
Configurations.getStringProperty(NtcHttpLog.class.getSimpleName() + "HiveTable", "ntc_http_log"),
|
||||
getTableName(NtcHttpLog.class.getSimpleName() + "HiveTable", "ntc_http_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcHttpLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -215,7 +215,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcDnsLog,
|
||||
Configurations.getStringProperty(NtcDnsLog.class.getSimpleName() + "HiveTable", "ntc_dns_log"),
|
||||
getTableName(NtcDnsLog.class.getSimpleName() + "HiveTable", "ntc_dns_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcDnsLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -275,7 +275,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcMailLog,
|
||||
Configurations.getStringProperty(NtcMailLog.class.getSimpleName() + "HiveTable", "ntc_mail_log"),
|
||||
getTableName(NtcMailLog.class.getSimpleName() + "HiveTable", "ntc_mail_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcMailLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -335,7 +335,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcSslLog,
|
||||
Configurations.getStringProperty(NtcSslLog.class.getSimpleName() + "HiveTable", "ntc_ssl_log"),
|
||||
getTableName(NtcSslLog.class.getSimpleName() + "HiveTable", "ntc_ssl_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcSslLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -395,7 +395,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcPptpLog,
|
||||
Configurations.getStringProperty(NtcPptpLog.class.getSimpleName() + "HiveTable", "ntc_pptp_log"),
|
||||
getTableName(NtcPptpLog.class.getSimpleName() + "HiveTable", "ntc_pptp_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcPptpLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -454,7 +454,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcL2tpLog,
|
||||
Configurations.getStringProperty(NtcL2tpLog.class.getSimpleName() + "HiveTable", "ntc_l2tp_log"),
|
||||
getTableName(NtcL2tpLog.class.getSimpleName() + "HiveTable", "ntc_l2tp_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcL2tpLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -514,7 +514,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcOpenvpnLog,
|
||||
Configurations.getStringProperty(NtcOpenvpnLog.class.getSimpleName() + "HiveTable", "ntc_openvpn_log"),
|
||||
getTableName(NtcOpenvpnLog.class.getSimpleName() + "HiveTable", "ntc_openvpn_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcOpenvpnLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -574,7 +574,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcIpsecLog,
|
||||
Configurations.getStringProperty(NtcIpsecLog.class.getSimpleName() + "HiveTable", "ntc_ipsec_log"),
|
||||
getTableName(NtcIpsecLog.class.getSimpleName() + "HiveTable", "ntc_ipsec_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcIpsecLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -634,7 +634,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcSshLog,
|
||||
Configurations.getStringProperty(NtcSshLog.class.getSimpleName() + "HiveTable", "ntc_ssh_log"),
|
||||
getTableName(NtcSshLog.class.getSimpleName() + "HiveTable", "ntc_ssh_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcSshLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -694,7 +694,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcFtpLog,
|
||||
Configurations.getStringProperty(NtcFtpLog.class.getSimpleName() + "HiveTable", "ntc_ftp_log"),
|
||||
getTableName(NtcFtpLog.class.getSimpleName() + "HiveTable", "ntc_ftp_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcFtpLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -752,7 +752,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcAppLog,
|
||||
Configurations.getStringProperty(NtcAppLog.class.getSimpleName() + "HiveTable", "ntc_app_log"),
|
||||
getTableName(NtcAppLog.class.getSimpleName() + "HiveTable", "ntc_app_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcAppLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -810,7 +810,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
orderBy = "found_Time";
|
||||
}
|
||||
String sql = HiveSqlService.getSql(page, ntcDdosLog,
|
||||
Configurations.getStringProperty(NtcDdosLog.class.getSimpleName() + "HiveTable", "ntc_ddos_log"),
|
||||
getTableName(NtcDdosLog.class.getSimpleName() + "HiveTable", "ntc_ddos_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcDdosLog.class, "foundTime",
|
||||
"recvTime");
|
||||
@@ -870,7 +870,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
}
|
||||
|
||||
String sql = HiveSqlService.getSql(page, ntcP2pLog,
|
||||
Configurations.getStringProperty(NtcP2pLog.class.getSimpleName() + "HiveTable", "ntc_p2p_log"),
|
||||
getTableName(NtcP2pLog.class.getSimpleName() + "HiveTable", "ntc_p2p_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcP2pLog.class, "foundTime",
|
||||
@@ -931,7 +931,7 @@ public class NtcLogSearchController extends BaseRestController {
|
||||
}
|
||||
|
||||
String sql = HiveSqlService.getSql(page, ntcBgpLog,
|
||||
Configurations.getStringProperty(NtcBgpLog.class.getSimpleName() + "HiveTable", "ntc_bgp_log"),
|
||||
getTableName(NtcBgpLog.class.getSimpleName() + "HiveTable", "ntc_bgp_log"),
|
||||
getCol2Col(), orderBy, null);
|
||||
|
||||
Map<String, List<Object>> tableMapping = new LogJDBCByDruid().tableMapping(page, null, sql, NtcBgpLog.class, "foundTime",
|
||||
|
||||
Reference in New Issue
Block a user