Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper >> mail # dev >> Should Stat.dataLength return -1 instead of 0 when node content is null?


+
César Álvarez Núñez 2012-05-17, 09:21
+
Patrick Hunt 2012-05-17, 21:41
Copy link to this message
-
Re: Should Stat.dataLength return -1 instead of 0 when node content is null?
Hi Patrick,

I thoroughly agree with your opinion.

When you say "major version upgrade", you mean an increase on the 2nd digit
(for example from 3.4.X to 3.5.X) or the first digit?

Anyway, is it correct to create a Jira ticket and provide a patch although
it would not be committed until the next major version upgrade?

/César.

On Thu, May 17, 2012 at 11:41 PM, Patrick Hunt <[EMAIL PROTECTED]> wrote:

> On Thu, May 17, 2012 at 2:21 AM, César Álvarez Núñez
> <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > When I create a node with null data, Stat.dataLength is 0.
> > When I create a node with byte[0] data, Stat.dataLength is 0.
> >
> > I think that in the first case dataLength should return -1 instead of 0.
> >
> > Which is your opinion? I will create a ticket and try to fix it if you
> > agree.
>
> The current API is such that we treat the length of a null and an
> empty string both as 0. Regardless, what you are suggesting would
> change the api in a non-backward compatible way, not something we
> consider outside of a major version upgrade.
>
> Patrick
>
+
Patrick Hunt 2012-05-18, 16:32
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB