[ 
https://issues.apache.org/jira/browse/FLINK-9125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16457323#comment-16457323
 ] 

ASF GitHub Bot commented on FLINK-9125:
---------------------------------------

GitHub user yanghua opened a pull request:

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

    [FLINK-9125] MiniClusterResource should set CoreOptions.TMP_DIRS

    ## What is the purpose of the change
    
    *This pull request sets the `CoreOptions.TMP_DIRS` for MiniClusterResource*
    
    
    ## Brief change log
    
      - *Initialized a `TemporaryFolder` instance and set 
`CoreOptions.TMP_DIRS` config*
    
    ## 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-9125

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

    https://github.com/apache/flink/pull/5933.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 #5933
    
----
commit 1f8b04fe4a80f88bfccc5246bf57ce2da84a5a70
Author: yanghua <yanghua1127@...>
Date:   2018-04-28T02:43:27Z

    [FLINK-9125] MiniClusterResource should set CoreOptions.TMP_DIRS

----


> MiniClusterResource should set CoreOptions.TMP_DIRS
> ---------------------------------------------------
>
>                 Key: FLINK-9125
>                 URL: https://issues.apache.org/jira/browse/FLINK-9125
>             Project: Flink
>          Issue Type: Improvement
>          Components: Tests
>    Affects Versions: 1.5.0
>            Reporter: Chesnay Schepler
>            Assignee: vinoyang
>            Priority: Major
>
> We've frequently seen test stability issues when creating temporary file that 
> use hard-coded paths, like {{/tmp}}, and generally tried to instead use 
> {{TemporaryFolders}} instead.
> The {{CoreOptions.TMP_DIRS}} option is used by some components to determine 
> where temporary files should be placed. By default this points to 
> {{System.getProperty("java.io.tmpdir")}}, which usually points to {{/tmp}}.
> This property is rarely set explicitly by tests, which leads to failures such 
> as this: https://travis-ci.org/apache/flink/jobs/361515791
> {code}
> org.apache.flink.test.api.java.operators.lambdas.JoinITCase  Time elapsed: 
> 3.025 sec  <<< ERROR!
> java.io.IOException: Could not create root directory for local recovery: 
> /tmp/localState
>       at 
> org.apache.flink.runtime.state.TaskExecutorLocalStateStoresManager.<init>(TaskExecutorLocalStateStoresManager.java:89)
>       at 
> org.apache.flink.runtime.taskexecutor.TaskManagerServices.fromConfiguration(TaskManagerServices.java:284)
>       at 
> org.apache.flink.runtime.taskexecutor.TaskManagerRunner.startTaskManager(TaskManagerRunner.java:303)
>       at 
> org.apache.flink.runtime.minicluster.MiniCluster.startTaskManagers(MiniCluster.java:738)
>       at 
> org.apache.flink.runtime.minicluster.MiniCluster.start(MiniCluster.java:306)
>       at 
> org.apache.flink.test.util.MiniClusterResource.startMiniCluster(MiniClusterResource.java:217)
>       at 
> org.apache.flink.test.util.MiniClusterResource.startJobExecutorService(MiniClusterResource.java:171)
>       at 
> org.apache.flink.test.util.MiniClusterResource.before(MiniClusterResource.java:121)
>       at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46)
>       at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>       at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>       at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
>       at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
>       at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
>       at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> {code}
> It would be nice if the MiniClusterResource inherently contains a 
> {{TemporaryFolder}} which is used to configure {{CoreOptions.TMP_DIRS}} as 
> well as other tmp dir options.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to