You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by barcahead <gi...@git.apache.org> on 2017/02/25 08:28:54 UTC

[GitHub] flink pull request #3416: [FLINK-5918] [runtime] port range support for conf...

GitHub user barcahead opened a pull request:

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

    [FLINK-5918] [runtime] port range support for config taskmanager.rpc.port

    add port range support for config `taskmanager.rpc.port` using existing helper functions. The port range format follows the convention of `blob.server.port`. 
    
    - [x] General
      - The pull request references the related JIRA issue ("[FLINK-XXX] Jira title text")
      - The pull request addresses only one issue
      - Each commit in the PR has a meaningful commit message (including the JIRA id)
    
    - [x] Documentation
      - Documentation has been added for new functionality
      - Old documentation affected by the pull request has been updated
      - JavaDoc for public methods has been added
    
    - [x] Tests & Build
      - Functionality added by the pull request is covered by tests
      - `mvn clean verify` has been executed successfully locally or a Travis build has passed


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

    $ git pull https://github.com/barcahead/flink FLINK-5918

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

    https://github.com/apache/flink/pull/3416.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 #3416
    
----
commit 2f925fe1e3ac947fece603d5844b16dcc41b52f7
Author: fengyelei <fe...@huawei.com>
Date:   2017-02-25T08:12:32Z

    [FLINK-5918] [runtime] port range support for config taskmanager.rpc.port

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3416: [FLINK-5918] [runtime] port range support for config task...

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

    https://github.com/apache/flink/pull/3416
  
    @zentol Has this been merged?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3416: [FLINK-5918] [runtime] port range support for conf...

Posted by barcahead <gi...@git.apache.org>.
Github user barcahead commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3416#discussion_r104584562
  
    --- Diff: flink-runtime/src/main/scala/org/apache/flink/runtime/akka/AkkaUtils.scala ---
    @@ -720,5 +722,55 @@ object AkkaUtils {
         if (sslEnabled) "akka.ssl.tcp" else "akka.tcp"
       }
     
    +  /**
    +    * Retries a function if it fails because of a [[java.net.BindException]].
    +    *
    +    * @param fn The function to retry
    +    * @param stopCond Flag to signal termination
    +    * @param maxSleepBetweenRetries Max random sleep time between retries
    +    * @tparam T Return type of the the function to retry
    +    * @return Return value of the the function to retry
    +    */
    +  @tailrec
    +  def retryOnBindException[T](
    +                               fn: => T,
    +                               stopCond: => Boolean,
    +                               maxSleepBetweenRetries : Long = 0 )
    +  : scala.util.Try[T] = {
    --- End diff --
    
    @tillrohrmann the style is fixed :-)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3416: [FLINK-5918] [runtime] port range support for config task...

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

    https://github.com/apache/flink/pull/3416
  
    merging, sorry it took so long!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3416: [FLINK-5918] [runtime] port range support for config task...

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

    https://github.com/apache/flink/pull/3416
  
    no I haven't merged it yet. I wanted to try it out once more but forgot about it :(


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3416: [FLINK-5918] [runtime] port range support for conf...

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3416#discussion_r103940625
  
    --- Diff: flink-core/pom.xml ---
    @@ -165,6 +165,7 @@ under the License.
     							<exclude>org.apache.flink.configuration.ConfigConstants#ENABLE_QUARANTINE_MONITOR</exclude>
     							<exclude>org.apache.flink.configuration.ConfigConstants#NETWORK_REQUEST_BACKOFF_INITIAL_KEY</exclude>
     							<exclude>org.apache.flink.configuration.ConfigConstants#NETWORK_REQUEST_BACKOFF_MAX_KEY</exclude>
    +							<exclude>org.apache.flink.configuration.ConfigConstants#DEFAULT_TASK_MANAGER_IPC_PORT</exclude>
    --- End diff --
    
    Adding an exclusion here should only be the last resort; converting the old constant to the new one is trivial.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3416: [FLINK-5918] [runtime] port range support for config task...

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

    https://github.com/apache/flink/pull/3416
  
    @zentol @tillrohrmann Thanks for your review, I have addressed your comments and updated the PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #3416: [FLINK-5918] [runtime] port range support for config task...

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

    https://github.com/apache/flink/pull/3416
  
    merging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3416: [FLINK-5918] [runtime] port range support for conf...

Posted by barcahead <gi...@git.apache.org>.
Github user barcahead commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3416#discussion_r104065323
  
    --- Diff: flink-core/pom.xml ---
    @@ -165,6 +165,7 @@ under the License.
     							<exclude>org.apache.flink.configuration.ConfigConstants#ENABLE_QUARANTINE_MONITOR</exclude>
     							<exclude>org.apache.flink.configuration.ConfigConstants#NETWORK_REQUEST_BACKOFF_INITIAL_KEY</exclude>
     							<exclude>org.apache.flink.configuration.ConfigConstants#NETWORK_REQUEST_BACKOFF_MAX_KEY</exclude>
    +							<exclude>org.apache.flink.configuration.ConfigConstants#DEFAULT_TASK_MANAGER_IPC_PORT</exclude>
    --- End diff --
    
    Thanks for the review, I will use a new constant instead.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3416: [FLINK-5918] [runtime] port range support for conf...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3416#discussion_r104387798
  
    --- Diff: flink-runtime/src/main/scala/org/apache/flink/runtime/akka/AkkaUtils.scala ---
    @@ -720,5 +722,55 @@ object AkkaUtils {
         if (sslEnabled) "akka.ssl.tcp" else "akka.tcp"
       }
     
    +  /**
    +    * Retries a function if it fails because of a [[java.net.BindException]].
    +    *
    +    * @param fn The function to retry
    +    * @param stopCond Flag to signal termination
    +    * @param maxSleepBetweenRetries Max random sleep time between retries
    +    * @tparam T Return type of the the function to retry
    +    * @return Return value of the the function to retry
    +    */
    +  @tailrec
    +  def retryOnBindException[T](
    +                               fn: => T,
    +                               stopCond: => Boolean,
    +                               maxSleepBetweenRetries : Long = 0 )
    +  : scala.util.Try[T] = {
    --- End diff --
    
    Flink's (implicit) Scala style is as follows:
    
    ```
    def foobar(
        a: Int,
        b: Float)
      : Double = {
      // barfoo
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #3416: [FLINK-5918] [runtime] port range support for conf...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---