You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/07/17 10:21:15 UTC

[GitHub] [flink] gaoyunhaii opened a new pull request #12922: [FLINK-18612][fs][local] Fix the issue when creating file under the current directory with relative path

gaoyunhaii opened a new pull request #12922:
URL: https://github.com/apache/flink/pull/12922


   ** This PR picks https://github.com/apache/flink/pull/12918 to release-1.11
   
   ## What is the purpose of the change
   
   Currently when we want to create a file under the current directory with relative path (e.g., `new Path("file")`), the `LocalFileSystem` fails when trying to create the parent directory. This is due to that the parent path is stored as an empty string and it is transformed to `new File("")` and `new File("").isDirectory()` returns `false`, which indicates the caller that we fail to create the parent directory.
   
   To address this issue, we made the empty path transformed to `new File(".")`, with which `isDirectory()` returns the expected `true`. 
   
   
   ## Brief change log
   
   *(for example:)*
    - ab340bf17583063fa25158c00cd3214c404ca0dd changes the method `pathToFile(Path path)` to process the empty path specially and transform it to `new File(".")`.
   
   
   ## Verifying this change
   
   
   
   This change added tests and can be verified as follows:
   
     - Added UT to verify we could successfully create the file under current directory with relative path. Since Java could not change the current directory, we will have to try creating file under the current directory instead of an TemporaryFolder (A another option might be start a new Process to use the TemporaryFolder but it seems to be too heavy). We tried best to remove the target file after the test.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): **no**
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: **no**
     - The serializers: **no**
     - The runtime per-record code paths (performance sensitive): **no**
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: **no**
     - The S3 file system connector: **no**
   
   ## Documentation
   
     - Does this pull request introduce a new feature? **no**
     - If yes, how is the feature documented? **not applicable**


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #12922: [FLINK-18612][fs][local] Fix the issue when creating file under the current directory with relative path

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12922:
URL: https://github.com/apache/flink/pull/12922#issuecomment-660030877


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4589",
       "triggerID" : "fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "04070cfe5a54ad87bc4aea705c94669ebb2502e2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4619",
       "triggerID" : "04070cfe5a54ad87bc4aea705c94669ebb2502e2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 04070cfe5a54ad87bc4aea705c94669ebb2502e2 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4619) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #12922: [FLINK-18612][fs][local] Fix the issue when creating file under the current directory with relative path

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12922:
URL: https://github.com/apache/flink/pull/12922#issuecomment-660030877


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4589",
       "triggerID" : "fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4589) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] gaoyunhaii commented on pull request #12922: [FLINK-18612][fs][local] Fix the issue when creating file under the current directory with relative path

Posted by GitBox <gi...@apache.org>.
gaoyunhaii commented on pull request #12922:
URL: https://github.com/apache/flink/pull/12922#issuecomment-660993597


   The failure in the tests should be due to https://issues.apache.org/jira/browse/FLINK-18618, and the original PR in the master branch has passed the tests.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #12922: [FLINK-18612][fs][local] Fix the issue when creating file under the current directory with relative path

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12922:
URL: https://github.com/apache/flink/pull/12922#issuecomment-660030877


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4589",
       "triggerID" : "fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "04070cfe5a54ad87bc4aea705c94669ebb2502e2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "04070cfe5a54ad87bc4aea705c94669ebb2502e2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4589) 
   * 04070cfe5a54ad87bc4aea705c94669ebb2502e2 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #12922: [FLINK-18612][fs][local] Fix the issue when creating file under the current directory with relative path

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12922:
URL: https://github.com/apache/flink/pull/12922#issuecomment-660030877


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4589",
       "triggerID" : "fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "04070cfe5a54ad87bc4aea705c94669ebb2502e2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4619",
       "triggerID" : "04070cfe5a54ad87bc4aea705c94669ebb2502e2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a1b35375f773d546d0511cdca304cc4f173b00e5",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a1b35375f773d546d0511cdca304cc4f173b00e5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 04070cfe5a54ad87bc4aea705c94669ebb2502e2 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4619) 
   * a1b35375f773d546d0511cdca304cc4f173b00e5 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #12922: [FLINK-18612][fs][local] Fix the issue when creating file under the current directory with relative path

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #12922:
URL: https://github.com/apache/flink/pull/12922#issuecomment-660030877


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zhijiangW merged pull request #12922: [FLINK-18612][fs][local] Fix the issue when creating file under the current directory with relative path

Posted by GitBox <gi...@apache.org>.
zhijiangW merged pull request #12922:
URL: https://github.com/apache/flink/pull/12922


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #12922: [FLINK-18612][fs][local] Fix the issue when creating file under the current directory with relative path

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #12922:
URL: https://github.com/apache/flink/pull/12922#issuecomment-660030877


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4589",
       "triggerID" : "fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7",
       "triggerType" : "PUSH"
     }, {
       "hash" : "04070cfe5a54ad87bc4aea705c94669ebb2502e2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4619",
       "triggerID" : "04070cfe5a54ad87bc4aea705c94669ebb2502e2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a1b35375f773d546d0511cdca304cc4f173b00e5",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4638",
       "triggerID" : "a1b35375f773d546d0511cdca304cc4f173b00e5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a1b35375f773d546d0511cdca304cc4f173b00e5 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=4638) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #12922: [FLINK-18612][fs][local] Fix the issue when creating file under the current directory with relative path

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #12922:
URL: https://github.com/apache/flink/pull/12922#issuecomment-660022875


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit fec0cfafd41e2657baf2c9a02e049e3c8ec33ea7 (Fri Jul 17 10:23:40 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org