Spring XD analytic-pmml or analytics-ml-pmml 1.1.1 Release Missing Options - spring-xd

I am running spring-xd release 1.1.1 and it appears the analytic-pmml and analytics-ml-pmml are missing the options available in the examples in the documentation. I have built the new analytics-ml-pmml from master, but when I look at the processor options I see the following:
xd:>module info --name processor:analytics-ml-pmml
Information about processor module 'analytics-ml-pmml':
outputType how this module should emit messages it produces
inputType how this module should interpret messages it consumes
I expect to see the other options in the example such as inputFieldMapping, location, modelName, and outputFieldMapping that are referenced in the documentation here:
https://github.com/spring-projects/spring-xd-modules/tree/master/analytics-ml-pmml
Am I missing something? Is there an easy fix to this?

I have just tried to build and upload the JPMML module and I could see all the supported module options.
This is what I did:
From https://github.com/spring-projects/spring-xd-modules/tree/master/analytics-ml-pmml,
./gradlew clean test bootRepackage
and then upload to XD module registry using 'module upload' in XD shell:
xd:>module upload --type processor --name jpmml --file /spring-xd-modules/analytics-ml-pmml/build/libs/spring-xd-analytics-ml-pmml-1.2.0.BUILD-SNAPSHOT.jar
Successfully uploaded module 'processor:jpmml'
xd:>module info processor:jpmml - This listed all the supported module options.

I don't know how you got any information from the module info command if the pmml module was not uploaded.
Here is what I observe.
1.1.1.RELEASE | Admin Server Target: http://localhost:9393
Welcome to the Spring XD shell. For assistance hit TAB or type "help".
xd):module info --name processor:analytics-ml-pmml Command failed org.springframework.xd.rest.client.impl.SpringXDException: Could not find module with name 'analytics-ml-pmml' and type 'processor'
BTW - the reason that the pmml module is not shipped with XD is that the license of the library used to implement the module is GPL. See https://github.com/jpmml/jpmml-evaluator/blob/master/LICENSE.txt This does not allow for us to ship the .jar in the XD distribution .zip file. That is why the source code lives in the separate repo - https://github.com/spring-projects/spring-xd-modules/tree/master/analytics-ml-pmml
I will made a note of this in the README for the module.

Related

Generating OpenAPI spec for Google Config Connector

I'm trying to use the Kube OpenAPI tool openapi-gen to generate OpenAPI specs for Google's Config Connector.
I'm relatively new to Go, so I'm not sure whether this is a configuration error on my part or if I'm simply using it wrong.
I've cloned the Kube OpenAPI repo, and inside of that directory I've cloned the Config Connector repo, for simplicity.
This is what's happening when I try to generate an OpenAPI spec file.
$ go run cmd/openapi-gen/openapi-gen.go -i ./k8s-config-connector/pkg/apis/serviceusage/v1beta1 -p foo.com/foo -h ./boilerplate/boilerplate.go.txt
E0811 16:45:57.516697 22683 openapi.go:309] Error when generating: TypeMeta, TypeMeta invalid type
2021/08/11 16:45:57 OpenAPI code generation error: Failed executing generator: some packages had errors:
failed to generate default in ./k8s-config-connector/pkg/apis/serviceusage/v1beta1.Service: TypeMeta: not sure how to enforce default for Unsupported
exit status 1
What's going on here?
Here are some troubleshooting steps:
1 - GOROOT variable should be set and point to root of go installation
2- Operator-sdk depended on it being exported as an environment variable. Run the below command
export GOROOT=$(go env GOROOT)
when using the operator-sdk, it is necessary to either (a) set GOROOT in your environment, or (b) use the same GOROOT that was used to build the operator-sdk binary.
Refer to the link for additional information.

module java.base does not "opens java.lang.reflect" to module com.jfoenix

