public class DataProcessingUtils
extends java.lang.Object
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 boolean |
acquireTransformLock(javax.portlet.PortletRequest request,
long projectId,
java.lang.String dataSetKey)
Acquires a transform lock, when possible.
|
static java.util.List<java.lang.String> |
getAllOtherCollectionNames(java.lang.String collectionName)
Returns the list of collection names, excluding the specified one, found on the specified collection.
|
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 java.lang.String |
getEndecaServerPath() |
static boolean |
getEndecaServerSSLEnabled() |
static java.lang.String |
getErrorMessage(java.lang.String logPath) |
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,
java.lang.String projectSpecificCollectionName,
java.lang.String targetCollectionName,
ApplyToSampleProgressInfo progressInfo,
RequestIds requestIds)
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)
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 |
setTransformsAppliedStatus(long groupId,
java.lang.String dataSetKey,
boolean apply) |
static java.util.Map<java.lang.String,java.lang.String> |
splitPath(java.lang.String path) |
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, 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) throws javax.portlet.PortletException
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 transformedtargetCollectionName
- the "inventoried"/"native" name of a previously copied collection being transformedprogressInfo
- persisted object that tracks workflow statejava.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, java.lang.String projectSpecificCollectionName, java.lang.String targetCollectionName, ApplyToSampleProgressInfo progressInfo, RequestIds requestIds) 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 transformedtargetCollectionName
- the "inventoried"/"native" name of a previously copied collection being transformedprogressInfo
- persisted object that tracks workflow statejava.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<java.lang.String> getAllOtherCollectionNames(java.lang.String collectionName) throws DataSourceException, KeyNotFoundException
KeyNotFoundException
- if the collection by the specified name is not foundDataSourceException
public static boolean acquireTransformLock(javax.portlet.PortletRequest request, long projectId, java.lang.String dataSetKey) throws javax.portlet.PortletException
request
- projectId
- dataSetKey
- javax.portlet.PortletException
public static java.util.List<UserPersistence> getPersistedTransformLock(java.lang.String dataSetKey, long projectId) throws javax.portlet.PortletException
dataSetKey
- projectId
- javax.portlet.PortletException
Copyright 2003, 2014, Oracle and/or its affiliates. All rights reserved.