eskabetxe commented on a change in pull request #114: URL: https://github.com/apache/bahir-flink/pull/114#discussion_r604271386
########## File path: flink-connector-influxdb2/pom.xml ########## @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<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"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.bahir</groupId> + <artifactId>bahir-flink-parent_2.11</artifactId> + <version>1.1-SNAPSHOT</version> + <relativePath>..</relativePath> + </parent> + + <artifactId>flink-connector-influxdb2_2.12</artifactId> Review comment: this should be 2.11 <artifactId>flink-connector-influxdb2_2.11</artifactId> ########## File path: flink-connector-influxdb2/pom.xml ########## @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<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"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.bahir</groupId> + <artifactId>bahir-flink-parent_2.11</artifactId> + <version>1.1-SNAPSHOT</version> + <relativePath>..</relativePath> + </parent> + + <artifactId>flink-connector-influxdb2_2.12</artifactId> + <name>flink-connector-influxdb2</name> + + <packaging>jar</packaging> + + <properties> + <influxdbClient.version>2.0.0</influxdbClient.version> + <spotless.version>2.7.0</spotless.version> + <druid.version>0.13.0-incubating</druid.version> + <!-- Test Properties --> + <testcontainers.version>1.15.2</testcontainers.version> + <hamcrest.version>2.2</hamcrest.version> Review comment: this is not used ########## File path: flink-connector-influxdb2/pom.xml ########## @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<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"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.bahir</groupId> + <artifactId>bahir-flink-parent_2.11</artifactId> + <version>1.1-SNAPSHOT</version> + <relativePath>..</relativePath> + </parent> + + <artifactId>flink-connector-influxdb2_2.12</artifactId> + <name>flink-connector-influxdb2</name> + + <packaging>jar</packaging> + + <properties> + <influxdbClient.version>2.0.0</influxdbClient.version> + <spotless.version>2.7.0</spotless.version> Review comment: this could be removed ########## File path: flink-connector-influxdb2/src/main/java/org/apache/flink/streaming/connectors/influxdb/common/DataPoint.java ########## @@ -0,0 +1,157 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.flink.streaming.connectors.influxdb.common; + +import com.influxdb.Arguments; +import com.influxdb.client.domain.WritePrecision; +import com.influxdb.client.write.Point; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Nullable; + +/** + * InfluxDB data point class. + * + * <h3>Elements of line protocol</h3> + * + * <pre> + * + * measurementName,tagKey=tagValue fieldKey="fieldValue" 1465839830100400200 + * --------------- --------------- --------------------- ------------------- + * | | | | + * Measurement Tag set Field set Timestamp + * + * </pre> + * + * <p>{@link InfluxParser} parses line protocol into this data point representation. + */ +public final class DataPoint { + + private final String measurement; + private final Map<String, String> tags = new HashMap(); + private final Map<String, Object> fields = new HashMap(); + private final Long timestamp; + + DataPoint(final String measurementName, @Nullable final Long timestamp) { + Arguments.checkNotNull(measurementName, "measurement"); Review comment: you are using Arguments.checkNotNull this could be Preconditions.checkNotNull(measurementName, "measurement") ########## File path: pom.xml ########## @@ -75,6 +75,7 @@ <module>flink-connector-akka</module> <module>flink-connector-flume</module> <module>flink-connector-influxdb</module> + <module>flink-connector-influxdb2</module> Review comment: should we maintain the 1.7 version? its 10 versions down from last one -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
