Atlas Server Entity Type

Background

The AtlasServer entity type is special entity type in following ways:

  • Gets created during Export or Import operation.
  • It also has special property pages that display detailed audits for export and import operations.
  • Entities are linked to it using the new option within entity’s attribute SoftReference.

The new type is available within the Search By Type dropdown in both Basic and Advanced search.

Creation

The entity of this type is created upon successful completion of every Export and Import operation. The entity is created with current cluster’s name.

The entity is also created based on export and import requests’ replicatedTo and replicatedFrom parameters.

Details within Property Page

The property page for AtlasServer entity has one additional tab ‘Export/Import Audits’. This has detailed audit record for each export and/or import operation performed on current Atlas instance.

The additionalInfo attribute property is discussed in detail below.

Export/Import Audits

The table has following columns:

  • Operation: EXPORT or IMPORT that denotes the operation performed on instance.
  • Source Server: For an export operation performed on this instance, the value in this column will always be the cluster name of the current Atlas instance. This is the value specified in atlas-application.properties by the key atlas.cluster.name. If not value is specified ‘default’ is used.
  • Target Server: If an export operation is performed with replicatedTo property specified in the request, that value appears here.
  • Operation StartTime: Time the operation was started.
  • Operation EndTIme: Time the operation completed.
  • Tools: Pop-up property page that contains details of the operation.
Example

The following export request will end up creating AtlasServer entity with clMain as its name. The audit record of this operation will be displayed within the property page of this entity.

{
    "itemsToExport": [
        { "typeName": "hive_db", "uniqueAttributes": { "qualifiedName": "stocks@cl1" }}
    ],
    "options": {
        "replicatedTo": "clMain"
    }
}

Support for Cluster’s Full Name

Often times it is necessary to disambiguate the name of the cluster by specifying the location or the data center within which the Atlas instance resides.

The name of the cluster can be specified by separating the location name and cluster name by ‘$’. For example, a clsuter name specified as ‘SFO$cl1’ can be a cluster in San Fancisco (SFO) data center with the name ‘cl1’.

The AtlasServer will handle this and set its name as ‘cl1’ and fullName as ‘SFO@cl1’.

Additional Information

This property in AtlasServer is a map with key and value both as String. This can be used to store any information pertaining to this instance.

Please see Incremental Export for and example of how this property can be used.

REST APIs

Title Atlas Server API
Example see below.
URL api/atlas/admin/server/{serverName}
Method GET
URL Parameters name of the server
Data Parameters None
Success Response AtlasServer
Error Response Errors Returned as AtlasBaseException
CURL
curl -X GET -u admin:admin -H "Content-Type: application/json" -H "Cache-Control: no-cache" http://localhost:21000/api/atlas/admin/server/cl2

Output:

{
    "guid": "f87e4fd1-bfb5-482d-9ab1-e735621b7d16",
    "name": "cl2",
    "qualifiedName": "cl2",
    "additionalInfo": {
        "nextModifiedTimestamp": "1533037289383",
        "replicationOperation": "EXPORT",
        "topLevelEntity": "stocks@cl1"
    }
}