You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Rob Vesse (JIRA)" <ji...@apache.org> on 2017/06/21 12:26:00 UTC

[jira] [Comment Edited] (JENA-1356) tbloader2 crashes on OSX with "value too great for base" error

    [ https://issues.apache.org/jira/browse/JENA-1356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16057394#comment-16057394 ] 

Rob Vesse edited comment on JENA-1356 at 6/21/17 12:25 PM:
-----------------------------------------------------------

I was hoping that the OP would come back and report whether my changes address the problem in his environment. It works for me locally but then I have an older version of OS X that still reports free memory in megabytes rather than gigabytes so can't directly verify that it resolves the original problem


was (Author: rvesse):
I was hoping that the OP would come back and report whether my changes the the address the problem in his environment. It works for me locally but then I have an older version of OS X that still reports free memory in megabytes rather than gigabytes so can't directly verify that it resolves the original problem

> tbloader2 crashes on OSX with "value too great for base" error
> --------------------------------------------------------------
>
>                 Key: JENA-1356
>                 URL: https://issues.apache.org/jira/browse/JENA-1356
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Cmd line tools
>    Affects Versions: Jena 3.3.0
>         Environment: Mac OSX 10.12.5
>            Reporter: joshua portway
>              Labels: easyfix
>
> tbloader2 crashes during the sort phase because when checking for free memory because top reports memory measured in gigabytes ("10G") rather than megabytes and the script (getFreeMem in tbloader2common)  is hard coded to expect the memory to be expressed in megabytes ("10M").
> The bug can be fixed by checking which unit is used:
> {code}
> case "$OSTYPE" in
>     darwin*)
>       # Have to get this from top
>       FREE_MEM=$(top -l 1 | grep PhysMem | awk '{print $6}')
>       MEM_LEN=${#FREE_MEM}
>       MEM_UNIT=${FREE_MEM:MEM_LEN-1:1}
>       if [ $MEM_UNIT == 'M' ]; then
>         FREE_MEM=${FREE_MEM:0:MEM_LEN-1}
>         FREE_MEM=$(($FREE_MEM * 1024 *1024))
>       fi
>       if [ $MEM_UNIT == 'G' ]; then
>         FREE_MEM=${FREE_MEM:0:MEM_LEN-1}
>         FREE_MEM=$(($FREE_MEM * 1024 *1024 * 1024))
>       fi
>       ;;
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)