zentol commented on a change in pull request #11628: [FLINK-14504][rest] Add 
Cluster DataSet REST API
URL: https://github.com/apache/flink/pull/11628#discussion_r405417890
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/dataset/ClusterDataSetPartitionListHandler.java
 ##########
 @@ -0,0 +1,53 @@
+/*
+ * 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.runtime.rest.handler.dataset;
+
+import org.apache.flink.api.common.time.Time;
+import org.apache.flink.runtime.resourcemanager.ResourceManagerGateway;
+import org.apache.flink.runtime.rest.handler.HandlerRequest;
+import org.apache.flink.runtime.rest.handler.RestHandlerException;
+import 
org.apache.flink.runtime.rest.handler.resourcemanager.AbstractResourceManagerHandler;
+import org.apache.flink.runtime.rest.messages.EmptyMessageParameters;
+import org.apache.flink.runtime.rest.messages.EmptyRequestBody;
+import 
org.apache.flink.runtime.rest.messages.dataset.ClusterDataSetListHeaders;
+import 
org.apache.flink.runtime.rest.messages.dataset.ClusterDataSetListResponseBody;
+import org.apache.flink.runtime.webmonitor.RestfulGateway;
+import org.apache.flink.runtime.webmonitor.retriever.GatewayRetriever;
+
+import javax.annotation.Nonnull;
+
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+
+/**
+ * Handler for {@link ClusterDataSetListHeaders}.
+ */
+public class ClusterDataSetPartitionListHandler extends 
AbstractResourceManagerHandler<RestfulGateway, EmptyRequestBody, 
ClusterDataSetListResponseBody, EmptyMessageParameters> {
 
 Review comment:
   I have adjusted the name, this was an oversight.
   
   There are indeed some differences to the proposed API in the FLIP, let's go 
through them:
   
   1) lack of some meta data like job name, creation dates and such.
   
   These may be added later. We made sure that existing code can be extended 
easily to carry additional meta-data to the ResourceManager, but left it out 
for simplicity's sake. We only retained data that we needed functionality-wise.
   
   2) rename of URLs to use `dataset` instead of `partition`
   
   This was an oversight in terminology that was noticed way too late. Back 
then we used the term "cluster partition" to both denote a partition of a data 
set and the data set as a whole. This is naturally confusing, so I introduced a 
new term. "Cluster dataset" was the logical choice.
   
   3) Lack of GET/dataset/:datasetid
   
   This was left out because it is not functionally required for how we 
envision `Interactive Programming` to work (because it wouldn't retrieve 
partition descriptors through the REST API).
   Additionally, the partition descriptors may be too large/numerous to safely 
transmit them over heartbeats; meaning we may need a separate transfer 
mechanism.
   It is still something that we should _eventually_ have imo so we don't limit 
usage of cluster data sets to `Interactive Programming`.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to