TUP-17149:Build Job very slow compared to version 5 even with TPS-1656
(#995)
This commit is contained in:
@@ -466,7 +466,11 @@ public class ProcessorUtilities {
|
||||
neededRoutines);
|
||||
}
|
||||
|
||||
boolean codeGenerationNeeded = isCodeGenerationNeeded(jobInfo, statistics, trace);
|
||||
if (currentProcess != null) {
|
||||
if (codeGenerationNeeded && (currentProcess instanceof IProcess2) && exportConfig) {
|
||||
((IProcess2) currentProcess).setProcessModified(true);
|
||||
}
|
||||
// TDI-26513:For the Dynamic schema,need to check the currentProcess(job or joblet)
|
||||
checkMetadataDynamic(currentProcess, jobInfo);
|
||||
checkUsePigUDFs(currentProcess, jobInfo);
|
||||
@@ -499,7 +503,7 @@ public class ProcessorUtilities {
|
||||
// so the code won't have any error during the check, and it will help to check
|
||||
// if the generation is really needed.
|
||||
generateContextInfo(jobInfo, selectedContextName, statistics, trace, needContext, progressMonitor, currentProcess,
|
||||
currentJobName, processor, isMainJob);
|
||||
currentJobName, processor, isMainJob, codeGenerationNeeded);
|
||||
|
||||
// for testContainer dataSet
|
||||
generateDataSet(currentProcess, processor);
|
||||
@@ -631,12 +635,10 @@ public class ProcessorUtilities {
|
||||
|
||||
private static void generateContextInfo(JobInfo jobInfo, String selectedContextName, boolean statistics, boolean trace,
|
||||
boolean needContext, IProgressMonitor progressMonitor, IProcess currentProcess, String currentJobName,
|
||||
IProcessor processor, boolean isMain) throws ProcessorException {
|
||||
if (isCodeGenerationNeeded(jobInfo, statistics, trace)) {
|
||||
IProcessor processor, boolean isMain, boolean codeGenerationNeeded) throws ProcessorException {
|
||||
if (codeGenerationNeeded) {
|
||||
codeModified = true;
|
||||
if ((currentProcess instanceof IProcess2) && exportConfig) {
|
||||
// to force to regenerate the data nodes
|
||||
((IProcess2) currentProcess).setProcessModified(true);
|
||||
resetRunJobComponentParameterForContextApply(jobInfo, currentProcess, selectedContextName);
|
||||
}
|
||||
progressMonitor.subTask(Messages.getString("ProcessorUtilities.generatingJob") + currentJobName); //$NON-NLS-1$
|
||||
@@ -828,7 +830,11 @@ public class ProcessorUtilities {
|
||||
LastGenerationInfo.getInstance().setRoutinesNeededWithSubjobPerJob(jobInfo.getJobId(), jobInfo.getJobVersion(),
|
||||
neededRoutines);
|
||||
}
|
||||
boolean codeGenerationNeeded = isCodeGenerationNeeded(jobInfo, statistics, trace);
|
||||
if (currentProcess != null) {
|
||||
if (codeGenerationNeeded && (currentProcess instanceof IProcess2) && exportConfig) {
|
||||
((IProcess2) currentProcess).setProcessModified(true);
|
||||
}
|
||||
checkMetadataDynamic(currentProcess, jobInfo);
|
||||
checkUsePigUDFs(currentProcess, jobInfo);
|
||||
}
|
||||
@@ -876,7 +882,7 @@ public class ProcessorUtilities {
|
||||
processor.setArguments(argumentsMap);
|
||||
|
||||
generateContextInfo(jobInfo, selectedContextName, statistics, trace, needContext, progressMonitor, currentProcess,
|
||||
currentJobName, processor, isMainJob);
|
||||
currentJobName, processor, isMainJob, codeGenerationNeeded);
|
||||
|
||||
// for testContainer dataSet
|
||||
generateDataSet(currentProcess, processor);
|
||||
|
||||
@@ -48,6 +48,10 @@ public interface TalendMavenConstants {
|
||||
|
||||
static final String PREFIX_PROFILE = "-P";
|
||||
|
||||
static final String PREFIX_THREAD = "-T";
|
||||
|
||||
static final String PREFIX_THREAD_VALUE = "1C";
|
||||
|
||||
/**
|
||||
* goal
|
||||
*/
|
||||
@@ -103,7 +107,7 @@ public interface TalendMavenConstants {
|
||||
static final String PROFILE_PACKAGING_AND_ASSEMBLY = "packaging-and-assembly";
|
||||
|
||||
static final String PROFILE_INCLUDE_MICROSERVICE_CONFIGS = "include-microservice-configs";
|
||||
|
||||
|
||||
static final String PROFILE_INCLUDE_MICROSERVICE_RUNNING_CONFIGS = "include-microservice-running-configs";
|
||||
|
||||
static final String PROFILE_INCLUDE_SURVIVORSHIP_RULES = "include-survivorship-rules";
|
||||
|
||||
@@ -173,4 +173,5 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
|
||||
return true; // default, all are valid
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -55,6 +55,8 @@ public class CreateMavenBundleTemplatePom extends CreateMaven {
|
||||
* if true, will load from tempalte. else, can create one pom with attributes settings.
|
||||
*/
|
||||
private boolean baseOnTemplateOnly = false;
|
||||
|
||||
private boolean syncCodesPoms;
|
||||
|
||||
public CreateMavenBundleTemplatePom(IFile pomFile, String bundleTemplatePath) {
|
||||
super();
|
||||
@@ -182,5 +184,14 @@ public class CreateMavenBundleTemplatePom extends CreateMaven {
|
||||
protected void afterCreate(IProgressMonitor monitor) throws Exception {
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
|
||||
public void setSyncCodesPoms(boolean isMainJob) {
|
||||
this.syncCodesPoms = isMainJob;
|
||||
}
|
||||
|
||||
public boolean needSyncCodesPoms() {
|
||||
return this.syncCodesPoms;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -488,7 +488,10 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
// generate routines
|
||||
MavenPomSynchronizer pomSync = new MavenPomSynchronizer(this.getJobProcessor());
|
||||
pomSync.setArgumentsMap(getArgumentsMap());
|
||||
pomSync.syncCodesPoms(monitor, getJobProcessor(), true);
|
||||
if (needSyncCodesPoms()) {
|
||||
// only sync pom for main job
|
||||
pomSync.syncCodesPoms(monitor, getJobProcessor(), true);
|
||||
}
|
||||
// because need update the latest content for templates.
|
||||
pomSync.syncTemplates(true);
|
||||
|
||||
@@ -848,4 +851,5 @@ public class CreateMavenJobPom extends AbstractMavenProcessorPom {
|
||||
fileSetEle.appendChild(filteredElement);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user