You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Jordan Zimmerman <jz...@netflix.com> on 2012/05/24 23:17:59 UTC
How to delete ZNode with 200K items
We have a node that has 200K items and would like to delete them. getChildren() keeps failing. Is there anything that can be done?
-JZ
Re: How to delete ZNode with 200K items
Posted by Jordan Zimmerman <jz...@netflix.com>.
Thanks so much! That helped. Now I can delete them.
-JZ
On 5/24/12 3:05 PM, "César Álvarez Núñez" <ce...@gmail.com>
wrote:
>Hi Jordan,
>
>We had the same problem a few months ago.
>Are you getting an IOException("Unreasonable length = " + len) on client
>side?
>You have to set the system property "jute.maxbuffer" to a value >=
><length>
>on ZooKeeper client side.
>/César.
>
>Extracted from org.apache.jute.BinaryInputArchive
>
>> static public final int maxBuffer = determineMaxBuffer();
>> private static int determineMaxBuffer() {
>> String maxBufferString = System.getProperty("jute.maxbuffer");
>> try {
>> return Integer.parseInt(maxBufferString);
>> } catch(Exception e) {
>> return 0xfffff;
>> }
>>
>> }
>> public byte[] readBuffer(String tag) throws IOException {
>> int len = readInt(tag);
>> if (len == -1) return null;
>> if (len < 0 || len > maxBuffer) {
>> throw new IOException("Unreasonable length = " + len);
>> }
>> byte[] arr = new byte[len];
>> in.readFully(arr);
>> return arr;
>> }
>>
>
>On Thu, May 24, 2012 at 11:17 PM, Jordan Zimmerman
><jz...@netflix.com>
>wrote:
>> We have a node that has 200K items and would like to delete them.
>getChildren() keeps failing. Is there anything that can be done?
>>
>> -JZ
Re: How to delete ZNode with 200K items
Posted by César Álvarez Núñez <ce...@gmail.com>.
Hi Jordan,
We had the same problem a few months ago.
Are you getting an IOException("Unreasonable length = " + len) on client
side?
You have to set the system property "jute.maxbuffer" to a value >= <length>
on ZooKeeper client side.
/César.
Extracted from org.apache.jute.BinaryInputArchive
> static public final int maxBuffer = determineMaxBuffer();
> private static int determineMaxBuffer() {
> String maxBufferString = System.getProperty("jute.maxbuffer");
> try {
> return Integer.parseInt(maxBufferString);
> } catch(Exception e) {
> return 0xfffff;
> }
>
> }
> public byte[] readBuffer(String tag) throws IOException {
> int len = readInt(tag);
> if (len == -1) return null;
> if (len < 0 || len > maxBuffer) {
> throw new IOException("Unreasonable length = " + len);
> }
> byte[] arr = new byte[len];
> in.readFully(arr);
> return arr;
> }
>
On Thu, May 24, 2012 at 11:17 PM, Jordan Zimmerman <jz...@netflix.com>
wrote:
> We have a node that has 200K items and would like to delete them.
getChildren() keeps failing. Is there anything that can be done?
>
> -JZ