You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by matadorhong <gi...@git.apache.org> on 2015/04/15 12:19:36 UTC
[GitHub] flink pull request: [FLINK-1891]Add the input storageDirectory emp...
GitHub user matadorhong opened a pull request:
https://github.com/apache/flink/pull/601
[FLINK-1891]Add the input storageDirectory empty check
Add the input storageDirectory empty check, if input of storageDirectory is empty, we should use tmp as the base dir
And also fix the code style proble of blank space between every ) and {
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/matadorhong/flink Fix_bug_dir_empty_check
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/601.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 #601
----
commit 90c5e380e8f2e5970a2aebc57d098f56b4f65135
Author: hongsibao <ho...@huawei.com>
Date: 2015-04-15T10:15:27Z
Add the input storageDirectory empty check
----
---
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: [FLINK-1891]Add the input storageDirectory emp...
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the pull request:
https://github.com/apache/flink/pull/601#issuecomment-93734377
Thanks for the PR.
Looks good to me, except for a possible minor improvement.
---
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: [FLINK-1891]Add the input storageDirectory emp...
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/601#discussion_r28508734
--- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobUtils.java ---
@@ -64,15 +64,19 @@
* @return the storage directory used by a BLOB service
*/
static File initStorageDirectory(String storageDirectory) {
- File baseDir = storageDirectory != null ?
- new File(storageDirectory) :
- new File(System.getProperty("java.io.tmpdir"));
+ File baseDir;
+ if (storageDirectory == null || storageDirectory.isEmpty()) {
--- End diff --
can you change `storageDirectory.isEmpty()` to `storageDirectory.trim().isEmpty()` to remove all whitespaces before the empty-check?
---
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: [FLINK-1891]Add the input storageDirectory emp...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/601
---
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: [FLINK-1891]Add the input storageDirectory emp...
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the pull request:
https://github.com/apache/flink/pull/601#issuecomment-94708399
I'm going to merge this 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 pull request: [FLINK-1891]Add the input storageDirectory emp...
Posted by matadorhong <gi...@git.apache.org>.
Github user matadorhong commented on a diff in the pull request:
https://github.com/apache/flink/pull/601#discussion_r28594789
--- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobUtils.java ---
@@ -64,15 +64,19 @@
* @return the storage directory used by a BLOB service
*/
static File initStorageDirectory(String storageDirectory) {
- File baseDir = storageDirectory != null ?
- new File(storageDirectory) :
- new File(System.getProperty("java.io.tmpdir"));
+ File baseDir;
+ if (storageDirectory == null || storageDirectory.isEmpty()) {
--- End diff --
Yeah, you are right. Thank for you notes.I have change 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.
---