Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can extend the <a href="https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0/components/analytics/org.wso2.carbon.analytics.hive/4.0.5/src/main/java/org/wso2/carbon/analytics/hive/extension/AbstractHiveAnalyzer.java" rel="nofollow">AbstractHiveAnalyzer</a> and write you own class which executes the query and set the hive conf value, similar to this <a href="https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0/components/stratos/usage/org.wso2.carbon.usage.summary.helper/1.0.0/src/main/java/org/wso2/carbon/usage/summary/helper/HourlyServiceStatsSummarizerHelper.java" rel="nofollow">summarizer</a>. Here you can see the execute() method should be implemented and this will be called by BAM. Here you can add your preferred query and assign the hive conf with 'setProperty("your_hive_conf", yourResult.string());'.</p> <p>You can build your java application as typical '.jar' file or osgi bundle. If you have packaged as just a '.jar' file, then you should place the jar in $BAM_HOME/repository/components/lib. If you packaged the application as osgi bundle, then place the file in $BAM_HOME/repository/components/dropins folder. And restart BAM server.</p> <p>And finally in your hive script that you add in BAM, you should include you extended class as 'class your.package.name.HiveAnalyzerImpl;', so that BAM will run the execute() method which you have implemented in your class and your hive conf will be set. And then, value you have set for your hive conf can be used in the hive script as ${hiveconf:your_hive_conf}. </p> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload