public class FileSystemOwnershipCheck extends java.lang.Object implements StartupCheck
constructTokenFromProperties(Map)
and add the related *_PROPERTY values you will want the system to check on startup to confirm ownership.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_FS_OWNERSHIP_FILENAME |
static java.lang.String |
FILE_SYSTEM_CHECK_OWNERSHIP_TOKEN |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
constructTokenFromProperties(java.util.Map<java.lang.String,java.lang.Object> config)
In version 1, we check and return the ownership token.
|
void |
execute(StartupChecksOptions options)
Run some test to determine whether the system is safe to be started
In the case where a test determines it is not safe to proceed, the
test should log a message regarding the reason for the failure and
ideally the steps required to remedy the problem.
|
java.lang.String |
getFsOwnershipFilename(java.util.Map<java.lang.String,java.lang.Object> config) |
java.lang.String |
getOwnershipToken(java.util.Map<java.lang.String,java.lang.Object> config) |
StartupChecks.StartupCheckType |
getStartupCheckType() |
boolean |
isEnabled(StartupChecksOptions options) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
postAction
public static final java.lang.String FILE_SYSTEM_CHECK_OWNERSHIP_TOKEN
public static final java.lang.String DEFAULT_FS_OWNERSHIP_FILENAME
public StartupChecks.StartupCheckType getStartupCheckType()
getStartupCheckType
in interface StartupCheck
public void execute(StartupChecksOptions options) throws StartupException
StartupCheck
execute
in interface StartupCheck
options
- all options from descriptorStartupException
- if the test determines
that the environement or system is not in a safe state to startupprotected java.lang.String constructTokenFromProperties(java.util.Map<java.lang.String,java.lang.Object> config) throws StartupException
StartupException
public boolean isEnabled(StartupChecksOptions options)
public java.lang.String getFsOwnershipFilename(java.util.Map<java.lang.String,java.lang.Object> config)
public java.lang.String getOwnershipToken(java.util.Map<java.lang.String,java.lang.Object> config)
Copyright © 2009-2022 The Apache Software Foundation