Six Stars

Configuration JVM in TDI Studio 6.3.1

My TAC server is running on UTC timezone, while TDI Studio is running my local PC's timezone. To make sure that all jobs are behaving the same, I want to set all jobs using UTC timezone in Studio.For each job, I set it via Run => "Advanced settings" => "JVM Setting" => Add "-Duser.timezone=UTC" . However, I would like to set the default to UTC on ALL jobs in Studio.

 

The following two links suggest to " edit the .ini file corresponding to your executable file".

http://kindleconsulting.com/component/zoo/item/managing-jvm-heap-size-in-talend-open-studio.html

https://www.talendforge.org/forum/viewtopic.php?id=47206

 

My executable file is C:\Talend\Talend-Tools-Studio-20161216_1026-V6.3.1\Talend-Studio-win-x86_64.exe

I modify Talend-Studio-win-x86_64.ini  to 
-vmargs
-Xms512m
-Xmx1536m
-Duser.timezone=UTC
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication

 

But it doesn't help. 

Anyone knows how to set this?

 

Thanks,

 

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Eleven Stars

Re: Configuration JVM in TDI Studio 6.3.1

The ini file is for the JVM running the Studio. The jobs run in their own JVM. So you will either need to set this in the run settings for all jobs OR (a much better solution in my opinion) use a joblet or child job at the beginning of all of your jobs to set things like this. The code you will need to set the timezone from within the JVM (once it is started) can be seen below....

 

java.util.TimeZone utcTimeZone = java.util.TimeZone.getTimeZone("UTC");
java.util.TimeZone.setDefault(utcTimeZone);

Adding this in a tJava within a joblet or child job means you can make changes to all of your jobs with just one edit to your joblet/child job. You will of course have to compile everything when you make a change to this, but it still saves a lot of job updates.

Rilhia Solutions
3 REPLIES
Eleven Stars

Re: Configuration JVM in TDI Studio 6.3.1

The ini file is for the JVM running the Studio. The jobs run in their own JVM. So you will either need to set this in the run settings for all jobs OR (a much better solution in my opinion) use a joblet or child job at the beginning of all of your jobs to set things like this. The code you will need to set the timezone from within the JVM (once it is started) can be seen below....

 

java.util.TimeZone utcTimeZone = java.util.TimeZone.getTimeZone("UTC");
java.util.TimeZone.setDefault(utcTimeZone);

Adding this in a tJava within a joblet or child job means you can make changes to all of your jobs with just one edit to your joblet/child job. You will of course have to compile everything when you make a change to this, but it still saves a lot of job updates.

Rilhia Solutions
Six Stars

Re: Configuration JVM in TDI Studio 6.3.1

Good Sugesstion Richard.. 

 


rhall_2_0 wrote:

The ini file is for the JVM running the Studio. The jobs run in their own JVM. So you will either need to set this in the run settings for all jobs OR (a much better solution in my opinion) use a joblet or child job at the beginning of all of your jobs to set things like this. The code you will need to set the timezone from within the JVM (once it is started) can be seen below....

 

java.util.TimeZone utcTimeZone = java.util.TimeZone.getTimeZone("UTC");
java.util.TimeZone.setDefault(utcTimeZone);

Adding this in a tJava within a joblet or child job means you can make changes to all of your jobs with just one edit to your joblet/child job. You will of course have to compile everything when you make a change to this, but it still saves a lot of job updates.



rhall_2_0 wrote:

The ini file is for the JVM running the Studio. The jobs run in their own JVM. So you will either need to set this in the run settings for all jobs OR (a much better solution in my opinion) use a joblet or child job at the beginning of all of your jobs to set things like this. The code you will need to set the timezone from within the JVM (once it is started) can be seen below....

 

java.util.TimeZone utcTimeZone = java.util.TimeZone.getTimeZone("UTC");
java.util.TimeZone.setDefault(utcTimeZone);

Adding this in a tJava within a joblet or child job means you can make changes to all of your jobs with just one edit to your joblet/child job. You will of course have to compile everything when you make a change to this, but it still saves a lot of job updates.


 

Six Stars

Re: Configuration JVM in TDI Studio 6.3.1

(a much better solution in my opinion) use a joblet or child job at the beginning of all of your jobs to set things like this. The code you will need to set the timezone from within the JVM (once it is started) can be seen below....

 

java.util.TimeZone utcTimeZone = java.util.TimeZone.getTimeZone("UTC");
java.util.TimeZone.setDefault(utcTimeZone);

 "

Great suggestion, and it works well. I already have a joblet in Prejob to load contexts from external files. So this is just a simple change for me.

Thanks,