0

I see that in Tachyon configuration there is a key tachyon.master.ttlchecker.interval.ms ("Time interval (in milliseconds) to periodically delete the files with expired ttl value.") but I have looked all over and cannot find a way of setting the TTL value of a Tachyon file.

How do you set the TTL of a Tachyon file (preferably from a java/scala program)?

dtolnay
  • 9,621
  • 5
  • 41
  • 62
Shane Kinsella
  • 267
  • 2
  • 13

2 Answers2

2

In 0.8, there is an API on TachyonFileSystem for creating file https://github.com/amplab/tachyon/blob/v0.8.2/clients/unshaded/src/main/java/tachyon/client/file/TachyonFileSystemCore.java#L59

And CreateOptions has the TTL field. https://github.com/amplab/tachyon/blob/v0.8.2/clients/unshaded/src/main/java/tachyon/client/file/options/CreateOptions.java#L74

Yupeng
  • 56
  • 2
0

As I see in docs:

"Each site deployment and application client can also override the default property values via tachyon-site.properties file. Note that, this file must be in the classpath of the Java VM in which Tachyon is running. The easiest way is to put the site properties file in directory $TACHYON_HOME/conf."

So, try to put TTL value in that file and you're done. If it's not there, try to add it.

You can also set environment variable in tachyon-env.sh.

# Worker size set to 512 MB 
# Set worker folder to /Volumes/ramdist/tachyonworker
# Set TTL to your value

export TACHYON_JAVA_OPTS="
  -Dtachyon.worker.memory.size=512MB 
  -Dtachyon.worker.data.folder=/Volumes/ramdisk/tachyonworker/
  -Dtachyon.master.ttlchecker.interval.ms=<YOUR TTL VALUE>
"
dkol
  • 1,421
  • 1
  • 11
  • 19
  • That would be how to set env variables and not TTLs of specific files. The `tachyon.master.ttlchecker.interval.ms` determines how often Tachyon will check files to see if they have expired. AFAIK there is nothing else in there to do with TTL. I would also expect that setting a TTL would be done on a per-file basis. – Shane Kinsella Oct 27 '15 at 15:28