Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
BIRT 2.4 & 2.6.2 - DataEngine Folder in temp not being cleaned-up
snmadhav
Hi,
The DiskDataSetCacheObject class present in org.eclipse.birt.data_2.6.2.r262_v20110215.jar is creating the DataEngine folder to hold the DataSetCacheObject. We have a long running server and hence reboots aren't common and the system temporary folder doesn't get cleaned up. The /tmp space is getting filled up and over the last 6 months, all the space allocated has been used up. Is there some setting or parameter which needs to be set so that these files are deleted once consumed by the report?
Apologies if this question was already asked and answered but my searches on the forum didn't provide me the information.
Environment : RHEL 4, WAS 7.0.0.11, BIRT 2.4 & 2.6.2 as well.
In the meantime, we have set up a script running daily to delete the entries.
find /tmp/DataEngine_* -mtime +1 -exec rm -r {} \;
Is this a good/right approach?
Thanks & regards,
Madhav
Find more posts tagged with
Comments
mwilliams
I believe that temporary files are deleted when you call platform.shutdown(). So, if you never shut your application down or at least restart the BIRT platform, it would probably continue to store the temporary files. If the approach you're using works for you, it's probably as good as any solution.
snmadhav
Thank you Michael.
mwilliams
You're welcome. Let us know whenever you have questions!
snmadhav
Michael,
Is there a way in which we can specify the directory where these files get created instead of the system temporary directory (Eg: /tmp) ?
Thanks & regards,
Madhav
mwilliams
If you don't have a value set in your engine config, the system temp file is the default, i.e.
System.getProperty( "java.io.tmpdir" );
If you're using the api's you can do:
EngineConfig config = new EngineConfig();
config.setTempDir("yourTempLocation");
If using the web viewer, put this in the beforeFactory of a report and run it in your deployed viewer to change the default:
reportContext.getReportRunnable().getReportEngine().getConfig().setTempDir("yourTempLocation");
Hope this helps.
snmadhav
Hi Michael,
Setting the temp directory to a different location isn't helping us. I searched the documentation and found
http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.birt.doc.isv/data/api/org/eclipse/birt/data/engine/api/class-use/IBaseDataSetDesign.html
. But this is if we are using APIs. The problem in the middleware would be that the datasource and datasets would be different for each report. So we have to use some such method in the report itself just before it closes to clear the cache. Is there a way this method could be called from within the report file maybe in the 'afterRender' script?
Thanks & regards,
Madhav
HIC
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="84198" data-time="1318870675" data-date="17 October 2011 - 09:57 AM"><p>
I believe that temporary files are deleted when you call platform.shutdown(). So, if you never shut your application down or at least restart the BIRT platform, it would probably continue to store the temporary files. If the approach you're using works for you, it's probably as good as any solution.<br /></p></blockquote>
<br />
Hi Michael,<br />
<br />
I have used the org.eclipse.birt.core.framework.Platform.shutdown()in my current RCP project,but it did not do the clean up job.I try to debug the BIRT Platfrm code,I found ,OSGILauncher object would be null(as Platform object is set by CorePlugin,even Platform.starup(config) API did not help me) so no clean up happens.Is there any effective API which could help me with the same.<br />
<br />
Additional information : BIRT version 2.6.2<br />
<br />
BR><br />
HIC