org.apache.zookeeper.server.upgrade
Class UpgradeSnapShotV1
java.lang.Object
org.apache.zookeeper.server.upgrade.UpgradeSnapShotV1
- All Implemented Interfaces:
- UpgradeSnapShot
public class UpgradeSnapShotV1
- extends Object
- implements UpgradeSnapShot
This class gets the old snapshot
and the old dataDir and creates
an brand new snapshot that is
then converted to the new snapshot
for upgrading.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UpgradeSnapShotV1
public UpgradeSnapShotV1(File dataDir,
File snapShotDir)
- upgrade from version 1 to version 2
- Parameters:
dataDir
- snapShotDir
-
playLog
public long playLog(org.apache.jute.InputArchive logStream)
throws IOException
- play the log from this logstream into the datatree
- Parameters:
logStream
-
- Returns:
-
- Throws:
IOException
getNewDataTree
public DataTree getNewDataTree()
throws IOException
- Specified by:
getNewDataTree
in interface UpgradeSnapShot
- Throws:
IOException
getSessionWithTimeOuts
public ConcurrentHashMap<Long,Integer> getSessionWithTimeOuts()
- Specified by:
getSessionWithTimeOuts
in interface UpgradeSnapShot
Copyright © 2012 The Apache Software Foundation