Before start describing how I'm getting this error, here is some important information:
It is essential the usage of the module-info.java in my project since jpackage won't work without using it.
I'm using SDK 14.0.2 (this is the minimum version that enables the usage of package)
Every comment will be appreciated; although, if you're going to comment something related to using a specific VM argument, I ask you to press ctrl+F to check if I'm already using the argument you're going to suggest -since there's a bunch of VM arguments in my build.gradle-
Ok, let's take a look about my issue:
First, focus on the VM argument below:
"--add-opens=java.base/java.lang.reflect=com.jfoenix",
If I don't use this argument, the following error pops up when the program runs:
java.lang.reflect.InaccessibleObjectException: Unable to make boolean java.lang.reflect.AccessibleObject.setAccessible0(boolean)
accessible: module java.base does not "opens java.lang.reflect" to module com.jfoenix
IMPORTANT -> This is how my view shows without using the mentioned VM argument (let's call it image 1):
https://snipboard.io/QJ5Fdc.jpg
"Ok, so why don't you just use the VM argument?"
Great question! Alright, let's add it to my VM arguments and run the program once again.
After doing so, this is how my view looks like right now (let's call it image 2): https://snipboard.io/fbhGxw.jpg
Great! This is exactly how my view should be (note that considering it worked as expected, I've got no errors this time).
So, with everything working, I can finally move on and run my jpackage gradle task. After doing so, things stop making sense, since after executing my program through a .exe (generated by jpackage) my view looks like the "image 1" view, regardless the fact that my project is working properly when I run it with the "run" gradle task.
Any thoughts on why is this happening? (My guess is that my module-info.java is the key to solve it, since every time I remove an "opens" statement, e.g.: "opens my.package.name to javafx.fxml", the program gets me almost the equal error).
Let me know whether any code samples will be needed. All assistance will be appreciated. Thanks!
edit: related GitHub issue: enter link description here
I don't know how the jpackage gradle task works, I use the jpackage tool inside the jdk via console and I used this arguments when creating the package
--java-options "--add-opens com.gluonhq.scenebuilder.kit/com.oracle.javafx.scenebuilder.kit.util.control.paintpicker=javafx.fxml --add-opens com.gluonhq.scenebuilder.kit/com.oracle.javafx.scenebuilder.kit.util.control.paintpicker.colorpicker=javafx.fxml"
In there I opened the PaintPicker from scene builder kit to javafx.fxml
As you can see I had to open two packages (they were really five but its too much to put in here) and you have to specify --add-opens for each package to open
I'm putting the code y used to package the application using jpackage
jpackage.exe
--module-path
.;D:\builds\ikonlibrowser\target\ikonlibrowser.jar;
D:\builds\ikonlibrowser\libs\icons\ikonli-antdesignicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-bootstrapicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-boxicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-bpmn-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-captainicon-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-carbonicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-codicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-coreui-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-dashicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-devicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-elusive-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-entypo-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-evaicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-feather-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-fileicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-fluentui-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-fontawesome-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-fontawesome5-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-fontelico-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-foundation-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-hawcons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-icomoon-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-ionicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-ionicons4-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-jamicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-ligaturesymbols-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-lineawesome-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-linecons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-maki-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-maki2-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-mapicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-material-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-material2-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-materialdesign-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-materialdesign2-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-medicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-metrizeicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-microns-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-ociicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-octicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-openiconic-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-paymentfont-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-prestashopicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-remixicon-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-runestroicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-simpleicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-simplelineicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-subway-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-themify-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-typicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-unicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-weathericons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-websymbols-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-whhg-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-win10-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\icons\ikonli-zondicons-pack-12.2.0.jar
D:\builds\ikonlibrowser\libs\scenebuilder-kit-16.0.0.jar;
D:\builds\ikonlibrowser\libs\jfoenix-9.0.10.jar
D:\builds\ikonlibrowser\libs\ikonli-core-12.2.0.jar;
D:\builds\ikonlibrowser\libs\ikonli-javafx-12.2.0.jar
--module jcc.app.ikonlibrowser/jcc.app.ikonlibrowser.Main
--name "Ikonli Browser" -d D:\builds\ikonlibrowser
--win-dir-chooser
--input D:\builds\ikonlibrowser\app
--vendor jCC
--app-version "1.0.0"
--java-options
"--add-opens com.gluonhq.scenebuilder.kit/com.oracle.javafx.scenebuilder.kit.util.control.paintpicker=javafx.fxml
--add-opens com.gluonhq.scenebuilder.kit/com.oracle.javafx.scenebuilder.kit.util.control.paintpicker.colorpicker=javafx.fxml
--add-opens com.gluonhq.scenebuilder.kit/com.oracle.javafx.scenebuilder.kit.util.control.paintpicker.rotator=javafx.fxml
--add-opens com.gluonhq.scenebuilder.kit/com.oracle.javafx.scenebuilder.kit.util.control.paintpicker.slider=javafx.fxml
--add-opens com.gluonhq.scenebuilder.kit/com.oracle.javafx.scenebuilder.kit.util.control.paintpicker.gradientpicker=javafx.fxml"
Of course this is only one line.
Now i'll explain it step by step:
--module-path This argument is used to specify the path for all the modules your app uses. Including the application .jar
--module This argument specifies the main class of the application. Putting first the module name and then the class full name.
--name This is to specify the app name.
-d Specifies the output path.
--win-dir-chooser Gives the option to select the installation path when installing the packaged app
--input Specifies a folder containing the external resources for your app
--vendor The vendor's name. Maybe your name
--app-version The version of your application
--java-options The jvm options
I hope it works for you, sorry for the delay.

Is it possible to generate tags dynamically in Google Cloud Build?

First of all: I am somewhat new to cloud build. Compared to previously used methods, I find it a wrenching, unripe and fairly annoying framework. Endless time is spend getting builders to work that supposedly work out of the box (like the helm builder for example), and it's limitations are astonishing and frustrating. Perhaps the following problem is a good example:
I would like to build and push a docker image. According to the documentation, the images to be pushed to the docker repository at the end (I'm using GCR for this) reside in the following configuration section in my cloudbuild.yaml file:
images:
- 'eu.gcr.io/$PROJECT_ID/my-project:${_TAG}'
- 'eu.gcr.io/$PROJECT_ID/my-project:latest'
I can set the _TAG substitution manually by using the section:
substitutions:
_TAG: x.y.z
but that means I have to manually fix the version number in this file every time. Worse still: if I branch out, I need to maintain the version number all the time. I have a python project in this case and it uses setuptools, the version is naturally contained in the setup.py file and I can parse it out with no problem. Attempts to parse the number into a specific file and use $(cat VERSION) in the images section fail, because the system claims it can't substitute the $(cat VERSION) part. So how can I overwrite the _TAG variable inside of another build step such, that it appears correct in the 'images' section?
If you are using triggered builds from Cloud Source Repositories, GitHub, or Bitbucket you can tag your commit and use the $TAG_NAME default substitution variable.
images:
- 'eu.gcr.io/$PROJECT_ID/my-project:$TAG_NAME'
- 'eu.gcr.io/$PROJECT_ID/my-project:latest'
On the other hand if you are using the Cloud SDK to submit the Cloud Build build you can provide values with the --substitutions argument:
gcloud builds submit [SOURCE] --config config.yaml --substitutions _TAG=x.y.z
Also I believe you would find this GitOps-style continuous delivery with Cloud Build tutorial very helpful. It explains how to create a continuous integration and delivery (CI/CD) pipeline on Google Cloud Platform using Cloud Build.
You can tag your image with several tags using cloudbuild.yaml and define the Docker build step with:
steps:
- name: gcr.io/cloud-builders/docker
args:
- build
- '--no-cache'
- '-t'
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA'
- '-t'
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:latest'
- .
- '-f'
- Dockerfile.prod
id: Build
And resulting images with:
images:
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA'
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:latest'

Yocto parallel configuration packages files conflict

I have a base package that gives my functionality (wireguard-tools, taken from internet).
This package includes no configuration files for the network interfaces (as it should).
Then I created a few packages with this configuration files that are only to be deployed one for each respective image (e.g. image-1 includes wireguard-1-conf while image-2 includes wireguard-2-conf).
I would like to setup SystemD, but I can only do this when I have an interface configured, and it will only happen when the *-conf package is installed.
Unfortunately, the SystemD service file ("wg-quick#.service") is deployed by wireguard-tools package and my dependent package, the *-conf one, cannot see it:
ERROR: Function failed: SYSTEMD_SERVICE_wireguard-1-conf value wg-quick#wg0.service does not exist
I managed to do a dirty workaround but I feel dirtiest doing this in my *-conf recipe:
do_install_append () {
touch ${D}${systemd_system_unitdir}/wg-quick#wg0.service
pkg_postinst_${PN} () {
rm -f $D/${systemd_system_unitdir}/wg-quick#wg0.service
How should I proceed to make it work "the right way"?
Is there an elegant way of making "wg-quick#.service" from wireguard-tools accessible to *-conf?
Thanks in advance.
Additional Info
My *-conf recipes inherit systemd and include wireguard-tools dependency:
inherit systemd
...
DEPENDS_${PN} = "wireguard-tools"
RDEPENDS_${PN} = "wireguard-tools"
I so nothing else worth to mention in my recipes.

Why doesn't my NiFi Nar show up in the processor list?

Just made my first NAR from a tutorial, put it in the /lib file and restarted NiFi. The Processor shows up as loaded in the logs but does not show up in the processor list. Any ideas?
Tutorial: http://www.nifi.rocks/developing-a-custom-apache-nifi-processor-json/
#SideEffectFree
#Tags({"JSON", "NIFI ROCKS"})
#CapabilityDescription("Fetch value from json path.")
public class JsonProcessor extends AbstractProcessor {
...
}
Edit:
I see two lines in the logs with this in it:
2017-07-06 19:34:06,200 INFO [main] org.apache.nifi.nar.NarClassLoaders Loaded NAR file: C:\UserApps\NIFI-1~1.0\.\work\nar\extensions\examples-1.0-SNAPSHOT.nar-unpacked as class loader org.apache.nifi.nar.NarClassLoader[.\work\nar\extensions\examples-1.0-SNAPSHOT.nar-unpacked]
What should the processor be called in the list? JsonProcessor?
Edit:
Tried changing the <nifi.version>1.3.0</nifi.version> in the pom from 1.2.0 to 1.3.0. No joy.
So on top of coding up the program you must put a file called
org.apache.nifi.processor.Processor
in YOUR project to get it to show up. I would suspect NiFi would scan for the classes with the annotations but alas, it does not. Probably some security thing.
The tutorial above does have this in it. "Browsing" got me again!
I also used this tutorial to create a Customer Processor. The issue I had was that I mixed up the ./lib directory.
When you start Apache Nifi, you would notice the following at the beginning of the log:
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
NiFi home: /usr/local/Cellar/nifi/1.6.0/libexec
Confirm that the NAR file is the $NIFI_HOME/libexec/lib folder which would be /usr/local/Cellar/nifi/1.6.0/libexec/lib in my case.
I hope this helps
NB: I ran Apache Nifi on a Mac, logs might be different on another OS

Resources