Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dears,
I have to create a talend job for killing a job which keep running for a while. The job contains BIGSql components. I am using tjavaflex to check if the job has been running for more than 1hour and then a tDie for killing the job. But it keeps telling me that 'tJavaFlex_1 null'.
Please could you help me? I am totally new in Talend.
You will need to give a bit more information. Is the job that you are trying to kill the job in which that the tJavaFlex is located? Can you show us the code that is failing due to the NULL please?
Yes, the job that I am trying to kill is the one that have tjavaflex inside. This job has to 2 tDB2Input that are mapped together with a tMap.
The code of tjavaflex:
Date startTime =TalendDate.getCurrentDate();
Integer timeout=0;
if(TalendDate.diffDate(TalendDate.getCurrentDate(), startTime, "ss") >1)
{
timeout=1;
break;
}
I included context.timeout in the context part of the job.
The job runs without error, but tdie does not kill the job, even the running time is more than 1 second.
This is not going to work. In fact, I am concerned by the look of your job in general if I'm honest. For a tMap lookup, unless it is triggered for every row, this will happen once at the beginning of the subjob. So your tJavaFlex is likely running immediately at the beginning of the job and only then.
What is your job supposed to be doing? The reason I ask is that the flow looks a little weird.