jihaozh commented on a change in pull request #3830: [TE] Presto Connector 
backend and front end
URL: https://github.com/apache/incubator-pinot/pull/3830#discussion_r256605847
 
 

 ##########
 File path: 
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/datasource/presto/resources/PrestoDataSourceResource.java
 ##########
 @@ -0,0 +1,111 @@
+package org.apache.pinot.thirdeye.datasource.presto.resources;
+
+import com.facebook.presto.jdbc.internal.jackson.databind.ObjectMapper;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.apache.pinot.thirdeye.constant.MetricAggFunction;
+import org.apache.pinot.thirdeye.datalayer.bao.DatasetConfigManager;
+import org.apache.pinot.thirdeye.datalayer.bao.MetricConfigManager;
+import org.apache.pinot.thirdeye.datalayer.dto.DatasetConfigDTO;
+import org.apache.pinot.thirdeye.datalayer.dto.MetricConfigDTO;
+import org.apache.pinot.thirdeye.datasource.DAORegistry;
+import org.apache.pinot.thirdeye.datasource.presto.PrestoDataset;
+import org.apache.pinot.thirdeye.datasource.presto.PrestoThirdEyeDataSource;
+import org.apache.pinot.thirdeye.detection.ConfigUtils;
+import org.apache.pinot.thirdeye.util.ThirdEyeUtils;
+import org.joda.time.Period;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Path("/presto-data-source")
+@Consumes(MediaType.APPLICATION_JSON)
+@Produces(MediaType.APPLICATION_JSON)
+public class PrestoDataSourceResource {
+  private static final Logger LOG = 
LoggerFactory.getLogger(PrestoDataSourceResource.class);
+  private final MetricConfigManager metricDAO;
+  private final DatasetConfigManager datasetDAO;
+
+  public PrestoDataSourceResource() {
+    this.metricDAO = DAORegistry.getInstance().getMetricConfigDAO();
+    this.datasetDAO = DAORegistry.getInstance().getDatasetConfigDAO();
+  }
+
+  /**
+   * POST endpoint that get payload in JSON and onboard the Presto dataset and 
metrics
+   *
+   * @param payload Payload in JSON
+   *
+   * @return Response contains status code 200 or 400
+   */
+  @POST
+  @Path("/onboard")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  public Response onBoard(String payload) {
+    System.out.println(payload);
 
 Review comment:
   remove?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to