I mean that zookeeper is used to persist.

    public void send() throws IOException, InterruptedException,
KeeperException {

        if( null != zkc ){
            ZooKeeper zk = zkc.getZookeeper();
            zk.create( root + "/protocolbuffer",
                       getData(),
                       ZooDefs.Ids.OPEN_ACL_UNSAFE,
                       CreateMode.PERSISTENT_SEQUENTIAL
                      );
        }
    }

    private byte[] getData() throws InvalidProtocolBufferException {
        Message.Load message = Message.Load.newBuilder().setType(
 
( Message.Load.LoadType.HIGH)).build();
        Message.Load message1 =
Message.Load.parseFrom( message.toByteArray() );
        System.out.println( "Distributed value is [" +
message1.getType().toString() +"]");
        return message.toByteArray();
    }


I get a non-empty byte array back. But there is an exception.

            Message.Load message = Message.Load.parseFrom( value );

Mohan

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to