public abstract class ServiceDirectory extends StackDefinitionDirectory
Modifier and Type | Field and Description |
---|---|
protected static String |
CHECKS_FOLDER_NAME
checks directory name
|
protected File |
checksDir
checks directory path
|
protected static String |
PACKAGE_FOLDER_NAME
package directory name
|
protected String |
packageDir
package directory path
|
protected static String |
SERVER_ACTIONS_FOLDER_NAME
Server actions directory name
|
protected File |
serverActionsDir
server side action directory path
|
static String |
SERVICES_FOLDER_NAME
services root directory name
|
protected static String |
UPGRADES_FOLDER_NAME
upgrades directory name
|
protected File |
upgradesDir
upgrades directory path
|
CONFIG_UPGRADE_XML_FILENAME_PREFIX, directory, XML_FILENAME_FILTER
Constructor and Description |
---|
ServiceDirectory(String servicePath)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
calculateChecksDirectory(String stack,
String service)
Sets the checksDir if the dir exists and is not empty
|
protected void |
calculateDirectories(String stack,
String service)
Calculate the service specific directories.
|
protected void |
calculatePackageDirectory(String stack,
String service)
Sets the packageDir if the path exists and is not empty
|
protected void |
calculateServerActionsDirectory(String stack,
String service)
Sets the serverActionsDir if the dir exists and is not empty
|
protected void |
calculateUpgradesDirectory(String stack,
String service)
Sets the upgradesDir if the dir exists and is not empty
|
File |
getAdvisorFile()
Obtain the advisor file.
|
abstract String |
getAdvisorName(String serviceName)
Obtain the advisor name.
|
File |
getAlertsFile()
Obtain the alerts file.
|
File |
getChecksDir()
Obtain the checks directory path.
|
File |
getKerberosDescriptorFile()
Obtain the Kerberos Descriptor file.
|
ServiceMetainfoXml |
getMetaInfoFile()
Obtain the service metainfo file object representation.
|
File |
getMetricsFile(String serviceName)
Obtain the metrics file.
|
String |
getPackageDir()
Obtain the package directory path.
|
protected abstract File |
getResourcesDirectory() |
StackRoleCommandOrder |
getRoleCommandOrder()
Obtain the object representation of the service role_command_order.json file
|
File |
getServerActionsDir()
Obtain the server side actions directory path.
|
abstract String |
getService() |
abstract String |
getStack() |
File |
getThemeFile()
Obtain theme file
|
File |
getUpgradesDir()
Obtain the upgrades directory path.
|
File |
getWidgetsDescriptorFile(String serviceName)
Obtain the Widgets Descriptor file.
|
protected void |
parseMetaInfoFile()
Unmarshal the metainfo file into its object representation.
|
protected void |
parsePath()
Parse the service directory.
|
protected File |
resolveDirectory(String directoryName,
String stack,
String service) |
protected String |
resolveRelativeDirectoryPathString(File resourcesDir,
String directoryName,
String stack,
String service) |
getAbsolutePath, getConfigurationDirectory, getDirectory, getName, getPath
protected String packageDir
protected File upgradesDir
protected File checksDir
protected File serverActionsDir
public static final String SERVICES_FOLDER_NAME
protected static final String PACKAGE_FOLDER_NAME
protected static final String UPGRADES_FOLDER_NAME
protected static final String CHECKS_FOLDER_NAME
protected static final String SERVER_ACTIONS_FOLDER_NAME
public ServiceDirectory(String servicePath) throws org.apache.ambari.server.AmbariException
servicePath
- path of the service directoryorg.apache.ambari.server.AmbariException
- if unable to parse the service directorypublic String getPackageDir()
public File getUpgradesDir()
public File getChecksDir()
public File getServerActionsDir()
public File getMetricsFile(String serviceName)
public File getAdvisorFile()
public abstract String getAdvisorName(String serviceName)
public File getAlertsFile()
public File getThemeFile()
public File getKerberosDescriptorFile()
public File getWidgetsDescriptorFile(String serviceName)
public ServiceMetainfoXml getMetaInfoFile()
public StackRoleCommandOrder getRoleCommandOrder()
protected void parsePath() throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public abstract String getService()
public abstract String getStack()
protected void calculateDirectories(String stack, String service)
protected File resolveDirectory(String directoryName, String stack, String service)
directoryName
- stack
- service
- protected String resolveRelativeDirectoryPathString(File resourcesDir, String directoryName, String stack, String service)
directoryName
- stack
- service
- protected abstract File getResourcesDirectory()
protected void calculatePackageDirectory(String stack, String service)
stack
- service
- protected void calculateUpgradesDirectory(String stack, String service)
stack
- service
- protected void calculateChecksDirectory(String stack, String service)
stack
- service
- protected void calculateServerActionsDirectory(String stack, String service)
stack
- service
- protected void parseMetaInfoFile() throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
- if the metainfo file doesn't exist or
unable to unmarshal the metainfo fileCopyright © 2022 Apache Software Foundation. All rights reserved.