temporary directory?

54 views
Skip to first unread message

shlomo....@gmail.com

unread,
Sep 28, 2008, 2:39:00 PM9/28/08
to jets3t...@googlegroups.com
Hi James,

I routinely upload large files (2-3 GB) into S3 with the Synchronize
utility, using the --crypto option.

I occasionally get an exception like this:

Exception in thread "main" java.io.IOException: No space left on device
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:260)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
at org.jets3t.service.utils.ObjectUtils.transformUploadFile(ObjectUtils.java:252)
at org.jets3t.service.utils.ObjectUtils.createObjectForUpload(ObjectUtils.java:103)
at org.jets3t.apps.synchronize.Synchronize.prepareUploadObject(Synchronize.java:175)
at org.jets3t.apps.synchronize.Synchronize.uploadLocalDirectoryToS3(Synchronize.java:359)
at org.jets3t.apps.synchronize.Synchronize.run(Synchronize.java:856)
at org.jets3t.apps.synchronize.Synchronize.main(Synchronize.java:1291)

Is there a way to tell Synchronize to use a specific temporary disk
location? I have very little space on /tmp, but lots on /mnt....

Thanks.

.. Shlomo

James Murty

unread,
Sep 28, 2008, 5:31:50 PM9/28/08
to jets3t...@googlegroups.com
Hi Shlomo,

JetS3t uses the default Java File#createTempFile mechanism to create temporary files, and does not specify the directory location explicitly. You should be able to change the temporary directory location by setting the TEMP and/or TMP environment variables to point to /mnt before you run Synchronize, or by setting the "java.io.tmpdir" Java property in the synchronize.sh script.

Here is the relevant Javadoc:
http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String,%20java.io.File)

James

ad...@abullock.info

unread,
Sep 12, 2012, 6:25:45 PM9/12/12
to jets3t...@googlegroups.com
Hey,

Can anyone give an example of the 'java.io.tmpdir' Java property in the bring used in the 'synchronize.sh' script?

Thanks,
Adam

James Murty

unread,
Sep 13, 2012, 7:14:53 AM9/13/12
to jets3t...@googlegroups.com
If you are on a Linux or Mac machine, try setting the TEMP environment
variable when you call synchronizesh:
TEMP=/path/to/your/temp/dir synchronize.sh etc etc

If you are stuck on windows, edit the last line of synchronize.bat to
include "-Djava.io.tmpdir=/path/to/your/temp/dir" before the
-classpath switch.

James
> --
> You received this message because you are subscribed to the Google Groups
> "JetS3t Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/jets3t-users/-/O5hCa8mTNhkJ.
> To post to this group, send email to jets3t...@googlegroups.com.
> To unsubscribe from this group, send email to
> jets3t-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/jets3t-users?hl=en.
Reply all
Reply to author
Forward
0 new messages