[ 
https://issues.apache.org/jira/browse/BEAM-2546?focusedWorklogId=417179&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-417179
 ]

ASF GitHub Bot logged work on BEAM-2546:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Apr/20 22:05
            Start Date: 06/Apr/20 22:05
    Worklog Time Spent: 10m 
      Work Description: iemejia commented on pull request #11028: BEAM-2546 
Beam IO for InfluxDB
URL: https://github.com/apache/beam/pull/11028#discussion_r404231393
 
 

 ##########
 File path: 
sdks/java/io/influxdb/src/main/java/org/apache/beam/sdk/io/influxdb/InfluxDBIO.java
 ##########
 @@ -0,0 +1,709 @@
+/*
+ * 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.beam.sdk.io.influxdb;
+
+import static 
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import java.security.cert.CertificateException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import javax.annotation.Nullable;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.SSLSocketFactory;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import okhttp3.OkHttpClient;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.coders.Coder;
+import org.apache.beam.sdk.coders.SerializableCoder;
+import org.apache.beam.sdk.io.BoundedSource;
+import org.apache.beam.sdk.options.PipelineOptions;
+import org.apache.beam.sdk.options.ValueProvider;
+import org.apache.beam.sdk.transforms.DoFn;
+import org.apache.beam.sdk.transforms.PTransform;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.transforms.SerializableFunction;
+import org.apache.beam.sdk.transforms.display.DisplayData;
+import org.apache.beam.sdk.transforms.display.HasDisplayData;
+import org.apache.beam.sdk.values.PBegin;
+import org.apache.beam.sdk.values.PCollection;
+import org.apache.beam.sdk.values.PDone;
+import org.influxdb.BatchOptions;
+import org.influxdb.InfluxDB;
+import org.influxdb.InfluxDBFactory;
+import org.influxdb.dto.Query;
+import org.influxdb.dto.QueryResult;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * IO to read and write to InfluxDB.
+ *
+ * <h3>Reading from InfluxDB datasource</h3>
+ *
+ * <p>InfluxDBIO source returns a bounded collection of {@code String} as a 
{@code
+ * PCollection<String>}.
+ *
+ * <p>To configure the InfluxDB source, you have to provide a {@link 
DataSourceConfiguration} using
+ * <br>
+ * {@link DataSourceConfiguration#create(String, String, String)}(durl, 
username and password).
+ * Optionally, {@link DataSourceConfiguration#withUsername(String)} and {@link
+ * DataSourceConfiguration#withPassword(String)} allows you to define username 
and password.
+ *
+ * <p>For example:
+ *
+ * <pre>{@code
+ * PCollection<Stringn> collection = pipeline.apply(InfluxDBIO.read()
+ *   .withDataSourceConfiguration(JdbcIO.DataSourceConfiguration.create(
+ *          "https://localhost:8086","username","password";))
+ *   .withDatabase("metrics")
+ *   .withRetentionPolicy("autogen")
+ *   .withSslInvalidHostNameAllowed(true)
+ *   withSslEnabled(true));
+ * }</pre>
+ *
+ * <p>For example (Read from query):
 
 Review comment:
   Read with query example
 
----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 417179)

> Create InfluxDbIO
> -----------------
>
>                 Key: BEAM-2546
>                 URL: https://issues.apache.org/jira/browse/BEAM-2546
>             Project: Beam
>          Issue Type: New Feature
>          Components: io-ideas
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Bipin Upadhyaya
>            Priority: Major
>          Time Spent: 11.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to