<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Downloaing a huge file using tGoogleDriveGet causes OutOfMemoryError in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286119#M59741</link>
    <description>Thanks for your quick reply. I will try it later using the standalone job for the testing.&lt;BR /&gt;&lt;BR /&gt;But, One thing I want to clarify your kindly advice.&lt;BR /&gt;Why 4GB is enough for me?&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
    <pubDate>Tue, 02 Jun 2020 09:37:52 GMT</pubDate>
    <dc:creator>msminek</dc:creator>
    <dc:date>2020-06-02T09:37:52Z</dc:date>
    <item>
      <title>Downloaing a huge file using tGoogleDriveGet causes OutOfMemoryError</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286116#M59738</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I try to download a huge file around 3GB in Google Drive using tGoogleDriveGet in TOS for DI 
 &lt;STRIKE&gt;
   7.3.1&amp;nbsp; 
 &lt;/STRIKE&gt;&lt;STRONG&gt;7.2.1&lt;/STRONG&gt;.&lt;BR /&gt;But, I got a exception below.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;PRE&gt;Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:3236)
        at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
        at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
        at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
        at com.google.api.client.util.ByteStreams.copy(ByteStreams.java:55)
        at com.google.api.client.util.IOUtils.copy(IOUtils.java:94)
        at com.google.api.client.util.IOUtils.copy(IOUtils.java:63)
        at com.google.api.client.googleapis.media.MediaHttpDownloader.executeCurrentRequest(MediaHttpDownloader.java:246)
        at com.google.api.client.googleapis.media.MediaHttpDownloader.download(MediaHttpDownloader.java:198)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeMediaAndDownloadTo(AbstractGoogleClientRequest.java:642)
        at com.google.api.services.drive.Drive$Files$Get.executeMediaAndDownloadTo(Drive.java:3256)
        at org.talend.components.google.drive.runtime.GoogleDriveUtils.getResource(GoogleDriveUtils.java:385)
        at org.talend.components.google.drive.runtime.GoogleDriveGetRuntime.getFile(GoogleDriveGetRuntime.java:76)
        at org.talend.components.google.drive.runtime.GoogleDriveGetRuntime.runAtDriver(GoogleDriveGetRuntime.java:60)
        at local_project.gd_get_0_1.gd_get.tGoogleDriveGet_1Process(gd_get.java:3833)
        at local_project.gd_get_0_1.gd_get.tFileInputDelimited_1Process(gd_get.java:3144)
        at local_project.gd_get_0_1.gd_get.tGoogleDriveConnection_1Process(gd_get.java:652)
        at local_project.gd_get_0_1.gd_get.runJobInTOS(gd_get.java:4249)
        at local_project.gd_get_0_1.gd_get.main(gd_get.java:4071)&lt;/PRE&gt; 
&lt;DIV&gt;
  I use -Xms2048M -Xmx2048M system properties for zlulu 8. 
 &lt;BR /&gt; 
 &lt;DIV&gt; 
  &lt;BR /&gt;openjdk version "1.8.0_212" 
  &lt;BR /&gt;OpenJDK Runtime Environment (Zulu 8.38.0.13-CA-win64) (build 1.8.0_212-b04) 
  &lt;BR /&gt;OpenJDK 64-Bit Server VM (Zulu 8.38.0.13-CA-win64) (build 25.212-b04, mixed mode) 
  &lt;BR /&gt; 
  &lt;BR /&gt;And the direct file saving with tGoogleDriveGet got same error. 
  &lt;BR /&gt; 
  &lt;BR /&gt;Google API support resumable media download. So tGoogleDriveGet also could support a huge file download with a small foot print, I thought. 
 &lt;/DIV&gt; 
 &lt;A href="https://developers.google.com/api-client-library/java/google-api-java-client/media-download" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://developers.google.com/api-client-library/java/google-api-java-client/media-download&lt;/A&gt; 
&lt;/DIV&gt; 
&lt;DIV&gt;
  &amp;nbsp; 
