Skip to content

Commit

Permalink
Update nifi core to 1.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
anmunoz committed Dec 12, 2021
1 parent c5f8f4c commit 9e921e2
Show file tree
Hide file tree
Showing 16 changed files with 322 additions and 266 deletions.
26 changes: 17 additions & 9 deletions nifi-ngsi-bundle/nifi-ngsi-bundle.iml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,23 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.7.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.7.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.7.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.7.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.7.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.28.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.9.10" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.10" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.slf4j:slf4j-simple:1.7.30" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.codehaus.groovy:groovy-test:2.5.4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.codehaus.groovy:groovy:2.5.4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.11.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.11.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.11.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:3.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.11.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.slf4j:slf4j-simple:1.7.32" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.slf4j:slf4j-api:1.7.32" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.codehaus.groovy:groovy-test:2.5.14" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.codehaus.groovy:groovy:2.5.14" level="project" />
</component>
</module>
190 changes: 105 additions & 85 deletions nifi-ngsi-bundle/nifi-ngsi-nar/nifi-ngsi-nar.iml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions nifi-ngsi-bundle/nifi-ngsi-nar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<parent>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-ngsi-bundle</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
</parent>

<artifactId>nifi-ngsi-nar</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
<packaging>nar</packaging>
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
Expand All @@ -34,7 +34,7 @@
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-ngsi-processors</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
</dependency>
</dependencies>
</project>
289 changes: 157 additions & 132 deletions nifi-ngsi-bundle/nifi-ngsi-processors/nifi-ngsi-processors.iml

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions nifi-ngsi-bundle/nifi-ngsi-processors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
<parent>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-ngsi-bundle</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
</parent>

<artifactId>nifi-ngsi-processors</artifactId>
<packaging>jar</packaging>
<properties>
<mongo.driver.version>3.12.7</mongo.driver.version>
<nifi.version>1.13.0</nifi.version>
<nifi.version>1.15.0</nifi.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -213,7 +213,7 @@
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-database-utils</artifactId>
<version>1.13.0</version>
<version>1.15.0</version>
</dependency>


