You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Fabio Gomes dos Santos <su...@gmail.com> on 2016/12/08 11:52:15 UTC

[DISCUSS] Human unit on broker.xml

Hi guys,

I've opened ARTEMIS-873, and here ask "you what you think about that
feature".
It's very annoying to be calculating bytes.


-- 
Fábio Santos
supergrilo@gmail.com
<http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>

Re: [DISCUSS] Human unit on broker.xml

Posted by Christopher Shannon <ch...@gmail.com>.
5.x does it in MemoryPropertyEditor which is used by Xbean.  There's
nothing fancy, it just parses the values and does some multiplication.

https://github.com/apache/activemq/blob/master/activemq-broker/src/main/java/org/apache/activemq/util/MemoryPropertyEditor.java

On Fri, Dec 9, 2016 at 9:28 AM, Clebert Suconic
<cl...@gmail.com> wrote:
> I'm fine with manual parsing BTW. It seems easy enough :)
>
>
> But I was wondering about the details.
>
> On Fri, Dec 9, 2016 at 9:27 AM, Clebert Suconic
> <cl...@gmail.com> wrote:
>> We can look on the code of course. But what AMQ5 is using for that?
>> any library or that's manual parsing?
>>
>> On Thu, Dec 8, 2016 at 10:25 AM, Fabio Gomes dos Santos
>> <su...@gmail.com> wrote:
>>> I've did some researches about that, and native class of java maybe
>>> satisfying the expectations:
>>>
>>> Example 1:
>>> http://stackoverflow.com/questions/16968587/java-convert-human-readable-size-to-bytes/33288820#33288820
>>>
>>> Example 2:
>>> http://codereview.stackexchange.com/questions/77697/convert-a-formatted-file-size-to-bytes
>>>
>>>
>>> 2016-12-08 12:55 GMT-02:00 Clebert Suconic <cl...@gmail.com>:
>>>
>>>> @Fabio do you know of any apache licensed libraries that can be used
>>>> for that? or we would need to make the calculation ourselves?
>>>>
>>>> I
>>>>
>>>> On Thu, Dec 8, 2016 at 9:46 AM, Andy Taylor <an...@gmail.com>
>>>> wrote:
>>>> > good idea
>>>> >
>>>> > On 8 December 2016 at 11:52, Fabio Gomes dos Santos <
>>>> supergrilo@gmail.com>
>>>> > wrote:
>>>> >
>>>> >> Hi guys,
>>>> >>
>>>> >> I've opened ARTEMIS-873, and here ask "you what you think about that
>>>> >> feature".
>>>> >> It's very annoying to be calculating bytes.
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Fábio Santos
>>>> >> supergrilo@gmail.com
>>>> >> <http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>
>>>> >>
>>>>
>>>>
>>>>
>>>> --
>>>> Clebert Suconic
>>>>
>>>
>>>
>>>
>>> --
>>> Fábio Santos
>>> supergrilo@gmail.com
>>> <http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>
>>
>>
>>
>> --
>> Clebert Suconic
>
>
>
> --
> Clebert Suconic

Re: [DISCUSS] Human unit on broker.xml

Posted by Clebert Suconic <cl...@gmail.com>.
I'm fine with manual parsing BTW. It seems easy enough :)


But I was wondering about the details.

On Fri, Dec 9, 2016 at 9:27 AM, Clebert Suconic
<cl...@gmail.com> wrote:
> We can look on the code of course. But what AMQ5 is using for that?
> any library or that's manual parsing?
>
> On Thu, Dec 8, 2016 at 10:25 AM, Fabio Gomes dos Santos
> <su...@gmail.com> wrote:
>> I've did some researches about that, and native class of java maybe
>> satisfying the expectations:
>>
>> Example 1:
>> http://stackoverflow.com/questions/16968587/java-convert-human-readable-size-to-bytes/33288820#33288820
>>
>> Example 2:
>> http://codereview.stackexchange.com/questions/77697/convert-a-formatted-file-size-to-bytes
>>
>>
>> 2016-12-08 12:55 GMT-02:00 Clebert Suconic <cl...@gmail.com>:
>>
>>> @Fabio do you know of any apache licensed libraries that can be used
>>> for that? or we would need to make the calculation ourselves?
>>>
>>> I
>>>
>>> On Thu, Dec 8, 2016 at 9:46 AM, Andy Taylor <an...@gmail.com>
>>> wrote:
>>> > good idea
>>> >
>>> > On 8 December 2016 at 11:52, Fabio Gomes dos Santos <
>>> supergrilo@gmail.com>
>>> > wrote:
>>> >
>>> >> Hi guys,
>>> >>
>>> >> I've opened ARTEMIS-873, and here ask "you what you think about that
>>> >> feature".
>>> >> It's very annoying to be calculating bytes.
>>> >>
>>> >>
>>> >> --
>>> >> Fábio Santos
>>> >> supergrilo@gmail.com
>>> >> <http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>
>>> >>
>>>
>>>
>>>
>>> --
>>> Clebert Suconic
>>>
>>
>>
>>
>> --
>> Fábio Santos
>> supergrilo@gmail.com
>> <http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>
>
>
>
> --
> Clebert Suconic



