Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper >> mail # user >> Exception while reading Snapshot file

Copy link to this message
Exception while reading Snapshot file

I am trying to load data from a ZK snapshot file into datatree. Here is the
code I am using

    FileInputStream fis = new FileInputStream(args[0]);
    BinaryInputArchive snapshot = BinaryInputArchive.getArchive(fis);
    Map<Long, Integer> sessions = new HashMap<Long, Integer>();
    DataTree dt = new DataTree();
    SerializeUtils.deserializeSnapshot(dt, snapshot, sessions);

I get the following exception
Exception in thread "main" java.io.EOFException
    at java.io.DataInputStream.readFully(DataInputStream.java:180)
    at java.io.DataInputStream.readLong(DataInputStream.java:399)

Is there something wrong in the way I am reading.It is able to read part of
the data before throwing EOF. All the snapshots result in the same problem

Kishore G
Patrick Hunt 2011-10-05, 16:45
kishore g 2011-10-05, 17:52