&lt;/DIV&gt; 
&lt;DIV&gt;
  How can I solve this error ? 
 &lt;BR /&gt; 
 &lt;BR /&gt;Regards. 
&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Jun 2020 09:02:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286116#M59738</guid>
      <dc:creator>msminek</dc:creator>
      <dc:date>2020-06-02T09:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Downloaing a huge file using tGoogleDriveGet causes OutOfMemoryError</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286117#M59739</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069MaLAAU"&gt;@sm&lt;/A&gt;&amp;nbsp;, can you try to use jvm parameters like below and check that are you getting this error.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;-Xms2048M -Xmx4096M&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 09:24:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286117#M59739</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-06-02T09:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: Downloaing a huge file using tGoogleDriveGet causes OutOfMemoryError</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286118#M59740</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069MaLAAU"&gt;@sm&lt;/A&gt;&amp;nbsp;,check the below link to add JVM parameters for a job.&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://help.talend.com/reader/m454VvH7E2VjR2~xX7IjXQ/pUeYxsZrtMN4IeK5FjuZpA" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/m454VvH7E2VjR2~xX7IjXQ/pUeYxsZrtMN4IeK5FjuZpA&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 09:26:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286118#M59740</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-06-02T09:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Downloaing a huge file using tGoogleDriveGet causes OutOfMemoryError</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286119#M59741</link>
      <description>Thanks for your quick reply. I will try it later using the standalone job for the testing.&lt;BR /&gt;&lt;BR /&gt;But, One thing I want to clarify your kindly advice.&lt;BR /&gt;Why 4GB is enough for me?&lt;BR /&gt;&lt;BR /&gt;Regards.</description>
      <pubDate>Tue, 02 Jun 2020 09:37:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286119#M59741</guid>
      <dc:creator>msminek</dc:creator>
      <dc:date>2020-06-02T09:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Downloaing a huge file using tGoogleDriveGet causes OutOfMemoryError</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286120#M59742</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069MaLAAU"&gt;@sm&lt;/A&gt;&amp;nbsp;, we need test with multipule times with different parameters and see which one will work,since i have given based on your file is 3 GB&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 09:43:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286120#M59742</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-06-02T09:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Downloaing a huge file using tGoogleDriveGet causes OutOfMemoryError</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286121#M59743</link>
      <description>&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="gd_get.png" style="width: 827px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MZk1.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128323i2CE1F28C330F7EC7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MZk1.png" alt="0683p000009MZk1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;. I got what you mean. I wonder if I I need 100GB of heap for a 100GB file.&lt;BR /&gt;&lt;BR /&gt;One thing, I apologies that TOS for DI version is 7.2.1. not 7.3.1. I'm sorry.&lt;BR /&gt;&lt;BR /&gt;The whole job is like this picture. CSV carries document IDs created from tGoogleDriveList result. The 1st~3rd files are small. And the 4th file is a 3GB mpeg file in the CSV.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The execution log&amp;nbsp;with -Xmx4096M option is below. Same error.&lt;/P&gt; 
