[JAVA] I tried to create a plug-in with HULFT IoT Edge Streaming [Execution] (3/3)

Introduction

Hello. Yorozu Counselor Sugimon: yum :. This time, I will try to develop a component (adapter) using the SDK of HULFT IoT Edge Streaming. It is described so that it will be completed in all three parts.

What to do this time

This time, as the third step, I will try to build and execute the plug-in developed with the HULFT IoT EdgeStreaming Plugin SDK. The first and second articles are below, so please refer to them.

: arrow_forward: [I tried to create a plug-in with HULFT IoT Edge Streaming Setup] (https://qiita.com/sugimon/items/cf7503479c6e4c46c3b3) : arrow_forward: [I tried to create a plug-in with HULFT IoT Edge Streaming Development](https://qiita.com/sugimon/items/67bdd6f610e03cdfcef2) : arrow_forward: I tried to create a plug-in with HULFT IoT Edge Streaming Execution

Build plugin

This time, let's build the created plug-in. * I am trying using a Windows PC. In addition, it should be noted $ SDK_HOME points to the EdgeStreaming SDK home directory. $ DATASPIDER_HOME points to the Edge Streaming home directory.

Build

To build the plugin, execute the following command from $ SDK_HOME / dev / sample_adapter.

$ ant

image.png

After executing the command, BUILD SUCCESSFUL is output, and if the following files are created, the build is successful.

$ SDK_HOME / dev / sample_adapter / build  sample_adapter.jar ・ $ SDK_HOME / dev / sample_adapter / build / plugin / sample_plugin Go executable for each target

image.png

Copy icon file

Create an icon file that will actually be used on the Edge Streaming Studio screen. After a successful build, $ SDK_HOME / dev / sample_adapter / META-INF will be generated, so copy the sample file of the icon and rename it.

-Copy of Icon for Source Operation $SDK_HOME/dev/conf/operation.source.icon ⇒ $SDK_HOME/dev/sample_adapter/META-INF/operation.sample_source.icon

-Copy of icon for Sink Operation $SDK_HOME/dev/conf/operation.sink.icon ⇒ $SDK_HOME/dev/sample_adapter/META-INF/operation.sample_sink.icon

-Copy of UDSF Operation icon $SDK_HOME/dev/conf/operation.udsf.icon ⇒ $SDK_HOME/dev/sample_adapter/META-INF/operation.sample_udsf.icon

Check the module.properties file

Confirm that the $ SDK_HOME / dev / sample_adapter / META-INF / module.properties file was created successfully.

This properties file is based on the properties defined in the $ SDK_HOME / dev / sample_adapter / config.properties file. image.png

Plugin installation

To install the adapter, specify the install target as the first argument of the ant command from $ SDK_HOME / dev / sample_adapter.

$ ant install

image.png

After executing ant install, it will be installed as follows. -The Java module will be installed. Under $ DATASPIDER_HOME / server / plugin / data_processing / modules

-The Golang module will be installed. Under $ DATASPIDER_HOME / server / es-agent / plugin

Let's run

Now, let's execute the created plug-in.

Launch Edge Streaming

-Start Edge Streaming.

image.png

・ Let's check the created plug-in. Create a project from a new project. image.png

Create a script. image.png

Check the plugin

Confirm that the created plug-in is created in the "Tool Palette". I think that the following plug-ins are created under "Sample" in the "Tool Palette".

image.png

Let's create a simple process

**-Input processing (operation to generate pseudo-random numbers at regular time intervals) ** Place the process created by Source Operation. Drag and drop Sample source from Sample on the tool palette to move it to the center.

image.png

**-Output processing (operation to truncate to the number of valid decimal places and output to the log) ** Place the process created by Sample Sink. Drag and drop the Sample sink from Sample on the tool palette to move it to the center.

image.png

** Mapping process ** Drag and drop the input processing icon to connect the icon to the output processing. Right-click on the connected line and select Add Mapping. image.png

Open the mapping icon. image.png

-Connect the input source "value" and the output destination "value". -Place the tool palette-> character string-> basic-> character string constant in the output destination "formula", Specify any character string and connect it to "formula". image.png

** entire script ** You have created a script like this. image.png

Let's run

Let's execute the script created from the green arrow on the screen menu.

image.png

You can see that pseudo-random numbers are generated for each specified interval and the value is output with the specified number of decimal places. image.png

Also, by using the created UDSF operation icon, you can perform four arithmetic operations on the acquired value. Please combine and try various things.

Finally

As the final part of the trilogy, this time I tried to build and execute the plugin. In this way, it is possible to implement plug-in processing using the SDK. I hope this article will guide you in the development of plugins.

In this blog, I would like to continue to introduce the contents of consultations at the "Yorozu Consultation Counter" of technology and the tricks that were born.

Please continue to check it out and follow us if you like.

See you again!

Recommended Posts

I tried to create a plug-in with HULFT IoT Edge Streaming [Execution] (3/3)
I tried to create a plug-in with HULFT IoT Edge Streaming [Development] (2/3)
I tried to create a plug-in with HULFT IoT Edge Streaming [Setup] (1/3)
I tried to automatically create a report with Markov chain
I tried to create a linebot (implementation)
I tried to create a linebot (preparation)
I tried to create a list of prime numbers with python
I tried to create Bulls and Cows with a shell program
I tried to put HULFT IoT (Edge Streaming) in the gateway Rooster of Sun Electronics
I tried to create a program to convert hexadecimal numbers to decimal numbers with python
I want to create a plug-in type implementation
[Outlook] I tried to automatically create a daily report email with Python
When I tried to create a virtual environment with Python, it didn't work
I tried to create a button for Slack with Raspberry Pi + Tact Switch
I tried to create a model with the sample of Amazon SageMaker Autopilot
I tried to draw a route map with Python
I tried to automatically generate a password with Python3
I want to manually create a legend with matplotlib
I tried to create a reinforcement learning environment for Othello with Open AI gym
[Python] I tried to automatically create a daily report of YWT with Outlook mail
I tried to create a class to search files with Python's Glob method in VBA
I tried scraping food recall information with Python to create a pandas data frame
I tried to implement a volume moving average with Quantx
I tried to solve a combination optimization problem with Qiskit
I tried to get started with Hy ・ Define a class
I tried to sort a random FizzBuzz column with bubble sort.
I tried to create a bot for PES event notification
I tried to divide with a deep learning language model
I tried to create an article in Wiki.js with SQLAlchemy
I tried to make it on / off by setting "Create a plug-in that highlights double-byte space with Sublime Text 2".
I tried to create Quip API
[5th] I tried to make a certain authenticator-like tool with python
[2nd] I tried to make a certain authenticator-like tool with python
A memorandum when I tried to get it automatically with selenium
I wanted to create a smart presentation with Jupyter Notebook + nbpresent
[3rd] I tried to make a certain authenticator-like tool with python
[Python] A memo that I tried to get started with asyncio
I tried to make a periodical process with Selenium and Python
I tried to register a station on the IoT platform "Rimotte"
I tried to make a 2channel post notification application with Python
I tried to make a todo application using bottle with python
[4th] I tried to make a certain authenticator-like tool with python
[1st] I tried to make a certain authenticator-like tool with python
I tried to make a strange quote for Jojo with LSTM
I tried to make a mechanism of exclusive control with Go
I tried to unlock the entrance 2 lock sesame with a single push of the AWS IoT button
I tried to easily create a high-precision 3D image with one photo [2]. (Try processing depth with numpy)
I tried to implement Autoencoder with TensorFlow
I tried to visualize AutoEncoder with TensorFlow
I tried to get started with Hy
I tried to implement CVAE with PyTorch
I tried to make a Web API
I tried to solve TSP with QAOA
I tried to introduce a serverless chatbot linked with Rakuten API to Teams
Python: I tried to make a flat / flat_map just right with a generator
I tried to communicate with a remote server by Socket communication with Python.
I tried to implement a blockchain that actually works with about 170 lines
I tried to make a calculator with Tkinter so I will write it
I tried to make "Sakurai-san" a LINE BOT with API Gateway + Lambda
I tried to make a traffic light-like with Raspberry Pi 4 (Python edition)
I tried to discriminate a 6-digit number with a number discrimination application made with python