Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sollhui committed Jul 18, 2024
1 parent e553fc7 commit 1b0ac5b
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,19 @@ public void addStreamLoadRecord(long dbId, String label, StreamLoadRecord stream
}

public List<StreamLoadItem> getStreamLoadRecords() {
LOG.info("test log: {}", streamLoadRecordHeap);
return new ArrayList<>(streamLoadRecordHeap);
}

public List<List<Comparable>> getStreamLoadRecordByDb(
long dbId, String label, boolean accurateMatch, StreamLoadState state) {
LinkedList<List<Comparable>> streamLoadRecords = new LinkedList<List<Comparable>>();
LOG.info("test log: {}", dbId);

readLock();
try {
if (!dbIdToLabelToStreamLoadRecord.containsKey(dbId)) {
LOG.info("test log: {}", dbId);
return streamLoadRecords;
}

Expand Down Expand Up @@ -202,6 +205,7 @@ public List<List<Comparable>> getStreamLoadRecordByDb(
}

}
LOG.info("test log: {}", streamLoadRecords);
return streamLoadRecords;
} finally {
readUnlock();
Expand Down Expand Up @@ -263,19 +267,17 @@ protected void runAfterCatalogReady() {
TimeUtils.getDatetimeMsFormatWithTimeZone());
String finishTime = TimeUtils.longToTimeString(streamLoadItem.getFinishTime(),
TimeUtils.getDatetimeMsFormatWithTimeZone());
if (LOG.isDebugEnabled()) {
LOG.debug("receive stream load record info from backend: {}."
+ " label: {}, db: {}, tbl: {}, user: {}, user_ip: {},"
+ " status: {}, message: {}, error_url: {},"
+ " total_rows: {}, loaded_rows: {}, filtered_rows: {}, unselected_rows: {},"
+ " load_bytes: {}, start_time: {}, finish_time: {}.",
backend.getHost(), streamLoadItem.getLabel(), streamLoadItem.getDb(),
streamLoadItem.getTbl(), streamLoadItem.getUser(), streamLoadItem.getUserIp(),
streamLoadItem.getStatus(), streamLoadItem.getMessage(), streamLoadItem.getUrl(),
streamLoadItem.getTotalRows(), streamLoadItem.getLoadedRows(),
streamLoadItem.getFilteredRows(), streamLoadItem.getUnselectedRows(),
streamLoadItem.getLoadBytes(), startTime, finishTime);
}
LOG.info("receive stream load record info from backend: {}."
+ " label: {}, db: {}, tbl: {}, user: {}, user_ip: {},"
+ " status: {}, message: {}, error_url: {},"
+ " total_rows: {}, loaded_rows: {}, filtered_rows: {}, unselected_rows: {},"
+ " load_bytes: {}, start_time: {}, finish_time: {}.",
backend.getHost(), streamLoadItem.getLabel(), streamLoadItem.getDb(),
streamLoadItem.getTbl(), streamLoadItem.getUser(), streamLoadItem.getUserIp(),
streamLoadItem.getStatus(), streamLoadItem.getMessage(), streamLoadItem.getUrl(),
streamLoadItem.getTotalRows(), streamLoadItem.getLoadedRows(),
streamLoadItem.getFilteredRows(), streamLoadItem.getUnselectedRows(),
streamLoadItem.getLoadBytes(), startTime, finishTime);

AuditEvent auditEvent =
new StreamLoadAuditEvent.AuditEventBuilder().setEventType(EventType.STREAM_LOAD_FINISH)
Expand Down

0 comments on commit 1b0ac5b

Please sign in to comment.