diff --git a/CHANGELOG.md b/CHANGELOG.md
index 21a8032..6379686 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,9 @@
* [23](https://github.com/influxdata/nifi-influxdb-bundle/issues/23): Added support for InfluxDB v2.0
+### Others
+* [11](https://github.com/influxdata/nifi-influxdb-bundle/pulls/27): Updated to Apache NiFi 1.10.0
+
## v1.1 [2019-06-06]
### Features
diff --git a/nifi-influx-database-processors/pom.xml b/nifi-influx-database-processors/pom.xml
index e7706c3..b47601e 100644
--- a/nifi-influx-database-processors/pom.xml
+++ b/nifi-influx-database-processors/pom.xml
@@ -147,6 +147,12 @@
2.6.2
test
+
+
+ org.assertj
+ assertj-core
+ 3.11.1
+
diff --git a/nifi-influx-database-processors/src/main/java/org/influxdata/nifi/processors/internal/AbstractGetInfluxDatabase_2.java b/nifi-influx-database-processors/src/main/java/org/influxdata/nifi/processors/internal/AbstractGetInfluxDatabase_2.java
index 20f6701..eda8fb4 100644
--- a/nifi-influx-database-processors/src/main/java/org/influxdata/nifi/processors/internal/AbstractGetInfluxDatabase_2.java
+++ b/nifi-influx-database-processors/src/main/java/org/influxdata/nifi/processors/internal/AbstractGetInfluxDatabase_2.java
@@ -37,7 +37,6 @@
import com.influxdb.client.domain.Query;
import com.influxdb.exceptions.InfluxException;
import com.influxdb.query.FluxRecord;
-
import edu.umd.cs.findbugs.annotations.NonNull;
import org.apache.nifi.annotation.lifecycle.OnScheduled;
import org.apache.nifi.components.PropertyDescriptor;
@@ -340,7 +339,7 @@ private void onResponseRecord(final Cancellable cancellable, final FluxRecord fl
final RecordSchema recordSchema = record.getSchema();
try {
out = session.write(flowFile);
- writer = writerFactory.createWriter(getLogger(), recordSchema, out);
+ writer = writerFactory.createWriter(getLogger(), recordSchema, out, flowFile);
writer.beginRecordSet();
} catch (Exception e) {
cancellable.cancel();
diff --git a/nifi-influx-database-processors/src/test/java/org/influxdata/nifi/processors/AbstractTestGetInfluxDatabaseRecord_2.java b/nifi-influx-database-processors/src/test/java/org/influxdata/nifi/processors/AbstractTestGetInfluxDatabaseRecord_2.java
index 49a9020..1a43711 100644
--- a/nifi-influx-database-processors/src/test/java/org/influxdata/nifi/processors/AbstractTestGetInfluxDatabaseRecord_2.java
+++ b/nifi-influx-database-processors/src/test/java/org/influxdata/nifi/processors/AbstractTestGetInfluxDatabaseRecord_2.java
@@ -23,15 +23,12 @@
import java.util.function.BiConsumer;
import java.util.function.Consumer;
+import com.google.common.collect.Lists;
import com.influxdb.Cancellable;
import com.influxdb.client.InfluxDBClient;
import com.influxdb.client.QueryApi;
import com.influxdb.client.domain.Query;
import com.influxdb.query.FluxRecord;
-import org.influxdata.nifi.services.InfluxDatabaseService_2;
-import org.influxdata.nifi.services.StandardInfluxDatabaseService_2;
-
-import com.google.common.collect.Lists;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.serialization.record.ArrayListRecordWriter;
import org.apache.nifi.serialization.record.RecordSchema;
@@ -40,6 +37,8 @@
import org.apache.nifi.util.MockProcessorInitializationContext;
import org.apache.nifi.util.TestRunner;
import org.apache.nifi.util.TestRunners;
+import org.influxdata.nifi.services.InfluxDatabaseService_2;
+import org.influxdata.nifi.services.StandardInfluxDatabaseService_2;
import org.junit.Before;
import org.mockito.Mockito;
import org.mockito.stubbing.Answer;
@@ -70,13 +69,13 @@ public void before() throws IOException, GeneralSecurityException, Initializatio
Mockito.doAnswer(invocation -> {
if (queryOnErrorValue != null) {
//noinspection unchecked
- Consumer onError = invocation.getArgumentAt(3, Consumer.class);
+ Consumer onError = invocation.getArgument(3, Consumer.class);
onError.accept(queryOnErrorValue);
}
queryOnResponseRecords.forEach(record -> {
//noinspection unchecked
- BiConsumer onRecord = invocation.getArgumentAt(2, BiConsumer.class);
+ BiConsumer onRecord = invocation.getArgument(2, BiConsumer.class);
onRecord.accept(Mockito.mock(Cancellable.class), record);
});
@@ -88,7 +87,7 @@ public void before() throws IOException, GeneralSecurityException, Initializatio
throw e;
} finally {
if (!wasException) {
- Runnable onComplete = invocation.getArgumentAt(4, Runnable.class);
+ Runnable onComplete = invocation.getArgument(4, Runnable.class);
onComplete.run();
}
}
diff --git a/nifi-influx-database-processors/src/test/java/org/influxdata/nifi/processors/AbstractTestGetInfluxDatabase_2.java b/nifi-influx-database-processors/src/test/java/org/influxdata/nifi/processors/AbstractTestGetInfluxDatabase_2.java
index c811308..17b9884 100644
--- a/nifi-influx-database-processors/src/test/java/org/influxdata/nifi/processors/AbstractTestGetInfluxDatabase_2.java
+++ b/nifi-influx-database-processors/src/test/java/org/influxdata/nifi/processors/AbstractTestGetInfluxDatabase_2.java
@@ -22,20 +22,19 @@
import java.util.function.BiConsumer;
import java.util.function.Consumer;
+import com.google.common.collect.Lists;
import com.influxdb.Cancellable;
import com.influxdb.client.InfluxDBClient;
import com.influxdb.client.QueryApi;
import com.influxdb.client.domain.Query;
-import org.influxdata.nifi.services.InfluxDatabaseService_2;
-import org.influxdata.nifi.services.StandardInfluxDatabaseService_2;
-
-import com.google.common.collect.Lists;
import org.apache.nifi.reporting.InitializationException;
import org.apache.nifi.util.MockComponentLog;
import org.apache.nifi.util.MockProcessContext;
import org.apache.nifi.util.MockProcessorInitializationContext;
import org.apache.nifi.util.TestRunner;
import org.apache.nifi.util.TestRunners;
+import org.influxdata.nifi.services.InfluxDatabaseService_2;
+import org.influxdata.nifi.services.StandardInfluxDatabaseService_2;
import org.junit.Before;
import org.mockito.Mockito;
import org.mockito.stubbing.Answer;
@@ -66,13 +65,13 @@ public void before() throws IOException, GeneralSecurityException, Initializatio
Mockito.doAnswer(invocation -> {
if (queryOnErrorValue != null) {
//noinspection unchecked
- Consumer onError = invocation.getArgumentAt(3, Consumer.class);
+ Consumer onError = invocation.getArgument(3, Consumer.class);
onError.accept(queryOnErrorValue);
}
queryOnResponseRecords.forEach(record -> {
//noinspection unchecked
- BiConsumer onRecord = invocation.getArgumentAt(2, BiConsumer.class);
+ BiConsumer onRecord = invocation.getArgument(2, BiConsumer.class);
onRecord.accept(Mockito.mock(Cancellable.class), record);
});
@@ -84,7 +83,7 @@ public void before() throws IOException, GeneralSecurityException, Initializatio
throw e;
} finally {
if (!wasException) {
- Runnable onComplete = invocation.getArgumentAt(4, Runnable.class);
+ Runnable onComplete = invocation.getArgument(4, Runnable.class);
onComplete.run();
}
}
diff --git a/nifi-influx-database-processors/src/test/java/org/influxdata/nifi/processors/ITGetInfluxDatabaseRecord_2.java b/nifi-influx-database-processors/src/test/java/org/influxdata/nifi/processors/ITGetInfluxDatabaseRecord_2.java
index 486cf7f..8449bb5 100644
--- a/nifi-influx-database-processors/src/test/java/org/influxdata/nifi/processors/ITGetInfluxDatabaseRecord_2.java
+++ b/nifi-influx-database-processors/src/test/java/org/influxdata/nifi/processors/ITGetInfluxDatabaseRecord_2.java
@@ -18,20 +18,13 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
-import java.math.BigDecimal;
import java.sql.Timestamp;
import java.time.Instant;
import java.util.Arrays;
import java.util.List;
-import java.util.Map;
-
-import com.influxdb.client.domain.WritePrecision;
-import org.influxdata.nifi.processors.internal.AbstractInfluxDatabaseProcessor;
-import org.influxdata.nifi.services.InfluxDatabaseService_2;
-import org.influxdata.nifi.services.StandardInfluxDatabaseService_2;
import com.google.common.collect.Lists;
-import groovy.json.JsonSlurper;
+import com.influxdb.client.domain.WritePrecision;
import org.apache.avro.file.DataFileStream;
import org.apache.avro.generic.GenericData;
import org.apache.avro.generic.GenericDatumReader;
@@ -46,6 +39,12 @@
import org.apache.nifi.util.MockFlowFile;
import org.apache.nifi.util.TestRunners;
import org.apache.nifi.xml.XMLRecordSetWriter;
+import org.assertj.core.api.Assertions;
+import org.influxdata.nifi.processors.internal.AbstractInfluxDatabaseProcessor;
+import org.influxdata.nifi.services.InfluxDatabaseService_2;
+import org.influxdata.nifi.services.StandardInfluxDatabaseService_2;
+import org.json.JSONArray;
+import org.json.JSONObject;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -198,18 +197,18 @@ public void writeToJson() throws InitializationException {
MockFlowFile flowFile = runner.getFlowFilesForRelationship(GetInfluxDatabaseRecord_2.REL_SUCCESS).get(0);
String json = new String(runner.getContentAsByteArray(flowFile));
- List