You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by apivovarov <gi...@git.apache.org> on 2016/09/23 06:27:38 UTC

[GitHub] flink pull request #2539: [FLINK-4668] Fix positive random int generation

GitHub user apivovarov opened a pull request:

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

    [FLINK-4668] Fix positive random int generation

    https://issues.apache.org/jira/browse/FLINK-4668

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

    $ git pull https://github.com/apivovarov/flink FLINK-4668

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

    https://github.com/apache/flink/pull/2539.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 #2539
    
----
commit 4ab1e4fa97fa41054817955230559766acbdf698
Author: Alexander Pivovarov <ap...@gmail.com>
Date:   2016-09-23T06:26:27Z

    [FLINK-4668] Fix positive random int generation

----


---
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 #2539: [FLINK-4668] Fix positive random int generation

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

    https://github.com/apache/flink/pull/2539
  
    it's not even convenient to work with files started with `-`, e.g.
    ```$ vi -44.txt
    VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug  1 2016 19:37:21)
    Unknown option argument: "-44.txt"
    More info with: "vim -h"```
    
    ```$ rm -rf "-4.txt"
    rm: illegal option -- 4
    usage: rm [-f | -i] [-dPRrvW] file ...
           unlink file```


---
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 #2539: [FLINK-4668] Fix positive random int generation

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

    https://github.com/apache/flink/pull/2539
  
    I'll merge this ...


---
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 #2539: [FLINK-4668] Fix positive random int generation

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

    https://github.com/apache/flink/pull/2539
  
    These are temporary files automatically deleted by the client. To handle paths with leading dashes one can prefix with a directory (`vi ./-44.txt`) or place after a double dash (`vi -- -44.txt`).
    
    This looks to me like a safe change (I'd first question why we're prefixing with a random string when Java is doing the same in `File.createTempFile`). On the other hand, this isn't fixing an error and there are limitless ways to refactor the existing codebase. And fortunately the anti-pattern is well-known.


---
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 #2539: [FLINK-4668] Fix positive random int generation

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

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


---
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 #2539: [FLINK-4668] Fix positive random int generation

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

    https://github.com/apache/flink/pull/2539
  
    I think this is not necessary. `Random.nextInt(int)` returns only positive values.


---
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 #2539: [FLINK-4668] Fix positive random int generation

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

    https://github.com/apache/flink/pull/2539
  
    Yes, looks good to me, too.
    (I retract my earlier statement, I was apparently a bit tired and mixed up original version and edit).


---
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 #2539: [FLINK-4668] Fix positive random int generation

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

    https://github.com/apache/flink/pull/2539
  
    I don't think this fixes a bug since I'm not aware of filesystems unable to handle a leading dash.


---
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.
---