@ -43,6 +43,7 @@ public class SummaryProfile {
|
||||
public static final String TOTAL_TIME = "Total";
|
||||
public static final String TASK_STATE = "Task State";
|
||||
public static final String USER = "User";
|
||||
public static final String DEFAULT_CATALOG = "Default Catalog";
|
||||
public static final String DEFAULT_DB = "Default Db";
|
||||
public static final String SQL_STATEMENT = "Sql Statement";
|
||||
public static final String IS_CACHED = "Is Cached";
|
||||
@ -100,7 +101,7 @@ public class SummaryProfile {
|
||||
// a column, so that should not
|
||||
// add many columns here. Add to ExecutionSummary list.
|
||||
public static final ImmutableList<String> SUMMARY_KEYS = ImmutableList.of(PROFILE_ID, TASK_TYPE,
|
||||
START_TIME, END_TIME, TOTAL_TIME, TASK_STATE, USER, DEFAULT_DB, SQL_STATEMENT);
|
||||
START_TIME, END_TIME, TOTAL_TIME, TASK_STATE, USER, DEFAULT_CATALOG, DEFAULT_DB, SQL_STATEMENT);
|
||||
|
||||
// The display order of execution summary items.
|
||||
public static final ImmutableList<String> EXECUTION_SUMMARY_KEYS = ImmutableList.of(
|
||||
@ -536,6 +537,11 @@ public class SummaryProfile {
|
||||
return this;
|
||||
}
|
||||
|
||||
public SummaryBuilder defaultCatalog(String val) {
|
||||
map.put(DEFAULT_CATALOG, val);
|
||||
return this;
|
||||
}
|
||||
|
||||
public SummaryBuilder defaultDb(String val) {
|
||||
map.put(DEFAULT_DB, val);
|
||||
return this;
|
||||
|
||||
@ -41,6 +41,7 @@ import org.apache.doris.common.util.LogKey;
|
||||
import org.apache.doris.common.util.MetaLockUtils;
|
||||
import org.apache.doris.common.util.ProfileManager.ProfileType;
|
||||
import org.apache.doris.common.util.TimeUtils;
|
||||
import org.apache.doris.datasource.InternalCatalog;
|
||||
import org.apache.doris.datasource.property.constants.S3Properties;
|
||||
import org.apache.doris.load.BrokerFileGroup;
|
||||
import org.apache.doris.load.BrokerFileGroupAggInfo.FileGroupAggKey;
|
||||
@ -352,6 +353,7 @@ public class BrokerLoadJob extends BulkLoadJob {
|
||||
}
|
||||
builder.taskState("FINISHED");
|
||||
builder.user(getUserInfo() != null ? getUserInfo().getQualifiedUser() : "N/A");
|
||||
builder.defaultCatalog(InternalCatalog.INTERNAL_CATALOG_NAME);
|
||||
builder.defaultDb(getDefaultDb());
|
||||
builder.sqlStatement(getOriginStmt().originStmt);
|
||||
return builder.build();
|
||||
|
||||
@ -377,6 +377,7 @@ public class StmtExecutor {
|
||||
builder.taskState(!isFinished && context.getState().getStateType().equals(MysqlStateType.OK) ? "RUNNING"
|
||||
: context.getState().toString());
|
||||
builder.user(context.getQualifiedUser());
|
||||
builder.defaultCatalog(context.getCurrentCatalog().getName());
|
||||
builder.defaultDb(context.getDatabase());
|
||||
builder.workloadGroup(context.getWorkloadGroupName());
|
||||
builder.sqlStatement(originStmt.originStmt);
|
||||
|
||||
Reference in New Issue
Block a user