%DeepSee.CubeManager.Utils
class %DeepSee.CubeManager.Utils extends %Library.RegisteredObject
Utility container for the cube managerMethod Inventory
- BuildAllRegisteredGroups()
- BuildCube()
- BuildOneRegisteredGroup()
- BuildRegistryMap()
- GetActiveRegistry()
- GetCubeGroups()
- GetDependentCubes()
- GetLastUpdate()
- IsUpdate()
- IsValidCubeSchedule()
- IsValidGroup()
- RepairBuild()
- SetActiveRegistry()
- SynchronizeCube()
- WriteToRegistry()
Parameters
parameter DOMAIN = %DeepSee;
Methods
classmethod BuildAllRegisteredGroups(pMap As %DeepSee.CubeManager.RegistryMap = "", ByRef pBuildStats, pVerbose As %Boolean = 1) as %Status
This is a utility method which executes a complete build of all currently registered cubes in the current cube registry.
The build initiated by this utility will walk through every cube and build it in the order it is listed in
the DeepSee Cube Registry page. This can be used to initialize the system, for example after
importing a new registry definition or restoring a backup of the source data.
Build statistics for each cube in the registry can be returned by reference in pBuildStats(CUBENAME).
Build statistics for each cube in the registry can be returned by reference in pBuildStats(CUBENAME).
classmethod BuildCube(pCubeName As %String = "", pAsync As %Boolean = 1, pVerbose As %Boolean = 1, pIndexOnly As %Boolean = 0, pMaxFacts As %Integer = 0, pTracking As %Boolean = 0, pRepair As %Boolean = 0, pMapCube As %DeepSee.CubeManager.RegistryMapCube = "", ByRef pBuildStats, pFactList As %String = "") as %Status
A wrapper for %DeepSee.Utils.%BuildCube() which records
cube event information when building the cube. All arguments listed after
pCubeName perfrom the identical function as they do in
%BuildCube(), with the exception of pRepair. This argument
changes the event type in the logs to note that this cube was rebuilt as part of a
repair build.
classmethod BuildOneRegisteredGroup(pGroupName="", pMap As %DeepSee.CubeManager.RegistryMap = "", ByRef pBuildStats, pVerbose As %Boolean = 1) as %Status
This is a utility method which executes a complete build of one registered cube group in the current cube registry.
The build initiated by this utility will walk through every cube and build it in the order it is listed in
the DeepSee Cube Registry page.
The value of pGroupName must exactly match the case of the registered group name to inititate the group build.
Build statistics for each cube in the group can be returned by reference in pBuildStats(CUBENAME).
The value of pGroupName must exactly match the case of the registered group name to inititate the group build.
Build statistics for each cube in the group can be returned by reference in pBuildStats(CUBENAME).
classmethod BuildRegistryMap(ByRef pStatus, pClassName="", pRegisteredOnly=0, ByRef pLookup) as %DeepSee.CubeManager.RegistryMap
Retrieve the map that describes the current state of the Cube
Registry and all other unregistered cubes on the system. By default, the
currently active registry is loaded first and then this is augmented with
the remaining unregistered natural cube groups. The registry object can be loaded
from a non-active registry class by supplying the name of the alternate storage class
in the pClassName parameter. The unregistered groups may be ignored when
loading the class by setting
pRegisteredOnly = 1
Optionally pLookup may be constructed to provide an index of the ordered locations of every cube loaded into the map object. This takes the form
pLookup(CubeKey) = $LB(GroupPosition,CubePosition)
pRegisteredOnly = 1
Optionally pLookup may be constructed to provide an index of the ordered locations of every cube loaded into the map object. This takes the form
pLookup(CubeKey) = $LB(GroupPosition,CubePosition)
Set CubeName = "HOLEFOODS" Set Map = ##class(%DeepSee.CubeManager.Utils).BuildRegistryMap(,,,.Lookup) Set GroupIdx = $LG(Lookup("cubes",CubeName),1) Set CubeIdx = $LG(Lookup("cubes",CubeName),2) Set Cube = Map.Groups.GetAt(GroupIdx).Cubes.GetAt(CubeIdx)
classmethod GetActiveRegistry() as %String
Retrieve the name of the Cube Registry currently marked Active
classmethod GetCubeGroups(ByRef pGroups, ByRef pCubes, ByRef pBuildOrders, pReg=0) as %Status
Calculates the natural groups for all cubes on the system. Group information is
returned in array form. These arrays are organized as follows:
pGroups(groupName,cubeKey) = buildOrder
pCubes(cubeKey) = groupName
pBuildOrders(groupName,buildPosition) = cubeKey
If the cube has dependencies, there will be an additional array
pCubes(cubeKey,"dependents")
which will list the cubes that must be updated if this one has been updated.
pGroups(groupName,cubeKey) = buildOrder
pCubes(cubeKey) = groupName
pBuildOrders(groupName,buildPosition) = cubeKey
If the cube has dependencies, there will be an additional array
pCubes(cubeKey,"dependents")
which will list the cubes that must be updated if this one has been updated.
classmethod GetDependentCubes(pCubeName="", pMap As %DeepSee.CubeManager.RegistryMap = "", Output pDependentCubes, ByRef pGroups, ByRef pCubes, ByRef pBuildOrders) as %Status
This method accumulates the complete list of cubes dependent on this target
cube, based on defined relationships. Every cube in pDependentCubes must be
built following a build of pCubeName. This is an alphabetical
list, it is not a build order.
The registry map can optionally be passed in as pMap to take advantage of the relationship information already stored in the cube registry, avoiding the recalcualtion of natural groups on the system.
The registry map can optionally be passed in as pMap to take advantage of the relationship information already stored in the cube registry, avoiding the recalcualtion of natural groups on the system.
classmethod GetLastUpdate(pCubeKey, pUpdateType="synch") as %String
Retrieves the timestamp of the the last registered data update for the cube. Updates
performed outside of the Cube Manager will not be recognized in this check.
classmethod IsUpdate(pCube As %DeepSee.CubeManager.RegistryMapCube, pGroupName As %String) as %Boolean
Utility method used to determine whether this cube needs to be processed
when we write to the registry. Cubes that have not been updated don't
get processed because we don't want to generate a cube history event
unnecessarily.
classmethod IsValidCubeSchedule(pCube As %DeepSee.CubeManager.RegistryMapCube, Output pStatus) as %Boolean
Validation for the current cube settings.
classmethod IsValidGroup(ByRef pGroup As %DeepSee.CubeManager.RegistryMapGroup, ByRef pStatus As %Status, ByRef pGroups, ByRef pCubes, ByRef pBuildOrders) as %Boolean
Boolean test which returns 1 if the group supplied as the argument is no
less than the union of the natural groups of each of its members. If this
test returns 0, the specific reason for the failure will be recorded in
pStatus.
classmethod RepairBuild(pCubeName As %String, pMap As %DeepSee.CubeManager.RegistryMap = "", pAsync As %Boolean = 1, pVerbose As %Boolean = 1, pIndexOnly As %Boolean = 0, pMaxFacts As %Integer = 0, pTracking As %Boolean = 0, ByRef pBuildStats, pFactList As %String = "") as %Status
This method provides a means of doing an unscheduled repair build
of a registered cube. This method will build the target cube, and then
trigger a build of the entire list of cubes that depend on it through
cube relationships.
Build statistics for each cube in the registry can be returned by reference in pBuildStats(CUBENAME).
Build statistics for each cube in the registry can be returned by reference in pBuildStats(CUBENAME).
classmethod SetActiveRegistry(pClassName="DeepSee.CubeManager.CubeRegistryDefinition", pMustExist=1) as %Status
Change which Cube Registry is currently active. The Active Registry is the
only one that is visible to the updater tasks.
classmethod SynchronizeCube(pCubeName As %String = "", pVerbose As %Boolean = 1, Output pFactsUpdated As %Integer, pReadCommitted As %Boolean = 1, pCheckReferences As %Boolean = 1, pAsync As %Boolean = 0, pMapCube As %DeepSee.CubeManager.RegistryMapCube = "", ByRef pSynchronizeStats) as %Status
A wrapper for %DeepSee.Utils.%SynchronizeCube() which records
cube event information when building the cube. This method will quit with an error if
- pCubeName refers to an unregistered cube
- pCubeName is marked as disabled in the registry
- pCubeName refers to an unregistered cube
- pCubeName is marked as disabled in the registry
classmethod WriteToRegistry(ByRef pCubeMap As %DeepSee.CubeManager.RegistryMap, ByRef pValidation) as %Status
Walk through a CubeManager.RegistryMap object and register the cubes. This saves the
complete registry to an XData block in a container class, and saves limited information
to the registry table for SQL reference.
Inherited Members
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()