to ram
i am not sure if I misunstand the code, so I want to make sure if there is any 
improvements

to ted
sorry, I make some mistakes in previous description

i mean if we can use guava multiMap:
private MultiMap<String, Long> hostAndWeight

do not need to store hostname many times




thanks



On 2016-06-23 12:50 , Ted Yu Wrote:

YQ:
The HostAndWeight is basically a tuple.
In getTopHosts(), hosts are retrieved.
In getWeight(String host), weight is retrieved.

Why do you think a single Long is enough ?

Cheers

On Wed, Jun 22, 2016 at 9:28 PM, ramkrishna vasudevan <
ramkrishna.s.vasude...@gmail.com> wrote:

> Hi WangYQ,
>
> For code related suggestions if you feel there is an improvement or bug it
> is preferrable to raise a JIRA and give a patch. Pls feel free to raise a
> JIRA with your suggestion and why you plan to change it.
>
> Regards
> Ram
>
> On Thu, Jun 23, 2016 at 9:36 AM, WangYQ <wangyongqiang0...@163.com> wrote:
>
> >
> > there is a class named "HDFSBlockDistribution",  use a tree map
> > "hostAndWeight" to store data
> > private Map<String, HostAndWeight> hostAndWeight
> >
> > I think we can use
> > private Map<String, Long> hostAndWeight
> > to store data
> >
> >
> > thanks
>

Reply via email to