You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by yanghua <gi...@git.apache.org> on 2018/04/22 08:46:38 UTC

[GitHub] flink pull request #5892: [FLINK-9214] YarnClient should be stopped in YARNS...

GitHub user yanghua opened a pull request:

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

    [FLINK-9214] YarnClient should be stopped in YARNSessionCapacitySchedulerITCase#testDetachedPerJobYarnClusterInternal

    ## What is the purpose of the change
    
    *This pull fixed a issue about resource release in yarn client test case*
    
    
    ## Brief change log
    
      - *Closed yarn client in `ARNSessionCapacitySchedulerITCase#testDetachedPerJobYarnClusterInternal`*
    
    ## Verifying this change
    
    This change is a trivial rework / code cleanup without any test coverage.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (yes / **no**)
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
      - The serializers: (yes / **no** / don't know)
      - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
      - The S3 file system connector: (yes / **no** / don't know)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (yes / **no**)
      - If yes, how is the feature documented? (not applicable / docs / JavaDocs / **not documented**)


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

    $ git pull https://github.com/yanghua/flink FLINK-9214

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

    https://github.com/apache/flink/pull/5892.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 #5892
    
----
commit 071c279993d2211b00d999714cc2c0f82124ffc1
Author: yanghua <ya...@...>
Date:   2018-04-22T08:38:28Z

    [FLINK-9214] YarnClient should be stopped in YARNSessionCapacitySchedulerITCase#testDetachedPerJobYarnClusterInternal

----


---

[GitHub] flink issue #5892: [FLINK-9214] YarnClient should be stopped in YARNSessionC...

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

    https://github.com/apache/flink/pull/5892
  
    Thanks, looks good, merging this...


---

[GitHub] flink pull request #5892: [FLINK-9214] YarnClient should be stopped in YARNS...

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

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


---

[GitHub] flink pull request #5892: [FLINK-9214] YarnClient should be stopped in YARNS...

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

    https://github.com/apache/flink/pull/5892#discussion_r183394773
  
    --- Diff: flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java ---
    @@ -590,6 +590,12 @@ public boolean accept(File dir, String name) {
     				LOG.warn("testDetachedPerJobYarnClusterInternal: Exception while deleting the JobManager address file", e);
     			}
     
    +			try {
    +				LOG.info("testDetachedPerJobYarnClusterInternal: Closing the yarn client");
    +				yc.close();
    --- End diff --
    
    according to the docs `stop()` is more appropriate.
    
    ```
      /**
       * A version of stop() that is designed to be usable in Java7 closure
       * clauses.
       * Implementation classes MUST relay this directly to {@link #stop()}
       * @throws IOException never
       * @throws RuntimeException on any failure during the stop operation
       */
      void close() throws IOException;
    ```


---

[GitHub] flink issue #5892: [FLINK-9214] YarnClient should be stopped in YARNSessionC...

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

    https://github.com/apache/flink/pull/5892
  
    cc @StephanEwen @tillrohrmann 


---

[GitHub] flink pull request #5892: [FLINK-9214] YarnClient should be stopped in YARNS...

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

    https://github.com/apache/flink/pull/5892#discussion_r183395091
  
    --- Diff: flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionCapacitySchedulerITCase.java ---
    @@ -590,6 +590,12 @@ public boolean accept(File dir, String name) {
     				LOG.warn("testDetachedPerJobYarnClusterInternal: Exception while deleting the JobManager address file", e);
     			}
     
    +			try {
    +				LOG.info("testDetachedPerJobYarnClusterInternal: Closing the yarn client");
    +				yc.close();
    +			} catch (IOException e) {
    --- End diff --
    
    Catch all exceptions instead. According to the docs `IOExceptions` are never thrown but `RuntimeExceptions` might be.


---

[GitHub] flink issue #5892: [FLINK-9214] YarnClient should be stopped in YARNSessionC...

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

    https://github.com/apache/flink/pull/5892
  
    cc @zentol  @tzulitai 


---

[GitHub] flink issue #5892: [FLINK-9214] YarnClient should be stopped in YARNSessionC...

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

    https://github.com/apache/flink/pull/5892
  
    cc @zentol changed based on your suggestion


---

[GitHub] flink issue #5892: [FLINK-9214] YarnClient should be stopped in YARNSessionC...

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

    https://github.com/apache/flink/pull/5892
  
    lgtm


---