You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by zentol <gi...@git.apache.org> on 2017/09/05 11:09:35 UTC

[GitHub] flink pull request #4646: [FLINK-7583] [REST] Use static constant for CONTEN...

GitHub user zentol opened a pull request:

    https://github.com/apache/flink/pull/4646

    [FLINK-7583] [REST] Use static constant for CONTENT_TYPE header

    ## What is the purpose of the change
    
    This PR introduces a static constant to be used as the HTTP CONTENT_TYPE header value. This ensures that we only allocate the string once, and that the client/server always use the same value.
    
    ## Brief change log
    
    * Add `RestConstants` class
    * Add `REST_CONTENT_TYPE` constants
    *  modify `RestClient` and `AbstractRestHandler` accordingly
    
    ## Verifying this change
    
    This change is a trivial rework / code cleanup without any test coverage.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zentol/flink 7583

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4646.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4646
    
----
commit 80896ab158d4aa6e18a889e2cd67b3d527d7a1f0
Author: zentol <ch...@apache.org>
Date:   2017-09-05T11:07:16Z

    [FLINK-7583] [REST] Use static constant for CONTENT_TYPE header

----


---

[GitHub] flink issue #4646: [FLINK-7583] [REST] Use static constant for CONTENT_TYPE ...

Posted by kl0u <gi...@git.apache.org>.
Github user kl0u commented on the issue:

    https://github.com/apache/flink/pull/4646
  
    I see. Thanks @zentol. 
    So +1 to merge from me.


---

[GitHub] flink pull request #4646: [FLINK-7583] [REST] Use static constant for CONTEN...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/4646


---

[GitHub] flink issue #4646: [FLINK-7583] [REST] Use static constant for CONTENT_TYPE ...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/4646
  
    I went through all usages of `HttpHeaders.Names.CONTENT_TYPE` and they are all related to rest operators, making `RestContants` a good place to put them. Also, ConfigConstants should be reserved for constants related to the configuration of Flink, which this isn't. Lastly, many of these usage will be eclipsed in the near future anyway.


---