[jira] [Commented] (FLINK-2810) Warn user if bc not installed
[ https://issues.apache.org/jira/browse/FLINK-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14944719#comment-14944719 ] ASF GitHub Bot commented on FLINK-2810: --- Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/1228 > Warn user if bc not installed > - > > Key: FLINK-2810 > URL: https://issues.apache.org/jira/browse/FLINK-2810 > Project: Flink > Issue Type: Improvement > Components: Command-line client >Affects Versions: 0.10 >Reporter: Greg Hogan >Assignee: Greg Hogan >Priority: Minor > Fix For: 0.10 > > > taskmanager.sh will print the following message when starting the cluster if > bc is not installed and off-heap memory is enabled and configured as a ratio. > The script should first check that bc is installed and otherwise print a > specific message. > {noformat} > [ERROR] Configured TaskManager managed memory fraction is not a valid value. > Please set 'taskmanager.memory.fraction' in flink-conf.yaml > {noformat} > An example of a distribution where bc is not installed by default are the > Debian images for Google Compute Engine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2810) Warn user if bc not installed
[ https://issues.apache.org/jira/browse/FLINK-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14943704#comment-14943704 ] ASF GitHub Bot commented on FLINK-2810: --- Github user greghogan commented on a diff in the pull request: https://github.com/apache/flink/pull/1228#discussion_r41172866 --- Diff: flink-dist/src/main/flink-bin/bin/taskmanager.sh --- @@ -73,6 +73,13 @@ if [[ $STARTSTOP == "start" ]]; then TM_OFFHEAP_SIZE=${FLINK_TM_MEM_MANAGED_SIZE} TM_HEAP_SIZE=$((FLINK_TM_HEAP - FLINK_TM_MEM_MANAGED_SIZE)) else +# Bash only performs integer arithmetic so floating point computation is performed using bc +BC_PATH=`command -v bc` +if [[ $? -eq 1 || ! -f $BC_PATH ]]; then --- End diff -- That should be sufficient. Thanks. > Warn user if bc not installed > - > > Key: FLINK-2810 > URL: https://issues.apache.org/jira/browse/FLINK-2810 > Project: Flink > Issue Type: Improvement > Components: Command-line client >Affects Versions: 0.10 >Reporter: Greg Hogan >Assignee: Greg Hogan >Priority: Minor > Fix For: 0.10 > > > taskmanager.sh will print the following message when starting the cluster if > bc is not installed and off-heap memory is enabled and configured as a ratio. > The script should first check that bc is installed and otherwise print a > specific message. > {noformat} > [ERROR] Configured TaskManager managed memory fraction is not a valid value. > Please set 'taskmanager.memory.fraction' in flink-conf.yaml > {noformat} > An example of a distribution where bc is not installed by default are the > Debian images for Google Compute Engine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2810) Warn user if bc not installed
[ https://issues.apache.org/jira/browse/FLINK-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14943685#comment-14943685 ] ASF GitHub Bot commented on FLINK-2810: --- Github user mxm commented on a diff in the pull request: https://github.com/apache/flink/pull/1228#discussion_r41170708 --- Diff: flink-dist/src/main/flink-bin/bin/taskmanager.sh --- @@ -73,6 +73,13 @@ if [[ $STARTSTOP == "start" ]]; then TM_OFFHEAP_SIZE=${FLINK_TM_MEM_MANAGED_SIZE} TM_HEAP_SIZE=$((FLINK_TM_HEAP - FLINK_TM_MEM_MANAGED_SIZE)) else +# Bash only performs integer arithmetic so floating point computation is performed using bc +BC_PATH=`command -v bc` +if [[ $? -eq 1 || ! -f $BC_PATH ]]; then --- End diff -- If you don't mind, I will just replace this check with ```java if [[ `command -v bc >/dev/null 2>&1` -ne 0 ]]; then ``` before merging. > Warn user if bc not installed > - > > Key: FLINK-2810 > URL: https://issues.apache.org/jira/browse/FLINK-2810 > Project: Flink > Issue Type: Improvement > Components: Command-line client >Affects Versions: 0.10 >Reporter: Greg Hogan >Assignee: Greg Hogan >Priority: Minor > Fix For: 0.10 > > > taskmanager.sh will print the following message when starting the cluster if > bc is not installed and off-heap memory is enabled and configured as a ratio. > The script should first check that bc is installed and otherwise print a > specific message. > {noformat} > [ERROR] Configured TaskManager managed memory fraction is not a valid value. > Please set 'taskmanager.memory.fraction' in flink-conf.yaml > {noformat} > An example of a distribution where bc is not installed by default are the > Debian images for Google Compute Engine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2810) Warn user if bc not installed
[ https://issues.apache.org/jira/browse/FLINK-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14943661#comment-14943661 ] ASF GitHub Bot commented on FLINK-2810: --- Github user mxm commented on a diff in the pull request: https://github.com/apache/flink/pull/1228#discussion_r41169165 --- Diff: flink-dist/src/main/flink-bin/bin/taskmanager.sh --- @@ -73,6 +73,13 @@ if [[ $STARTSTOP == "start" ]]; then TM_OFFHEAP_SIZE=${FLINK_TM_MEM_MANAGED_SIZE} TM_HEAP_SIZE=$((FLINK_TM_HEAP - FLINK_TM_MEM_MANAGED_SIZE)) else +# Bash only performs integer arithmetic so floating point computation is performed using bc +BC_PATH=`command -v bc` +if [[ $? -eq 1 || ! -f $BC_PATH ]]; then --- End diff -- I think this may cause problems when `bc` is symlinked. The error code of `command -v bc` should be enough. > Warn user if bc not installed > - > > Key: FLINK-2810 > URL: https://issues.apache.org/jira/browse/FLINK-2810 > Project: Flink > Issue Type: Improvement > Components: Command-line client >Affects Versions: 0.10 >Reporter: Greg Hogan >Assignee: Greg Hogan >Priority: Minor > Fix For: 0.10 > > > taskmanager.sh will print the following message when starting the cluster if > bc is not installed and off-heap memory is enabled and configured as a ratio. > The script should first check that bc is installed and otherwise print a > specific message. > {noformat} > [ERROR] Configured TaskManager managed memory fraction is not a valid value. > Please set 'taskmanager.memory.fraction' in flink-conf.yaml > {noformat} > An example of a distribution where bc is not installed by default are the > Debian images for Google Compute Engine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2810) Warn user if bc not installed
[ https://issues.apache.org/jira/browse/FLINK-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14943642#comment-14943642 ] ASF GitHub Bot commented on FLINK-2810: --- Github user mxm commented on the pull request: https://github.com/apache/flink/pull/1228#issuecomment-145596622 Thanks for the pull request. Looks good. Will merge your changes. > Warn user if bc not installed > - > > Key: FLINK-2810 > URL: https://issues.apache.org/jira/browse/FLINK-2810 > Project: Flink > Issue Type: Improvement > Components: Command-line client >Affects Versions: 0.10 >Reporter: Greg Hogan >Assignee: Greg Hogan >Priority: Minor > Fix For: 0.10 > > > taskmanager.sh will print the following message when starting the cluster if > bc is not installed and off-heap memory is enabled and configured as a ratio. > The script should first check that bc is installed and otherwise print a > specific message. > {noformat} > [ERROR] Configured TaskManager managed memory fraction is not a valid value. > Please set 'taskmanager.memory.fraction' in flink-conf.yaml > {noformat} > An example of a distribution where bc is not installed by default are the > Debian images for Google Compute Engine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2810) Warn user if bc not installed
[ https://issues.apache.org/jira/browse/FLINK-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14943626#comment-14943626 ] ASF GitHub Bot commented on FLINK-2810: --- GitHub user greghogan opened a pull request: https://github.com/apache/flink/pull/1228 [FLINK-2810] Warn user if bc not installed You can merge this pull request into a Git repository by running: $ git pull https://github.com/greghogan/flink 2810_warn_user_if_bc_not_installed Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/1228.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 #1228 commit 6a2855d8b2d78c67d76d194f705789a7d189d381 Author: Greg Hogan Date: 2015-10-05T15:11:59Z [FLINK-2810] Warn user if bc not installed > Warn user if bc not installed > - > > Key: FLINK-2810 > URL: https://issues.apache.org/jira/browse/FLINK-2810 > Project: Flink > Issue Type: Improvement > Components: Command-line client >Affects Versions: 0.10 >Reporter: Greg Hogan >Assignee: Greg Hogan >Priority: Minor > Fix For: 0.10 > > > taskmanager.sh will print the following message when starting the cluster if > bc is not installed and off-heap memory is enabled and configured as a ratio. > The script should first check that bc is installed and otherwise print a > specific message. > {noformat} > [ERROR] Configured TaskManager managed memory fraction is not a valid value. > Please set 'taskmanager.memory.fraction' in flink-conf.yaml > {noformat} > An example of a distribution where bc is not installed by default are the > Debian images for Google Compute Engine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2810) Warn user if bc not installed
[ https://issues.apache.org/jira/browse/FLINK-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14941185#comment-14941185 ] Maximilian Michels commented on FLINK-2810: --- Yes, bash cannot perform floating point operations. {{bc}} is part of POSIX: http://www.unix.com/man-page/posix/1p/bc/ but not included in every distribution. We only need {{bc}} in off-heap mode. Throwing a proper error when {{bc}} does not exist is a good suggestion. > Warn user if bc not installed > - > > Key: FLINK-2810 > URL: https://issues.apache.org/jira/browse/FLINK-2810 > Project: Flink > Issue Type: Improvement > Components: Command-line client >Affects Versions: master >Reporter: Greg Hogan >Assignee: Greg Hogan >Priority: Minor > > taskmanager.sh will print the following message when starting the cluster if > bc is not installed and off-heap memory is enabled and configured as a ratio. > The script should first check that bc is installed and otherwise print a > specific message. > {noformat} > [ERROR] Configured TaskManager managed memory fraction is not a valid value. > Please set taskmanager.memory.fraction in flink-conf.yaml > {noformat} > An example of a distribution where bc is not installed by default are the > Debian images for Google Compute Engine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2810) Warn user if bc not installed
[ https://issues.apache.org/jira/browse/FLINK-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14941172#comment-14941172 ] Greg Hogan commented on FLINK-2810: --- Bash arithmetic evaluation is limited to integers. > Warn user if bc not installed > - > > Key: FLINK-2810 > URL: https://issues.apache.org/jira/browse/FLINK-2810 > Project: Flink > Issue Type: Improvement > Components: Command-line client >Affects Versions: master >Reporter: Greg Hogan >Assignee: Greg Hogan >Priority: Minor > > taskmanager.sh will print the following message when starting the cluster if > bc is not installed and off-heap memory is enabled and configured as a ratio. > The script should first check that bc is installed and otherwise print a > specific message. > {noformat} > [ERROR] Configured TaskManager managed memory fraction is not a valid value. > Please set taskmanager.memory.fraction in flink-conf.yaml > {noformat} > An example of a distribution where bc is not installed by default are the > Debian images for Google Compute Engine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-2810) Warn user if bc not installed
[ https://issues.apache.org/jira/browse/FLINK-2810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14941138#comment-14941138 ] Stephan Ewen commented on FLINK-2810: - Do the scripts strictly need {{bc}} ? You can do quite a bit of math in the bash as well... > Warn user if bc not installed > - > > Key: FLINK-2810 > URL: https://issues.apache.org/jira/browse/FLINK-2810 > Project: Flink > Issue Type: Improvement > Components: Command-line client >Affects Versions: master >Reporter: Greg Hogan >Assignee: Greg Hogan >Priority: Minor > > taskmanager.sh will print the following message when starting the cluster if > bc is not installed and off-heap memory is enabled and configured as a ratio. > The script should first check that bc is installed and otherwise print a > specific message. > {noformat} > [ERROR] Configured TaskManager managed memory fraction is not a valid value. > Please set taskmanager.memory.fraction in flink-conf.yaml > {noformat} > An example of a distribution where bc is not installed by default are the > Debian images for Google Compute Engine. -- This message was sent by Atlassian JIRA (v6.3.4#6332)