This guide will help you address performance issues with Karaf, using background information on known Karaf issues, as well as step-by-step instructions on addressing them for Pentaho.
Set Up Write Permissions for Directories Containing Karaf
Your users may experience performance issues when launching Kitchen or Pan unless you set up some variables specific to Karaf. You will need to set these up on individual workstations for users of Kitchen and Pan. Setting these variables makes sure that Kitchen and Pan launch as quickly as they did for 5.x. You can use these variables for Pentaho Report Designer, which also uses Karaf.
Previously, non-admin users would need to have write permissions for the directories where they installed Pentaho client tools. If they had read and execute permissions only, their client tools would fail for two reasons:
data/cachefolder could not be created
- Contents in the
karaf/etcfolder could not be modified
This same issue happened when trying to deploy a Pentaho Server within a Yarn or MapR cluster.
Solution - Define -D Variables for Karaf
As of 188.8.131.52, if a non-admin user is deploying a client tool with Karaf or executing a MapReduce job in Hadoop where their File System Level user only has read and execute permissions, the Karaf deployable content is written to a temporary directory where the user has write access. In this case, Karaf deploys to the user’s home directory OR a global tmp directory based on the file system. This deployment is used for this execution only and is deleted on exit of the application.
Two variables are used together specifically for Karaf deployments, one defines the location and the other allows for directory cleanup:
If you are defining this variable, the final directory should not exist yet. When the client is started, it will create the ending directory you have specified in the variable.
- Directory cleanup:
- True forces the karaf folder to delete itself on exit of the application.
- False allows the deployed files to stay in this location and be reused for a later execution.
You can gain faster performance by using the following the Karaf variables guidelines in workstation environments to improve deployment speeds for Karaf enabled applications. It enables users to reuse the deployed Karaf content instead of re-deploying for each execution.
Below is an example of how to configure these variables to leverage Karaf. You will need to define your system variable and then add
-D parameters to Spoon and/or PRD.
Define System Variable
An Administrator will need to define the following system variable with the file system PENTAHO_KARAF_ROOT. The dir directory should not already exist, the executed application needs to create this directory on initial execution. For example:
Add -D Parameters to Spoon and/or PRD
For this PENTAHO_KARAF_ROOT variable to be used by the application, the following
–D parameters need to be added to Spoon and/or PRD. Files such as Kitchen and Pan will reference these parameters from Spoon.
–D parameters with their values are needed:
In Spoon and PRD, these parameters need to be added to the java OPT location in the
spoon.bat files. Typically, these changes should only be applied to client tools.