Class EgeriaExtractor
java.lang.Object
org.odpi.openmetadata.adapters.connectors.egeriainfrastructure.extractor.EgeriaExtractor
EgeriaExtractor extracts information from the Egeria runtimes. It covers both the OMAG Server Platform and the
OMAG Servers.
-
Constructor Summary
ConstructorsConstructorDescriptionEgeriaExtractor
(String platformURLRoot, String platformName, String serverOfInterest, String clientUserId) Constructor -
Method Summary
Modifier and TypeMethodDescriptionActivate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.activateServer
(String serverName) Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.void
addOpenMetadataArchive
(Connection connection) Add a new open metadata archive to running repository.void
addOpenMetadataArchiveContent
(OpenMetadataArchive openMetadataArchive) Add a new open metadata archive to running repository.void
addOpenMetadataArchiveFile
(String fileName) Add a new open metadata archive to running repository.boolean
connectToCohort
(String cohortName) A new server needs to register the metadataCollectionId for its metadata repository with the other servers in the open metadata repository.boolean
connectToCohort
(String userId, String cohortName) A new server needs to register the metadataCollectionId for its metadata repository with the other servers in the open metadata repository.void
deployOMAGServerConfig
(String serverName, String destinationPlatformURLRoot) Push the configuration for the server to another OMAG Server Platform.boolean
disconnectFromCohort
(String cohortName) Disconnect communications from a specific cohort.boolean
disconnectFromCohort
(String userId, String cohortName) Disconnect communications from a specific cohort.Retrieve a list of the access services registered on the platformReturn the configuration used for the current active instance of the server.Return the status of a running server (use platform services to find out if the server is running).Retrieve a list of the active services on a serverReturn all the OMAG Server configurations that are stored on this platform.Retrieve a list of the services known on the platformgetConfigurationProperties
(String connectorName) Retrieve the configuration properties of the named connector.getConnectorType
(String connectorProviderClassName) Return the connector type for the requested connector provider after validating that the connector provider is available on the OMAGServerPlatform's class path.Retrieve a list of the engine services registered on the platformRetrieve a list of the integration services registered on the platformReturn the complete set of configuration properties in use by the server.getOMAGServerConfig
(String serverName) Return the complete set of configuration properties in use by the server.Return the latest status information for the platform.Return the latest status information about a particular service.Retrieve the server statusRetrieve a list of the view services registered on the platformvoid
publishOpenLineageEvent
(String event) Pass an open lineage event to the integration service.void
refreshConnector
(String connectorName) Issue a refresh() request on a specific connectorvoid
Issue a refresh() request on a connector running in the integration daemon.void
refreshEngineConfig
(String governanceEngineName) Request that the governance engine refresh its configuration by calling the metadata server.void
refreshIntegrationGroupConfig
(String integrationGroupName) Request that the integration group refresh its configuration by calling the metadata server.void
restartConnector
(String connectorName) Issue a restart() request on a specific connectorvoid
Issue a restart() request on a connector running in the integration daemon.void
Temporarily shutdown all running servers.void
Shutdown any active servers and unregister them from any cohorts.void
Permanently deactivate any open metadata and governance services and unregister from any cohorts.void
shutdownAndUnregisterServer
(String serverName) Permanently deactivate any open metadata and governance services and unregister from any cohorts.void
Temporarily deactivate any open metadata and governance services.void
shutdownServer
(String serverName) Temporarily deactivate any open metadata and governance services.boolean
unregisterFromCohort
(String cohortName) Unregister from a specific cohort and disconnect from cohort communications.boolean
unregisterFromCohort
(String userId, String cohortName) Unregister from a specific cohort and disconnect from cohort communications.void
updateConfigurationProperties
(String connectorName, boolean isMergeUpdate, Map<String, Object> configurationProperties) Update the configuration properties of the connectors, or specific connector if a connector name is supplied.void
updateConnectorConnection
(String connectorName, Connection connection) Update the configuration properties of the connectors, or specific connector if a connector name is supplied.void
updateEndpointNetworkAddress
(String connectorName, String networkAddress) Update the configuration properties of the connectors, or specific connector if a connector name is supplied.
-
Constructor Details
-
EgeriaExtractor
public EgeriaExtractor(String platformURLRoot, String platformName, String serverOfInterest, String clientUserId) throws InvalidParameterException, OMAGInvalidParameterException, InvalidParameterException Constructor- Parameters:
platformURLRoot
- platform URL rootplatformName
- name of the platformserverOfInterest
- optional server nameclientUserId
- userId to use for calls to the- Throws:
InvalidParameterException
- invalid parameterOMAGInvalidParameterException
- invalid parameterInvalidParameterException
-
-
Method Details
-
getPlatformReport
Return the latest status information for the platform.- Returns:
- platform report
- Throws:
Exception
- a variety of exceptions from the different clients
-
getConnectorType
public ConnectorType getConnectorType(String connectorProviderClassName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return the connector type for the requested connector provider after validating that the connector provider is available on the OMAGServerPlatform's class path. This method is for tools that are configuring connectors into an Egeria server. It does not validate that the connector will load and initialize.- Parameters:
connectorProviderClassName
- name of the connector provider class- Returns:
- ConnectorType bean or exceptions that occur when trying to create the connector
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getAccessServices
public List<RegisteredOMAGService> getAccessServices() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionRetrieve a list of the access services registered on the platform- Returns:
- List of access services
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getEngineServices
public List<RegisteredOMAGService> getEngineServices() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionRetrieve a list of the engine services registered on the platform- Returns:
- List of engine services
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getViewServices
public List<RegisteredOMAGService> getViewServices() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionRetrieve a list of the view services registered on the platform- Returns:
- List of view services
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getIntegrationServices
public List<RegisteredOMAGService> getIntegrationServices() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionRetrieve a list of the integration services registered on the platform- Returns:
- List of integration services
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getAllServices
public List<RegisteredOMAGService> getAllServices() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionRetrieve a list of the services known on the platform- Returns:
- List of common services
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
activateServer
public String activateServer(String serverName) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Activate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.- Parameters:
serverName
- server to start- Returns:
- success message
- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the server.
-
activateServer
public String activateServer() throws UserNotAuthorizedException, InvalidParameterException, PropertyServerExceptionActivate the Open Metadata and Governance (OMAG) server using the configuration document stored for this server.- Returns:
- success message
- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the server.
-
shutdownServer
public void shutdownServer(String serverName) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Temporarily deactivate any open metadata and governance services.- Parameters:
serverName
- server to start- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
shutdownServer
public void shutdownServer() throws UserNotAuthorizedException, InvalidParameterException, PropertyServerExceptionTemporarily deactivate any open metadata and governance services.- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
shutdownAllServers
public void shutdownAllServers() throws UserNotAuthorizedException, InvalidParameterException, PropertyServerExceptionTemporarily shutdown all running servers.- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
shutdownAndUnregisterServer
public void shutdownAndUnregisterServer(String serverName) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Permanently deactivate any open metadata and governance services and unregister from any cohorts.- Parameters:
serverName
- server to start- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
shutdownAndUnregisterServer
public void shutdownAndUnregisterServer() throws UserNotAuthorizedException, InvalidParameterException, PropertyServerExceptionPermanently deactivate any open metadata and governance services and unregister from any cohorts.- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
shutdownAndUnregisterAllServers
public void shutdownAndUnregisterAllServers() throws UserNotAuthorizedException, InvalidParameterException, PropertyServerExceptionShutdown any active servers and unregister them from any cohorts.- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
connectToCohort
public boolean connectToCohort(String userId, String cohortName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException A new server needs to register the metadataCollectionId for its metadata repository with the other servers in the open metadata repository. It only needs to do this once and uses a timestamp to record that the registration event has been sent. If the server has already registered in the past, it sends a reregistration request.- Parameters:
userId
- calling usercohortName
- name of cohort- Returns:
- boolean to indicate that the request has been issued. If false it is likely that the cohort name is not known
- Throws:
InvalidParameterException
- one of the supplied parameters caused a problemPropertyServerException
- there is a problem communicating with the remote server.UserNotAuthorizedException
- the user is not authorized to perform the operation requested
-
disconnectFromCohort
public boolean disconnectFromCohort(String userId, String cohortName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Disconnect communications from a specific cohort.- Parameters:
userId
- calling usercohortName
- name of cohort- Returns:
- boolean flag to indicate success.
- Throws:
InvalidParameterException
- one of the supplied parameters caused a problemPropertyServerException
- there is a problem communicating with the remote server.UserNotAuthorizedException
- the user is not authorized to perform the operation requested
-
unregisterFromCohort
public boolean unregisterFromCohort(String userId, String cohortName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Unregister from a specific cohort and disconnect from cohort communications.- Parameters:
userId
- calling usercohortName
- name of cohort- Returns:
- boolean flag to indicate success.
- Throws:
InvalidParameterException
- one of the supplied parameters caused a problemPropertyServerException
- there is a problem communicating with the remote server.UserNotAuthorizedException
- the user is not authorized to perform the operation requested
-
getAllServerConfigurations
public Set<OMAGServerConfig> getAllServerConfigurations() throws OMAGNotAuthorizedException, OMAGConfigurationErrorException, OMAGInvalidParameterExceptionReturn all the OMAG Server configurations that are stored on this platform.- Returns:
- the OMAG Server configurations that are stored on this platform
- Throws:
OMAGNotAuthorizedException
- the supplied userId is not authorized to issue this command.OMAGInvalidParameterException
- invalid parameter.OMAGConfigurationErrorException
- unusual state in the admin server.
-
deployOMAGServerConfig
public void deployOMAGServerConfig(String serverName, String destinationPlatformURLRoot) throws OMAGNotAuthorizedException, OMAGConfigurationErrorException, OMAGInvalidParameterException Push the configuration for the server to another OMAG Server Platform.- Parameters:
serverName
- local server namedestinationPlatformURLRoot
- location of the platform where the config is to be deployed to- Throws:
OMAGNotAuthorizedException
- the supplied userId is not authorized to issue this command.OMAGConfigurationErrorException
- something went wrong with the REST call stack.OMAGInvalidParameterException
- invalid serverName or destinationPlatform parameter.
-
getOMAGServerConfig
public OMAGServerConfig getOMAGServerConfig(String serverName) throws OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorException Return the complete set of configuration properties in use by the server.- Parameters:
serverName
- local server name- Returns:
- OMAGServerConfig properties
- Throws:
OMAGNotAuthorizedException
- the supplied userId is not authorized to issue this command.OMAGInvalidParameterException
- invalid serverName parameter.OMAGConfigurationErrorException
- something went wrong with the REST call stack.
-
getOMAGServerConfig
public OMAGServerConfig getOMAGServerConfig() throws OMAGNotAuthorizedException, OMAGInvalidParameterException, OMAGConfigurationErrorExceptionReturn the complete set of configuration properties in use by the server.- Returns:
- OMAGServerConfig properties
- Throws:
OMAGNotAuthorizedException
- the supplied userId is not authorized to issue this command.OMAGInvalidParameterException
- invalid serverName parameter.OMAGConfigurationErrorException
- something went wrong with the REST call stack.
-
getServerStatus
public ServerStatus getServerStatus() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionRetrieve the server status- Returns:
- The server status
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
getActiveConfiguration
public OMAGServerConfig getActiveConfiguration() throws UserNotAuthorizedException, InvalidParameterException, PropertyServerExceptionReturn the configuration used for the current active instance of the server. Null is returned if the server instance is not running.- Returns:
- configuration properties used to initialize the server or null if not running
- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
getActiveServerStatus
public ServerServicesStatus getActiveServerStatus() throws UserNotAuthorizedException, InvalidParameterException, PropertyServerExceptionReturn the status of a running server (use platform services to find out if the server is running).- Returns:
- status of the server
- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
getActiveServices
public List<String> getActiveServices() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionRetrieve a list of the active services on a server- Returns:
- List of service names
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
addOpenMetadataArchiveFile
public void addOpenMetadataArchiveFile(String fileName) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Add a new open metadata archive to running repository.- Parameters:
fileName
- name of the open metadata archive file.- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
addOpenMetadataArchive
public void addOpenMetadataArchive(Connection connection) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Add a new open metadata archive to running repository.- Parameters:
connection
- connection for the open metadata archive.- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
addOpenMetadataArchiveContent
public void addOpenMetadataArchiveContent(OpenMetadataArchive openMetadataArchive) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Add a new open metadata archive to running repository.- Parameters:
openMetadataArchive
- openMetadataArchive for the open metadata archive.- Throws:
UserNotAuthorizedException
- the supplied userId is not authorized to issue this command.InvalidParameterException
- invalid parameter.PropertyServerException
- unusual state in the platform.
-
getServerReport
Return the latest status information about a particular service.- Returns:
- server report
- Throws:
Exception
- a variety of exceptions from the different clients
-
getConfigurationProperties
public Map<String,Object> getConfigurationProperties(String connectorName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the configuration properties of the named connector.- Parameters:
connectorName
- name of a specific connector or null for all connectors- Returns:
- property map
- Throws:
InvalidParameterException
- the connector name is not recognizedUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- there was a problem detected by the integration daemon
-
updateConfigurationProperties
public void updateConfigurationProperties(String connectorName, boolean isMergeUpdate, Map<String, Object> configurationProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionUpdate the configuration properties of the connectors, or specific connector if a connector name is supplied.- Parameters:
connectorName
- name of a specific connector or null for all connectorsisMergeUpdate
- should the properties be merged into the existing properties or replace themconfigurationProperties
- new configuration properties- Throws:
InvalidParameterException
- the connector name is not recognizedUserNotAuthorizedException
PropertyServerException
-
updateEndpointNetworkAddress
public void updateEndpointNetworkAddress(String connectorName, String networkAddress) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the configuration properties of the connectors, or specific connector if a connector name is supplied.- Parameters:
connectorName
- name of a specific connector or null for all connectorsnetworkAddress
- new address- Throws:
InvalidParameterException
- the connector name is not recognizedUserNotAuthorizedException
PropertyServerException
-
updateConnectorConnection
public void updateConnectorConnection(String connectorName, Connection connection) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the configuration properties of the connectors, or specific connector if a connector name is supplied.- Parameters:
connectorName
- name of a specific connector or null for all connectorsconnection
- new address- Throws:
InvalidParameterException
- the connector name is not recognizedUserNotAuthorizedException
PropertyServerException
-
refreshConnector
public void refreshConnector(String connectorName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a refresh() request on a specific connector- Throws:
InvalidParameterException
- one of the parameters is null or invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- there was a problem detected by the integration daemon
-
refreshConnectors
public void refreshConnectors() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionIssue a refresh() request on a connector running in the integration daemon.- Throws:
InvalidParameterException
- one of the parameters is null or invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- there was a problem detected by the integration daemon
-
restartConnector
public void restartConnector(String connectorName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a restart() request on a specific connector- Parameters:
connectorName
- connector- Throws:
InvalidParameterException
- one of the parameters is null or invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- there was a problem detected by the integration daemon
-
restartConnectors
public void restartConnectors() throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionIssue a restart() request on a connector running in the integration daemon.- Throws:
InvalidParameterException
- one of the parameters is null or invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- there was a problem detected by the integration daemon
-
refreshIntegrationGroupConfig
public void refreshIntegrationGroupConfig(String integrationGroupName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Request that the integration group refresh its configuration by calling the metadata server. This request is useful if the metadata server has an outage, particularly while the integration daemon is initializing. This request just ensures that the latest configuration is in use.- Parameters:
integrationGroupName
- qualifiedName of the integration group to target- Throws:
InvalidParameterException
- one of the parameters is null or invalid.UserNotAuthorizedException
- user not authorized to issue this request.PropertyServerException
- there was a problem detected by the integration group.
-
publishOpenLineageEvent
public void publishOpenLineageEvent(String event) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Pass an open lineage event to the integration service. It will pass it on to the integration connectors that have registered a listener for open lineage events.- Parameters:
event
- open lineage event to publish.- Throws:
InvalidParameterException
- one of the parameters is null or invalidUserNotAuthorizedException
- the caller is not authorized to call the servicePropertyServerException
- there is a problem processing the request
-
refreshEngineConfig
public void refreshEngineConfig(String governanceEngineName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Request that the governance engine refresh its configuration by calling the metadata server. This request is useful if the metadata server has an outage, particularly while the governance server is initializing. This request just ensures that the latest configuration is in use.- Parameters:
governanceEngineName
- qualifiedName of the governance engine to target- Throws:
InvalidParameterException
- one of the parameters is null or invalid.UserNotAuthorizedException
- user not authorized to issue this request.PropertyServerException
- there was a problem detected by the governance engine.
-
connectToCohort
public boolean connectToCohort(String cohortName) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException A new server needs to register the metadataCollectionId for its metadata repository with the other servers in the open metadata repository. It only needs to do this once and uses a timestamp to record that the registration event has been sent. If the server has already registered in the past, it sends a reregistration request.- Parameters:
cohortName
- name of cohort- Returns:
- boolean to indicate that the request has been issued. If false it is likely that the cohort name is not known
- Throws:
InvalidParameterException
- one of the supplied parameters caused a problemRepositoryErrorException
- there is a problem communicating with the remote server.UserNotAuthorizedException
- the user is not authorized to perform the operation requested
-
disconnectFromCohort
public boolean disconnectFromCohort(String cohortName) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException Disconnect communications from a specific cohort.- Parameters:
cohortName
- name of cohort- Returns:
- boolean flag to indicate success.
- Throws:
InvalidParameterException
- one of the supplied parameters caused a problemRepositoryErrorException
- there is a problem communicating with the remote server.UserNotAuthorizedException
- the user is not authorized to perform the operation requested
-
unregisterFromCohort
public boolean unregisterFromCohort(String cohortName) throws InvalidParameterException, RepositoryErrorException, UserNotAuthorizedException Unregister from a specific cohort and disconnect from cohort communications.- Parameters:
cohortName
- name of cohort- Returns:
- boolean flag to indicate success.
- Throws:
InvalidParameterException
- one of the supplied parameters caused a problemRepositoryErrorException
- there is a problem communicating with the remote server.UserNotAuthorizedException
- the user is not authorized to perform the operation requested
-