Package org.apache.zookeeper.server.persistence

Examples of org.apache.zookeeper.server.persistence.FileSnap


        } catch(IOException ie) {
            LOG.info("crc corruption", ie);
        }
        itr.close();
        // find the last snapshot
        FileSnap snap = new FileSnap(versionDir);
        snapFile = snap.findMostRecentSnapshot();
        // corrupt this file
        corruptFile(snapFile);
        DataTree dt = new DataTree();
        Map<Long, Integer> sessions =
            new ConcurrentHashMap<Long, Integer>();
        try {  
            snap.deserialize(dt, sessions);
            assertTrue(false);
        } catch(IOException ie) {
            LOG.info("checksu failure in snapshot", ie);   
        }
        
View Full Code Here


        } catch(IOException ie) {
            LOG.info("crc corruption", ie);
        }
        itr.close();
        // find the last snapshot
        FileSnap snap = new FileSnap(versionDir);
        List<File> snapFiles = snap.findNRecentSnapshots(2);
        snapFile = snapFiles.get(0);
        corruptFile(snapFile);
        boolean cfile = false;
        try {
            cfile = getCheckSum(snap, snapFile);
View Full Code Here

        InputStream is = new CheckedInputStream(
                new BufferedInputStream(new FileInputStream(snapshotFileName)),
                new Adler32());
        InputArchive ia = BinaryInputArchive.getArchive(is);
       
        FileSnap fileSnap = new FileSnap(null);

        DataTree dataTree = new DataTree();
        Map<Long, Integer> sessions = new HashMap<Long, Integer>();
       
        fileSnap.deserialize(dataTree, sessions, ia);

        printDetails(dataTree, sessions);
    }
View Full Code Here

        } catch(IOException ie) {
            LOG.info("crc corruption", ie);
        }
        itr.close();
        // find the last snapshot
        FileSnap snap = new FileSnap(versionDir);
        List<File> snapFiles = snap.findNRecentSnapshots(2);
        snapFile = snapFiles.get(0);
        corruptFile(snapFile);
        boolean cfile = false;
        try {
            cfile = getCheckSum(snap, snapFile);
View Full Code Here

        } catch(IOException ie) {
            LOG.info("crc corruption", ie);
        }
        itr.close();
        // find the last snapshot
        FileSnap snap = new FileSnap(versionDir);
        List<File> snapFiles = snap.findNRecentSnapshots(2);
        snapFile = snapFiles.get(0);
        corruptFile(snapFile);
        boolean cfile = false;
        try {
            cfile = getCheckSum(snap, snapFile);
View Full Code Here

        InputStream is = new CheckedInputStream(
                new BufferedInputStream(new FileInputStream(snapshotFileName)),
                new Adler32());
        InputArchive ia = BinaryInputArchive.getArchive(is);
       
        FileSnap fileSnap = new FileSnap(null);

        DataTree dataTree = new DataTree();
        Map<Long, Integer> sessions = new HashMap<Long, Integer>();
       
        fileSnap.deserialize(dataTree, sessions, ia);

        printDetails(dataTree, sessions);
    }
View Full Code Here

        } catch(IOException ie) {
            LOG.info("crc corruption", ie);
        }
        itr.close();
        // find the last snapshot
        FileSnap snap = new FileSnap(versionDir);
        snapFile = snap.findMostRecentSnapshot();
        // corrupt this file
        corruptFile(snapFile);
        DataTree dt = new DataTree();
        Map<Long, Integer> sessions =
            new ConcurrentHashMap<Long, Integer>();
        try {  
            snap.deserialize(dt, sessions);
            assertTrue(false);
        } catch(IOException ie) {
            LOG.info("checksu failure in snapshot", ie);   
        }
        
View Full Code Here

        } catch(IOException ie) {
            LOG.info("crc corruption", ie);
        }
        itr.close();
        // find the last snapshot
        FileSnap snap = new FileSnap(versionDir);
        List<File> snapFiles = snap.findNRecentSnapshots(2);
        snapFile = snapFiles.get(0);
        corruptFile(snapFile);
        boolean cfile = false;
        try {
            cfile = getCheckSum(snap, snapFile);
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.server.persistence.FileSnap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.