This post is more than 5 years old
12 Posts
0
3966
March 10th, 2009 01:00
Best Practice: How to clean up temporary files?
The Centera SDK creates a lot of temporary files. Which is the best practice to clean them up? I tried to do it by myself with every incoming request. But that takes first a lot of time when already a lot of files there, second the Centera SDK keeps the file handle for a long time, so the deletion many times fails.
Do I miss something? Is there a flag to tell the Centera SDK to clean up the temporary files automaticly as soon as they are not longer needed?
No Events found!
YT.Kim
20 Posts
0
March 18th, 2009 22:00
FP_OPTION_BUFFERSIZE is local option so you need to open the pool and set it using setOption() method like this.
FPPool fpPool = new FPPool(CENTERA_ADDR);
fpPool.setOption(FPLibraryConstants.FP_OPTION_BUFFERSIZE, 1024 * 1000);
Regards
YT
nishiichinoe
12 Posts
0
March 10th, 2009 03:00
Dear Graham,
Thank you very much for your quick reply! I tried what you suggested and I found this kind of code commented out. So I uncommented this line:
FPPool.setGlobalOption(FPLibraryConstants.FP_OPTION_BUFFERSIZE, 1024 * 1000);
But I got:
com.filepool.fplibrary.FPLibraryException: FP_SetIntOption/GetIntOption: unknown option name
Is there a new constant name for it?
Best Regards,
Andreas
gstuartemc
2 Intern
•
417 Posts
0
March 10th, 2009 03:00
The Centera SDK should only very *rarely* have to create a temporary file. This symptom suggests to me that you are creating Clips with large amounts of metadata or including several embedded blobs.
The default size for the CDF buffer is 16KB - if you are creating clips as descibed above then you should increase this value either by setting it programmatically or via the Environment Varaible FP_OPTION_BUFFERSIZE. Try setting it to 1000 * 1024 which will allow 1MB of metadata or base64 embedded blobs.
gstuartemc
2 Intern
•
417 Posts
1
March 19th, 2009 03:00
Or, as I originally suggested, set it using the Environment Variables.