&lt;PRE&gt;D:\talend-gd\GoogleDriveAccessor\gd_get&amp;gt;java -Dtalend.component.manager.m2.repository="D:\talend-gd\GoogleDriveAccessor\gd_get/../lib" -Xms4096M -Xmx4096M -cp .;../lib/routines.jar;../lib/auto-common-0.3.jar;../lib/auto-service-1.0-rc2.jar;../lib/avro-1.8.1.jar;../lib/commons-codec-1.10.jar;../lib/commons-compress-1.8.1.jar;../lib/commons-io-2.5.jar;../lib/commons-lang3-3.8.1.jar;../lib/commons-logging-1.2.jar;../lib/components-api-0.27.3.jar;../lib/components-common-0.27.3.jar;../lib/components-googledrive-definition-0.27.3.jar;../lib/components-googledrive-runtime-0.27.3.jar;../lib/crypto-utils.jar;../lib/daikon-0.31.7.jar;../lib/daikon-exception-0.31.7.jar;../lib/dom4j-1.6.1.jar;../lib/google-api-client-1.27.0.jar;../lib/google-api-services-drive-v3-rev151-1.25.0.jar;../lib/google-http-client-1.27.0.jar;../lib/google-http-client-jackson2-1.27.0.jar;../lib/google-oauth-client-1.27.0.jar;../lib/google-oauth-client-java6-1.27.0.jar;../lib/google-oauth-client-jetty-1.27.0.jar;../lib/guava-20.0.jar;../lib/httpclient-4.5.5.jar;../lib/httpcore-4.4.9.jar;../lib/j2objc-annotations-1.1.jar;../lib/jackson-annotations-2.9.0.jar;../lib/jackson-core-2.9.9.jar;../lib/jackson-core-asl-1.9.14-TALEND.jar;../lib/jackson-databind-2.9.9.jar;../lib/jackson-mapper-asl-1.9.14-TALEND.jar;../lib/javacsv-2.0.jar;../lib/javax.inject-1.jar;../lib/javax.servlet-api-3.1.0.jar;../lib/jcl-over-slf4j-1.7.25.jar;../lib/jetty-6.1.26.jar;../lib/jetty-util-6.1.26.jar;../lib/joda-time-2.8.2.jar;../lib/json-io-4.9.9-TALEND.jar;../lib/jsr305-1.3.9.jar;../lib/log4j-1.2.17.jar;../lib/org.eclipse.swt.gtk.linux.x86_64-4.3.jar;../lib/org.osgi.service.component.annotations-1.3.0.jar;../lib/paranamer-2.7.jar;../lib/pax-url-aether-2.4.7.jar;../lib/servlet-api-2.5-20081211.jar;../lib/slf4j-api-1.7.25.jar;../lib/slf4j-log4j12-1.7.10.jar;../lib/snappy-java-1.1.1.3.jar;../lib/talend-codegen-utils.jar;../lib/talend_file_enhanced_20070724.jar;../lib/talendcsv.jar;../lib/xz-1.5.jar;gd_get_0_1.jar; local_project.gd_get_0_1.gd_get  --context=Default
(snip)
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:3236)
        at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
        at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
        at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
        at com.google.api.client.util.ByteStreams.copy(ByteStreams.java:55)
        at com.google.api.client.util.IOUtils.copy(IOUtils.java:94)
        at com.google.api.client.util.IOUtils.copy(IOUtils.java:63)
        at com.google.api.client.googleapis.media.MediaHttpDownloader.executeCurrentRequest(MediaHttpDownloader.java:246)
        at com.google.api.client.googleapis.media.MediaHttpDownloader.download(MediaHttpDownloader.java:198)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeMediaAndDownloadTo(AbstractGoogleClientRequest.java:642)
        at com.google.api.services.drive.Drive$Files$Get.executeMediaAndDownloadTo(Drive.java:3256)
        at org.talend.components.google.drive.runtime.GoogleDriveUtils.getResource(GoogleDriveUtils.java:385)
        at org.talend.components.google.drive.runtime.GoogleDriveGetRuntime.getFile(GoogleDriveGetRuntime.java:76)
        at org.talend.components.google.drive.runtime.GoogleDriveGetRuntime.runAtDriver(GoogleDriveGetRuntime.java:60)
        at local_project.gd_get_0_1.gd_get.tGoogleDriveGet_1Process(gd_get.java:3833)
        at local_project.gd_get_0_1.gd_get.tFileInputDelimited_1Process(gd_get.java:3144)
        at local_project.gd_get_0_1.gd_get.tGoogleDriveConnection_1Process(gd_get.java:652)
        at local_project.gd_get_0_1.gd_get.runJobInTOS(gd_get.java:4249)
        at local_project.gd_get_0_1.gd_get.main(gd_get.java:4071)&lt;/PRE&gt; 
&lt;P&gt;Regards.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 11:28:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Downloaing-a-huge-file-using-tGoogleDriveGet-causes/m-p/2286121#M59743</guid>
      <dc:creator>msminek</dc:creator>
      <dc:date>2020-06-02T11:28:44Z</dc:date>
    </item>
  </channel>
</rss>

