Creating Custom Builder Components
Also available as:
PDF

Building Custom Functions

Once you have created a UDAF, 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.

  1. Create a new maven project and add streamline-sdk. A sample pom.xml file is provided below.
  2. Generate the UDAF .jar file by running:
    mvn clean install

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>