Package org.apache.accumulo.server
Class ServerUtil
- java.lang.Object
-
- org.apache.accumulo.server.ServerUtil
-
public class ServerUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ServerUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
abortIfFateTransactions(ServerContext context)
Exit loudly if there are outstanding Fate operations.static void
ensureDataVersionCompatible(int dataVersion)
Check to see if this version of Accumulo can run against or upgrade the passed in data version.static org.apache.hadoop.fs.Path
getAccumuloInstanceIdPath(VolumeManager fs)
static int
getAccumuloPersistentVersion(Volume v)
static int
getAccumuloPersistentVersion(VolumeManager fs)
static int
getAccumuloPersistentVersion(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path)
static void
init(ServerContext context, String application)
static void
monitorSwappiness(AccumuloConfiguration config)
static boolean
persistentVersionNeedsUpgrade(int accumuloPersistentVersion)
Does the data version number stored in the backing Volumes indicate we need to upgrade something?static void
updateAccumuloVersion(VolumeManager fs, int oldVersion)
static void
waitForZookeeperAndHdfs(ServerContext context)
-
-
-
Method Detail
-
updateAccumuloVersion
public static void updateAccumuloVersion(VolumeManager fs, int oldVersion)
-
getAccumuloPersistentVersion
public static int getAccumuloPersistentVersion(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path)
-
getAccumuloPersistentVersion
public static int getAccumuloPersistentVersion(Volume v)
-
getAccumuloPersistentVersion
public static int getAccumuloPersistentVersion(VolumeManager fs)
-
getAccumuloInstanceIdPath
public static org.apache.hadoop.fs.Path getAccumuloInstanceIdPath(VolumeManager fs)
-
init
public static void init(ServerContext context, String application)
-
ensureDataVersionCompatible
public static void ensureDataVersionCompatible(int dataVersion)
Check to see if this version of Accumulo can run against or upgrade the passed in data version.
-
persistentVersionNeedsUpgrade
public static boolean persistentVersionNeedsUpgrade(int accumuloPersistentVersion)
Does the data version number stored in the backing Volumes indicate we need to upgrade something?
-
monitorSwappiness
public static void monitorSwappiness(AccumuloConfiguration config)
-
waitForZookeeperAndHdfs
public static void waitForZookeeperAndHdfs(ServerContext context)
-
abortIfFateTransactions
public static void abortIfFateTransactions(ServerContext context)
Exit loudly if there are outstanding Fate operations. Since Fate serializes class names, we need to make sure there are no queued transactions from a previous version before continuing an upgrade. The status of the operations is irrelevant; those in SUCCESSFUL status cause the same problem as those just queued. Note that the Master should not allow write access to Fate until after all upgrade steps are complete. Should be called as a guard before performing any upgrade steps, after determining that an upgrade is needed. see ACCUMULO-2519
-
-