Message10544

Author lsenta
Recipients lsenta
Date 2015-12-17.11:49:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450352986.1.0.818457690885.issue2444@psf.upfronthosting.co.za>
In-reply-to
Content
First of all, thanks for maintaining this great project!

On Jython 2.7.0:

I have a weird behaviour using Bytes class in hbase-common-1.0.0-cdh5.4.5.jar.

>>> qualifier
array('b', [98, 121, 116, 101, 45, 115, 105, 122, 101])
>>> Bytes.toString(qualifier)
u'[B@30f88a41'
>>> Bytes.toString(qualifier, 0, len(qualifier))
u'byte-size'
>>> Bytes.toString(str(qualifier))
u"array('b', [98, 121, 116, 101, 45, 115, 105, 122, 101])"
>>> Bytes.toString(repr(qualifier))
u"array('b', [98, 121, 116, 101, 45, 115, 105, 122, 101])"

The correct result is 'byte-size', the issue is the '[B@30f88a41' result.

Documentation in http://archive.cloudera.com/cdh5/cdh/5/hbase-1.0.0-cdh5.4.5/apidocs/index.html



Another thing, if I call:
>>> Bytes.toBytes('v')

The toBytes(String) implementation is called,
however the documentation at: https://wiki.python.org/jython/UserGuide#id13
seem's to say that 'v' should be coerced into a char thus call the toBytes(int) implementation.

TBH I rely on this 'v' coercion to string so that's not really an issue
but I wonder when coercion into char happens and if the doc should be updated.


Thanks for taking a look,
History
Date User Action Args
2015-12-17 11:49:46lsentasetrecipients: + lsenta
2015-12-17 11:49:46lsentasetmessageid: <1450352986.1.0.818457690885.issue2444@psf.upfronthosting.co.za>
2015-12-17 11:49:46lsentalinkissue2444 messages
2015-12-17 11:49:44lsentacreate