You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by BigOneLiu <gi...@git.apache.org> on 2018/03/01 11:04:46 UTC
[GitHub] flink pull request #5609: [FLINK-8822] RotateLogFile may not work well when ...
GitHub user BigOneLiu opened a pull request:
https://github.com/apache/flink/pull/5609
[FLINK-8822] RotateLogFile may not work well when sed version is belo…
…w 4.2
In bin/config.sh rotateLogFilesWithPrefix(),it use extended regular to process filename with "sed -E",but when sed version is below 4.2,it turns out "sed: invalid option – 'E'"
and RotateLogFile won't work well : There will be only one logfile no matter what is $MAX_LOG_FILE_NUMBER.
so use sed -r may be more suitable.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/BigOneLiu/flink master0228
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/5609.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 #5609
----
commit c8a008699bc7ae13310c1069665891d18e800c7c
Author: liuxin <li...@...>
Date: 2018-03-01T10:59:28Z
[FLINK-8822] RotateLogFile may not work well when sed version is below 4.2
----
---
[GitHub] flink issue #5609: [FLINK-8822] RotateLogFile may not work well when sed ver...
Posted by BigOneLiu <gi...@git.apache.org>.
Github user BigOneLiu commented on the issue:
https://github.com/apache/flink/pull/5609
@zentol thx for comment.
I checked my system SUSE 11 SP4(which is a wildly used version),sed version is 4.1.5,and it do not support '-E'. I don't konw how many linux version use sed 4.1.5.
According to the source code,'-E' is exactly the same as '-r' and '-E' is Undocumented.
So maybe '-r' is more compatible.
If don't need to be changed,at least note in the doc that "log may not work well in SUSE 11".
---
[GitHub] flink issue #5609: [FLINK-8822] RotateLogFile may not work well when sed ver...
Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the issue:
https://github.com/apache/flink/pull/5609
@zentol What do you think? Is this safe to merge?
---
[GitHub] flink issue #5609: [FLINK-8822] RotateLogFile may not work well when sed ver...
Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:
https://github.com/apache/flink/pull/5609
ehh...probably. The PR has a point as `sed --help` (v4.2.2) does not list the `-E` option.
If we want to be super safe we could check that `sed -r` is supported and use `-E` as a backup.
---
[GitHub] flink issue #5609: [FLINK-8822] RotateLogFile may not work well when sed ver...
Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:
https://github.com/apache/flink/pull/5609
Not sure about this one, after all `4.2` is already _9 years old_.
According to https://stackoverflow.com/questions/3139126/whats-the-difference-between-sed-e-and-sed-e and https://www.gnu.org/software/sed/manual/sed.html it also looks like `-E` is more portable.
---