-- 
Clebert Suconic

Re: [DISCUSS] Human unit on broker.xml

Posted by Clebert Suconic <cl...@gmail.com>.
We can look on the code of course. But what AMQ5 is using for that?
any library or that's manual parsing?

On Thu, Dec 8, 2016 at 10:25 AM, Fabio Gomes dos Santos
<su...@gmail.com> wrote:
> I've did some researches about that, and native class of java maybe
> satisfying the expectations:
>
> Example 1:
> http://stackoverflow.com/questions/16968587/java-convert-human-readable-size-to-bytes/33288820#33288820
>
> Example 2:
> http://codereview.stackexchange.com/questions/77697/convert-a-formatted-file-size-to-bytes
>
>
> 2016-12-08 12:55 GMT-02:00 Clebert Suconic <cl...@gmail.com>:
>
>> @Fabio do you know of any apache licensed libraries that can be used
>> for that? or we would need to make the calculation ourselves?
>>
>> I
>>
>> On Thu, Dec 8, 2016 at 9:46 AM, Andy Taylor <an...@gmail.com>
>> wrote:
>> > good idea
>> >
>> > On 8 December 2016 at 11:52, Fabio Gomes dos Santos <
>> supergrilo@gmail.com>
>> > wrote:
>> >
>> >> Hi guys,
>> >>
>> >> I've opened ARTEMIS-873, and here ask "you what you think about that
>> >> feature".
>> >> It's very annoying to be calculating bytes.
>> >>
>> >>
>> >> --
>> >> Fábio Santos
>> >> supergrilo@gmail.com
>> >> <http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>
>> >>
>>
>>
>>
>> --
>> Clebert Suconic
>>
>
>
>
> --
> Fábio Santos
> supergrilo@gmail.com
> <http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>



-- 
Clebert Suconic

Re: [DISCUSS] Human unit on broker.xml

Posted by Fabio Gomes dos Santos <su...@gmail.com>.
I've did some researches about that, and native class of java maybe
satisfying the expectations:

Example 1:
http://stackoverflow.com/questions/16968587/java-convert-human-readable-size-to-bytes/33288820#33288820

Example 2:
http://codereview.stackexchange.com/questions/77697/convert-a-formatted-file-size-to-bytes


2016-12-08 12:55 GMT-02:00 Clebert Suconic <cl...@gmail.com>:

> @Fabio do you know of any apache licensed libraries that can be used
> for that? or we would need to make the calculation ourselves?
>
> I
>
> On Thu, Dec 8, 2016 at 9:46 AM, Andy Taylor <an...@gmail.com>
> wrote:
> > good idea
> >
> > On 8 December 2016 at 11:52, Fabio Gomes dos Santos <
> supergrilo@gmail.com>
> > wrote:
> >
> >> Hi guys,
> >>
> >> I've opened ARTEMIS-873, and here ask "you what you think about that
> >> feature".
> >> It's very annoying to be calculating bytes.
> >>
> >>
> >> --
> >> Fábio Santos
> >> supergrilo@gmail.com
> >> <http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>
> >>
>
>
>
> --
> Clebert Suconic
>



-- 
Fábio Santos
supergrilo@gmail.com
<http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>

Re: [DISCUSS] Human unit on broker.xml

Posted by Clebert Suconic <cl...@gmail.com>.
@Fabio do you know of any apache licensed libraries that can be used
for that? or we would need to make the calculation ourselves?

I

On Thu, Dec 8, 2016 at 9:46 AM, Andy Taylor <an...@gmail.com> wrote:
> good idea
>
> On 8 December 2016 at 11:52, Fabio Gomes dos Santos <su...@gmail.com>
> wrote:
>
>> Hi guys,
>>
>> I've opened ARTEMIS-873, and here ask "you what you think about that
>> feature".
>> It's very annoying to be calculating bytes.
>>
>>
>> --
>> Fábio Santos
>> supergrilo@gmail.com
>> <http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>
>>



-- 
Clebert Suconic

Re: [DISCUSS] Human unit on broker.xml

Posted by Andy Taylor <an...@gmail.com>.
good idea

On 8 December 2016 at 11:52, Fabio Gomes dos Santos <su...@gmail.com>
wrote:

> Hi guys,
>
> I've opened ARTEMIS-873, and here ask "you what you think about that
> feature".
> It's very annoying to be calculating bytes.
>
>
> --
> Fábio Santos
> supergrilo@gmail.com
> <http://br.linkedin.com/pub/f%C3%A1bio-santos/1b/20/422>
>