Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public void analyze(Analyzer analyzer) throws UserException {
}

private void setJob() throws UserException {
exportJob = new ExportJob();
exportJob = new ExportJob(Env.getCurrentEnv().getNextId());

Database db = Env.getCurrentInternalCatalog().getDbOrDdlException(this.tblName.getDb());
exportJob.setDbId(db.getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ private StatementBase generateLogicalPlanAdapter(LogicalPlan outfileLogicalPlan)
return statementBase;
}

public List<? extends TransientTaskExecutor> getTaskExecutors() {
return jobExecutorList;
public List<? extends TransientTaskExecutor> getCopiedTaskExecutors() {
return Lists.newArrayList(jobExecutorList);
}

private void generateExportJobExecutor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ private void writeUnlock() {
}

public void addExportJobAndRegisterTask(ExportJob job) throws Exception {
long jobId = Env.getCurrentEnv().getNextId();
job.setId(jobId);
writeLock();
try {
if (dbTolabelToExportJobId.containsKey(job.getDbId())
Expand All @@ -113,7 +111,7 @@ public void addExportJobAndRegisterTask(ExportJob job) throws Exception {
BrokerUtil.deleteDirectoryWithFileSystem(fullPath.substring(0, fullPath.lastIndexOf('/') + 1),
job.getBrokerDesc());
}
job.getTaskExecutors().forEach(executor -> {
job.getCopiedTaskExecutors().forEach(executor -> {
Env.getCurrentEnv().getTransientTaskManager().addMemoryTask(executor);
});
Env.getCurrentEnv().getEditLog().logExportCreate(job);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private void checkBrokerDesc(ConnectContext ctx) throws UserException {

private ExportJob generateExportJob(ConnectContext ctx, Map<String, String> fileProperties, TableName tblName)
throws UserException {
ExportJob exportJob = new ExportJob();
ExportJob exportJob = new ExportJob(Env.getCurrentEnv().getNextId());
// set export job and check catalog/db/table
CatalogIf catalog = ctx.getEnv().getCatalogMgr().getCatalogOrAnalysisException(tblName.getCtl());
DatabaseIf db = catalog.getDbOrAnalysisException(tblName.getDb());
Expand Down