flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #4691: [FLINK-7647] [flip6] Port JobManagerConfigHandler ...
Date Thu, 21 Sep 2017 23:22:42 GMT
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4691#discussion_r140382392
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/messages/ClusterConfiguration.java
---
    @@ -0,0 +1,57 @@
    +/*
    + * 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.legacy.messages;
    +
    +import org.apache.flink.configuration.Configuration;
    +import org.apache.flink.runtime.rest.handler.legacy.ClusterConfigHandler;
    +import org.apache.flink.runtime.rest.messages.ResponseBody;
    +
    +import java.util.ArrayList;
    +
    +/**
    + * Response of the {@link ClusterConfigHandler}, respresented as a list
    + * of key-value pairs of the cluster {@link Configuration}.
    + */
    +public class ClusterConfiguration extends ArrayList<ClusterConfigurationEntry>
implements ResponseBody {
    --- End diff --
    
    I'm actually wondering why we don't extend from a `Map` implementation since it should
behave more like a map. This of course would require changes on the web gui side. I think
now, the JSON would like
    
    ```
    [{"key":"keyvalue", "value":"valuevalue"}, {....}] 
    ```
    instead of
    ```
    {"keyvalue":"valuevalue", ....}
    ```
    
    Maybe we could change this in the future.


---

Mime
View raw message