public class DataProcessingUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DataProcessingUtils.LockAcquired
This class is to store the lock acquiring states:
- allLocksAcquired: all the locks have been acquired
- primaryLockAcquired: the lock to the primary dataset has been acquired
- joinDataSetLocksAquired: the locks to the join datasets in the existing transforms have been acquired
|
static class |
DataProcessingUtils.TranformLockAcquired |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTEXTROOT |
static java.lang.String |
ERROR_LOG |
static java.lang.String |
HOST |
static java.lang.String |
PORT |
Constructor and Description |
---|
DataProcessingUtils() |
Modifier and Type | Method and Description |
---|---|
static DataProcessingUtils.LockAcquired |
acquireTransformLocks(javax.portlet.PortletRequest request,
long projectId,
java.lang.String dataSetKey,
boolean onlyConsiderUncommittedTransforms) |
static DataProcessingUtils.LockAcquired |
acquireTransformLocks(javax.portlet.PortletRequest request,
long projectId,
java.lang.String dataSetKey,
boolean onlyConsiderUncommittedTransforms,
java.util.List<Transform> newTransformsToAdd)
Acquires tranform locks, including the locks for the join datasets if any.
|
static DataProcessingUtils.LockAcquired |
acquireTransformLocks(javax.portlet.PortletRequest request,
long projectId,
java.lang.String dataSetKey,
boolean onlyConsiderUncommittedTransforms,
Transform newTransformToAdd) |
static java.util.Map<java.lang.String,java.lang.String> |
buildNotificationProperties(long groupId,
long userId,
java.lang.String dataSetDisplayName) |
static java.util.Map<java.lang.String,java.lang.String> |
buildNotificationProperties(long groupId,
long userId,
java.lang.String projectSpecificCollectionName,
com.oracle.endeca.pdi.concepts.mdex.MdexCollectionIdentifier nativeCollectionId,
java.lang.String dataSetDisplayName) |
static java.util.Map<java.lang.String,java.lang.String> |
buildNotificationProperties(long groupId,
long userId,
java.lang.String projectSpecificCollectionName,
com.oracle.endeca.pdi.concepts.mdex.MdexCollectionIdentifier nativeCollectionId,
java.lang.String dataSetDisplayName,
java.lang.String projectDisplayName) |
static java.util.Map<java.lang.String,java.lang.String> |
buildNotificationProperties(long groupId,
long userId,
java.lang.String projectSpecificCollectionName,
com.oracle.endeca.pdi.concepts.mdex.MdexCollectionIdentifier nativeCollectionId,
java.lang.String dataSetDisplayName,
java.lang.String projectDisplayName,
java.lang.String appWizardUuid) |
static java.util.Map<java.lang.String,java.lang.String> |
buildNotificationProperties(long groupId,
long userId,
java.lang.String projectSpecificCollectionName,
com.oracle.endeca.pdi.concepts.mdex.MdexCollectionIdentifier nativeCollectionId,
java.lang.String dataSetDisplayName,
java.lang.String projectDisplayName,
java.lang.String appWizardUuid,
java.lang.Long transformIndex) |
static CopyCollectionStatus |
getCollectionCopyStatus(long projectId,
java.lang.String projectSpecificSourceCollectionName)
Ascertains whether a collection copy exists or if a job is currently running to create such a copy for a given source collection.
|
static java.lang.String |
getDataDomainName(java.lang.String responsePath) |
static boolean |
getDataSetInProgressFlag(long projectId,
java.lang.String projectSpecificCollectionName) |
static java.lang.String |
getEndecaServerPath() |
static boolean |
getEndecaServerSSLEnabled() |
static java.lang.String |
getErrorMessage(java.lang.String logPath) |
static java.util.Set<java.lang.String> |
getJoinDataSets(long projectId,
java.lang.String dataSetKey,
boolean onlyConsiderUncommittedTransforms) |
static java.util.List<UserPersistence> |
getPersistedTransformLock(java.lang.String dataSetKey,
long projectId)
Gets the transform lock for the current project data set from the UserPersistence store.
|
static void |
invokeApplyToDataSetWorkflow(long projectId,
java.lang.String projectName,
long userId,
java.lang.String projectSpecificCollectionName,
com.oracle.endeca.pdi.concepts.mdex.MdexCollectionIdentifier targetCollectionId,
java.lang.String dataSetDisplayName,
Workflow event,
long toIndex)
This method kicks off a thread to call DP's invokeApplyTransformToDataSet() API that applies a transform script to a previously copied
project-private collection.
|
static void |
invokeCurateDataSetWorkflow(CollectionBaseView dataSetToCurate,
long projectId,
java.lang.String projectName,
long userId,
java.util.Locale locale,
RequestIds requestIds,
Workflow.WorkflowNameEnum workflowName)
This method kicks off a thread to call DP's invokeCreateCuratedDataSet() API that reloads a Hive source in full (not sampled) into a new
collection, while optionally applying a transform.
|
static void |
markInvalidAttributesInQueryState(DataSource ds,
java.lang.String dataSetKey)
This method examines each
QueryFunction in the current QueryState that matches the given data set key, and
marks their invalid flags based on the following criteria: (1) If the corresponding attribute cannot be found in the current data set,
mark invalid as true (2) If the corresponding attribute's type does not match the QueryFunction 's attribute
type, mark invalid as true (3) Otherwise, mark invalid as false If any QueryFunction 's invalidity
is altered, the QueryState is updated to reflect that. |
static void |
replaceReloadedDataset(javax.portlet.PortletRequest request,
CollectionBaseView baseView)
For a data set that has been reloaded, switches over to use the replacement collection.
|
static void |
rollbackAppliedTransforms(javax.portlet.PortletRequest request,
java.lang.String dataSetKey) |
static void |
setDataSetInProgressFlag(long projectId,
java.lang.String projectSpecificCollectionName,
boolean onlyConsiderUncommittedTransforms,
boolean inProgress) |
static void |
setTransformsAppliedStatus(long groupId,
java.lang.String dataSetKey,
long toIndex,
boolean apply) |
static java.util.Map<java.lang.String,java.lang.String> |
splitPath(java.lang.String path) |
static void |
updateTransformAttributeMetadata(long projectId,
java.lang.String dataSet,
java.util.Map<java.lang.String,java.lang.Object> metadatas) |
public static final java.lang.String HOST
public static final java.lang.String PORT
public static final java.lang.String CONTEXTROOT
public static final java.lang.String ERROR_LOG
public static java.lang.String getEndecaServerPath() throws javax.portlet.PortletException
javax.portlet.PortletException
public static boolean getEndecaServerSSLEnabled() throws javax.portlet.PortletException
javax.portlet.PortletException
public static java.util.Map<java.lang.String,java.lang.String> splitPath(java.lang.String path)
public static java.lang.String getDataDomainName(java.lang.String responsePath) throws javax.portlet.PortletException
javax.portlet.PortletException
public static java.lang.String getErrorMessage(java.lang.String logPath) throws javax.portlet.PortletException
javax.portlet.PortletException
public static void setTransformsAppliedStatus(long groupId, java.lang.String dataSetKey, long toIndex, boolean apply) throws TransformException
TransformException
public static void markInvalidAttributesInQueryState(DataSource ds, java.lang.String dataSetKey) throws KeyNotFoundException, DataSourceException
QueryFunction
in the current QueryState
that matches the given data set key, and
marks their invalid flags based on the following criteria: (1) If the corresponding attribute cannot be found in the current data set,
mark invalid as true
(2) If the corresponding attribute's type does not match the QueryFunction
's attribute
type, mark invalid as true
(3) Otherwise, mark invalid as false
If any QueryFunction
's invalidity
is altered, the QueryState
is updated to reflect that. This method leaves room for future updates to the logic to determine
if a QueryFunction
is invalid.ds
- dataSetkey
- KeyNotFoundException
DataSourceException
public static void invokeCurateDataSetWorkflow(CollectionBaseView dataSetToCurate, long projectId, java.lang.String projectName, long userId, java.util.Locale locale, RequestIds requestIds, Workflow.WorkflowNameEnum workflowName) throws javax.portlet.PortletException
dataSetToCurate
- the data set to curateprojectId
- numeric identifier of the Studio project within which this transform will runprojectName
- name of this Studio project used in EDP logginguserId
- locale
- requestIds
- workflowName
- java.lang.Exception
- if something goes wrong either setting up or invoking the workflowjavax.portlet.PortletException
public static void invokeApplyToDataSetWorkflow(long projectId, java.lang.String projectName, long userId, java.lang.String projectSpecificCollectionName, com.oracle.endeca.pdi.concepts.mdex.MdexCollectionIdentifier targetCollectionId, java.lang.String dataSetDisplayName, Workflow event, long toIndex) throws java.lang.Exception
projectId
- numeric identifier of the Studio project within which this transform will runprojectName
- name of this Studio project used in EDP loggingprojectSpecificCollectionName
- collection name used by the project to bind to the data set being transformedtargetCollectionId
- the "inventoried"/"native" collection id of a previously copied collection being transformednativeCollectionName
- workflow
- progressInfo
- persisted object that tracks workflow stateMap
- of information about the invoked workflow jobtoIndex
- the range index to applyjava.lang.Exception
- if something goes wrong either setting up or invoking the workflowpublic static CopyCollectionStatus getCollectionCopyStatus(long projectId, java.lang.String projectSpecificSourceCollectionName)
projectId
- a project ID indicating the Studio project (Group)projectSpecificSourceCollectionName
- project-specific (suffixed) collection name used by the projectpublic static void rollbackAppliedTransforms(javax.portlet.PortletRequest request, java.lang.String dataSetKey) throws javax.portlet.PortletException, TransformException
javax.portlet.PortletException
TransformException
public static void replaceReloadedDataset(javax.portlet.PortletRequest request, CollectionBaseView baseView) throws DataSourceException, KeyNotFoundException
request
- baseView
- DataSourceException
KeyNotFoundException
public static java.util.List<UserPersistence> getPersistedTransformLock(java.lang.String dataSetKey, long projectId) throws javax.portlet.PortletException
dataSetKey
- projectId
- javax.portlet.PortletException
public static java.util.Map<java.lang.String,java.lang.String> buildNotificationProperties(long groupId, long userId, java.lang.String dataSetDisplayName)
public static java.util.Map<java.lang.String,java.lang.String> buildNotificationProperties(long groupId, long userId, java.lang.String projectSpecificCollectionName, com.oracle.endeca.pdi.concepts.mdex.MdexCollectionIdentifier nativeCollectionId, java.lang.String dataSetDisplayName)
public static java.util.Map<java.lang.String,java.lang.String> buildNotificationProperties(long groupId, long userId, java.lang.String projectSpecificCollectionName, com.oracle.endeca.pdi.concepts.mdex.MdexCollectionIdentifier nativeCollectionId, java.lang.String dataSetDisplayName, java.lang.String projectDisplayName)
public static java.util.Map<java.lang.String,java.lang.String> buildNotificationProperties(long groupId, long userId, java.lang.String projectSpecificCollectionName, com.oracle.endeca.pdi.concepts.mdex.MdexCollectionIdentifier nativeCollectionId, java.lang.String dataSetDisplayName, java.lang.String projectDisplayName, java.lang.String appWizardUuid)
public static java.util.Map<java.lang.String,java.lang.String> buildNotificationProperties(long groupId, long userId, java.lang.String projectSpecificCollectionName, com.oracle.endeca.pdi.concepts.mdex.MdexCollectionIdentifier nativeCollectionId, java.lang.String dataSetDisplayName, java.lang.String projectDisplayName, java.lang.String appWizardUuid, java.lang.Long transformIndex)
public static boolean getDataSetInProgressFlag(long projectId, java.lang.String projectSpecificCollectionName)
public static void setDataSetInProgressFlag(long projectId, java.lang.String projectSpecificCollectionName, boolean onlyConsiderUncommittedTransforms, boolean inProgress)
public static java.util.Set<java.lang.String> getJoinDataSets(long projectId, java.lang.String dataSetKey, boolean onlyConsiderUncommittedTransforms)
public static DataProcessingUtils.LockAcquired acquireTransformLocks(javax.portlet.PortletRequest request, long projectId, java.lang.String dataSetKey, boolean onlyConsiderUncommittedTransforms, java.util.List<Transform> newTransformsToAdd)
request
- projectId
- dataSetKey
- onlyConsiderUncommittedTransforms
- true: only locks the join datasets in the uncommitted transforms, besides the primary dataset and the join datasets in the newTransformsToAdd list;
false: locks the join datasets in all the transforms (including the committed transforms), besides the primary dataset and the join datasets in the newTransformsToAdd list.newTransformsToAdd
- public static DataProcessingUtils.LockAcquired acquireTransformLocks(javax.portlet.PortletRequest request, long projectId, java.lang.String dataSetKey, boolean onlyConsiderUncommittedTransforms, Transform newTransformToAdd)
public static DataProcessingUtils.LockAcquired acquireTransformLocks(javax.portlet.PortletRequest request, long projectId, java.lang.String dataSetKey, boolean onlyConsiderUncommittedTransforms)
public static void updateTransformAttributeMetadata(long projectId, java.lang.String dataSet, java.util.Map<java.lang.String,java.lang.Object> metadatas)
Copyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.