Hortonworks Streaming Analytics Manager User Guide
Also available as:
PDF

Building Custom Functions

About This Task

After you create a UDAF, you can create a new maven project and build the .jar files to add to SAM. You can have multiple UDAFs in a single maven project. All of them are bundled into a single jar which can be uploaded.

Steps

  1. Create a new maven project and add streamline-sdk.

  2. Generate the UDAF .jar file:

    mvn clean install

Result

The UDAF .jar file is created and you are ready to upload it to SAM.

Example pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <groupId>test</groupId>
    <version>0.1</version>
    <modelVersion>4.0.0</modelVersion>
 
    <artifactId>my-custom-functions</artifactId>
 
    <dependencies>
        <dependency>
            <groupId>com.hortonworks.streamline</groupId>
            <artifactId>streamline-sdk</artifactId>
            <version>0.1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>
</project>