Skip to content

Commit

Permalink
[FLINK-4545] [network] (followup) Replace awk lshift by multiplication
Browse files Browse the repository at this point in the history
'lshift(...)' is not defined by default in some commonly used awk versions.
  • Loading branch information
StephanEwen committed May 6, 2017
1 parent 0bb49e5 commit 606c592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flink-dist/src/main/flink-bin/bin/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ calculateNetworkBufferMemory() {
exit 1
fi

network_buffers_bytes=`awk "BEGIN { x = lshift(${FLINK_TM_HEAP},20) * ${FLINK_TM_NET_BUF_FRACTION}; netbuf = x > ${FLINK_TM_NET_BUF_MAX} ? ${FLINK_TM_NET_BUF_MAX} : x < ${FLINK_TM_NET_BUF_MIN} ? ${FLINK_TM_NET_BUF_MIN} : x; printf \"%.0f\n\", netbuf }"`
network_buffers_bytes=`awk "BEGIN { x = ${FLINK_TM_HEAP} * 1048576 * ${FLINK_TM_NET_BUF_FRACTION}; netbuf = x > ${FLINK_TM_NET_BUF_MAX} ? ${FLINK_TM_NET_BUF_MAX} : x < ${FLINK_TM_NET_BUF_MIN} ? ${FLINK_TM_NET_BUF_MIN} : x; printf \"%.0f\n\", netbuf }"`
fi

# recalculate the JVM heap memory by taking the network buffers into account
Expand Down

0 comments on commit 606c592

Please sign in to comment.