Expand All @@ -230,7 +230,7 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,11 @@ void apply(final ProcessContext context, final ProcessSession session, final Fun
System.out.println(postgres.checkColumnNames(tableName));
conn.createStatement().execute(postgres.createSchema(schemaName));
conn.createStatement().execute(postgres.createTable(schemaName, tableName,listOfFields));
ResultSet rs = conn.createStatement().executeQuery(postgres.checkColumnNames(tableName));
/*ResultSet rs = conn.createStatement().executeQuery(postgres.checkColumnNames(tableName));
newColumns = postgres.getNewColumns(rs,listOfFields);
if (newColumns.size()>0){
conn.createStatement().execute(postgres.addColumns(schemaName,tableName,newColumns));
}
}*/
System.out.println(schemaName+"."+tableName+" columns -------- : ");

} catch (SQLException s) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,16 @@ public String buildSchemaName(String service,boolean enableEncoding,boolean enab

public String createSchema(String schemaName) {
String query = "create schema if not exists " + schemaName + ";";
System.out.println(query);
return query;
}

public String createTable(String schemaName,String tableName, ArrayList<String> listOfFields){

String query= "create table if not exists "+schemaName+"." + tableName + " " + getFieldsForCreate(listOfFields) + ";";
System.out.println(query);
return query;

}

public String buildTableName(String fiwareServicePath,Entity entity, String dataModel, boolean enableEncoding, boolean enableLowercase, String ngsiVersion, boolean ckanCompatible)throws Exception{
Expand Down
6 changes: 3 additions & 3 deletions nifi-ngsi-bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
<parent>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-nar-bundles</artifactId>
<version>1.13.0</version>
<version>1.15.0</version>
</parent>

<groupId>org.apache.nifi</groupId>
<artifactId>nifi-ngsi-bundle</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
<packaging>pom</packaging>

<modules>
Expand All @@ -38,7 +38,7 @@
<!-- what builds the NAR file... -->
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-nar-maven-plugin</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
<extensions>true</extensions>
</plugin>
<plugin>
Expand Down
8 changes: 4 additions & 4 deletions nifi-ngsi-cassandra/nifi-ngsi-cassandra-nar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<parent>
<groupId>nifi-ngsi-cassandra</groupId>
<artifactId>nifi-ngsi-cassandra-bundle</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
</parent>

<artifactId>nifi-ngsi-cassandra-nar</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
<packaging>nar</packaging>
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
Expand All @@ -34,12 +34,12 @@
<dependency>
<groupId>nifi-ngsi-cassandra</groupId>
<artifactId>nifi-ngsi-cassandra-processors</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-cassandra-services-api-nar</artifactId>
<version>1.13.0</version>
<version>1.15.0</version>
<type>nar</type>
</dependency>
</dependencies>
Expand Down
12 changes: 6 additions & 6 deletions nifi-ngsi-cassandra/nifi-ngsi-cassandra-processors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<parent>
<groupId>nifi-ngsi-cassandra</groupId>
<artifactId>nifi-ngsi-cassandra-bundle</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
</parent>
<properties>
<nifi.version>1.13.0</nifi.version>
<nifi.version>1.15.0</nifi.version>
</properties>

<artifactId>nifi-ngsi-cassandra-processors</artifactId>
Expand Down Expand Up @@ -55,9 +55,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
<version>3.3.0</version>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-core</artifactId>
<version>4.13.0</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
Expand All @@ -68,7 +68,7 @@
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-ngsi-processors</artifactId>
<version>1.3.6</version>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions nifi-ngsi-cassandra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<parent>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-nar-bundles</artifactId>
<version>1.13.0</version>
<version>1.15.0</version>
</parent>

<groupId>nifi-ngsi-cassandra</groupId>
<artifactId>nifi-ngsi-cassandra-bundle</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
<packaging>pom</packaging>

<modules>
Expand All @@ -37,7 +37,7 @@
<!-- what builds the NAR file... -->
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-nar-maven-plugin</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
<extensions>true</extensions>
</plugin>
<plugin>
Expand Down
8 changes: 4 additions & 4 deletions nifi-ngsi-dynamo/nifi-ngsi-dynamo-nar/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<parent>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-ngsi-dynamodb-bundle</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
</parent>

<artifactId>nifi-ngsi-dynamo-nar</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
<packaging>nar</packaging>
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
Expand All @@ -34,12 +34,12 @@
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-ngsi-dynamo-processors</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-aws-service-api-nar</artifactId>
<version>1.13.0</version>
<version>1.15.0</version>
<type>nar</type>
</dependency>
</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions nifi-ngsi-dynamo/nifi-ngsi-dynamo-processors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
<parent>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-ngsi-dynamodb-bundle</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
</parent>

<artifactId>nifi-ngsi-dynamo-processors</artifactId>
<packaging>jar</packaging>

<properties>
<nifi.version>1.13.0</nifi.version>
<nifi.version>1.15.0</nifi.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -88,7 +88,7 @@
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-ngsi-processors</artifactId>
<version>1.3.6</version>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions nifi-ngsi-dynamo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<parent>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-nar-bundles</artifactId>
<version>1.13.0</version>
<version>1.15.0</version>
</parent>

<groupId>org.apache.nifi</groupId>
<artifactId>nifi-ngsi-dynamodb-bundle</artifactId>
<version>1.3.7</version>
<version>2.0.0</version>
<packaging>pom</packaging>

<modules>
Expand All @@ -37,7 +37,7 @@
<!-- what builds the NAR file... -->
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-nar-maven-plugin</artifactId>
<version>1.3.2</version>
<version>1.3.3</version>
<extensions>true</extensions>
</plugin>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions nifi-ngsi-resources/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL site="https://github.com/ging/fiware-draco"

ARG UID=1000
ARG GID=1000
ARG NIFI_VERSION=1.13.0
ARG NIFI_VERSION=1.15.0
ARG BASE_URL=https://archive.apache.org/dist
ARG MIRROR_BASE_URL=${MIRROR_BASE_URL:-${BASE_URL}}
ARG NIFI_BINARY_PATH=${NIFI_BINARY_PATH:-/nifi/${NIFI_VERSION}/nifi-${NIFI_VERSION}-bin.zip}
Expand All @@ -18,8 +18,8 @@ ENV NIFI_TOOLKIT_HOME ${NIFI_BASE_DIR}/nifi-toolkit-current
ENV NIFI_PID_DIR=${NIFI_HOME}/run
ENV NIFI_LOG_DIR=${NIFI_HOME}/logs

ENV DRACO_RELEASE=1.3.7
ENV NIFI_NGSI_NAR_VERSION=1.3.7
ENV DRACO_RELEASE=2.0.0
ENV NIFI_NGSI_NAR_VERSION=2.0.0

ADD sh/ ${NIFI_BASE_DIR}/scripts/

Expand Down
4 changes: 2 additions & 2 deletions nifi-ngsi-resources/docker/ngsi-ld-notification.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
curl -X POST 'http://localhost:5050/ld/notify' -H 'Content-Type: application/ld+json' -H 'Fiware-service: UPM2' -d @- <<EOF
curl -X POST 'http://localhost:5050/ld/notify' -H 'Content-Type: application/ld+json' -H 'Fiware-service: upm' -d @- <<EOF
{
"id": "urn:ngsi-ld:Notification:352334523452",
"type": "Notification",
"subscriptionId": "urn:ngsi-ld:Subscription:5e6257789f300bcd70b7b6e",
"data": [
{
"id": "urn:ngsi:ld:OffStreetParking:Downtown8",
"id": "urn:ngsi:ld:OffStreetParking:Downtown0004",
"type": "OffStreetParking",
"@context": [
"http://example.org/ngsi-ld/parking.jsonld",
Expand Down

0 comments on commit 9e921e2

Please sign in to comment.