To create such a byte[] in jython, for passing to java, use the jarray module.

http://www.jython.org/jythonbook/en/1.0/DataTypes.html#jython-specific-collections

Alan.


On Thu, Apr 24, 2014 at 8:32 PM, Liam Slusser <lslusser@gmail.com> wrote:

Hey All -

I've been working with jython and hbase for awhile but I'm having a problem converting this function into jython.

java example code:

Scan scan = new Scan();
List<Pair<byte[], byte[]>> fuzzyKeysData = new ArrayList<Pair<byte[],byte[]>>();
// search for "?BC??FG"
fuzzyKeysData.add(new Pair<byte[],byte[]>(Bytes.toBytes("\\x00BC\\x00\\x00FG"), new byte[]{1, 0, 0, 1, 1, 0, 0}));
FuzzyRowFilter filter = new FuzzyRowFilter(fuzzyKeysData);
scan.setFilter(filter);

I've figured out much of it, but i'm unable to get byte[] to work. Reading the jython docs byte[] should be treated as a string but i'm not exactly sure how to do that.

Could anybody help me out?

thanks!
liam

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users