mosche commented on code in PR #22260:
URL: https://github.com/apache/beam/pull/22260#discussion_r957097582
##########
sdks/java/testing/test-utils/src/main/java/org/apache/beam/sdk/testutils/publishing/InfluxDBPublisher.java:
##########
@@ -46,35 +56,80 @@
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils;
+import org.checkerframework.dataflow.qual.Pure;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-@SuppressWarnings({
- "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
public final class InfluxDBPublisher {
private static final Logger LOG =
LoggerFactory.getLogger(InfluxDBPublisher.class);
private InfluxDBPublisher() {}
+ /** InfluxDB data point. */
+ @AutoValue
+ public abstract static class DataPoint {
+ DataPoint() {}
+
+ public abstract @Pure String measurement();
+
+ public abstract @Pure Map<String, String> tags();
+
+ public abstract @Pure Map<String, Number> fields();
+
+ @Nullable
+ public abstract @Pure Long timestamp();
Review Comment:
I renamed it to timestampSecs and added a comment to explain. Also, see below
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]