Package org.hpccsystems.ws.client
Class HPCCWsWorkUnitsClient
- java.lang.Object
-
- java.util.Observable
-
- org.hpccsystems.ws.client.utils.DataSingleton
-
- org.hpccsystems.ws.client.BaseHPCCWsClient
-
- org.hpccsystems.ws.client.HPCCWsWorkUnitsClient
-
public class HPCCWsWorkUnitsClient extends BaseHPCCWsClient
Facilitates ECL WorkUnit related actions. Supported actions include fetching Workunit info, submiting ECL query, fetching workunit status, publishing workunit, deleting, aborting and more.
-
-
Field Summary
Fields Modifier and Type Field Description static int
defaultMaxWaitTime
ConstantdefaultMaxWaitTime=1000 * 60 * 5
static int
defaultResultLimit
ConstantdefaultResultLimit=100
static int
defaultWaitTime
ConstantdefaultWaitTime=10000
static String
WSWORKUNITSWSDLURI
ConstantWSWORKUNITSWSDLURI="/WsWorkunits"
-
Fields inherited from class org.hpccsystems.ws.client.BaseHPCCWsClient
DEAFULTECLWATCHPORT, DEFAULTECLWATCHTLSPORT, initErrMessage, PROJECT_NAME, stub, targetESPInterfaceVer, targetHPCCBuildVersion, targetsContainerizedHPCC, verbose, wsconn
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HPCCWsWorkUnitsClient(Connection baseConnection)
Instantiates a new HPCC ws work units client.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
abortWU(String wuid)
Request that a given workunit is aborted.QueryResultWrapper
activateQuery(String queryId, String cluster)
Activate query.WorkunitWrapper
compileWUFromECL(WorkunitWrapper wu)
Given an ECL query, this method will create a WU, compile and run it.org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WURunResponse
createAndRunWUFromECL(WorkunitWrapper wu)
Deprecated.use createAndRunWUFromECLWrappedString
createAndRunWUFromECLAndGetResults(WorkunitWrapper wu)
Given an ECL query, this method will create a WU, compile and run it, and return results in String object - Not recommended for large resultsets.String
createAndRunWUFromECLAndGetWUID(WorkunitWrapper wu)
Given an ECL query, this method will create a WU, compile and run it, and return wuid.org.hpccsystems.ws.client.wrappers.gen.wsworkunits.WURunResponseWrapper
createAndRunWUFromECLWrapped(WorkunitWrapper wu)
Given an ECL query, this method will create a WU, compile and run it.WorkunitWrapper
createWorkunit()
Create a new workunit.WorkunitWrapper
createWUFromECL(String archiveOrEcl, int resultLimit, List<ApplicationValueWrapper> appVals, String jobName, boolean compileOnly)
Creates the WU from ECL.WorkunitWrapper
createWUFromECL(WorkunitWrapper wu)
Requests target HPCC System to create and compile WU based on workunit info provided.List<QueryResultWrapper>
deleteQueries(Set<String> querynames, String cluster)
Delete queries.void
deleteWU(String wuid)
Request that a given workunit is deleted.boolean
doesWUContainErrors(String wuid)
This method queries information about a given WU and answers if the WU has reported errors.boolean
doWorkunitAction(String wuid, org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.ECLWUActions action)
Request a given action to be performed upon the given workunit.void
fastWURefresh(WorkunitWrapper wu)
Performs limited refresh of local WU instance based on that WU's state on target HPCC cluster if state of WU has not changed, Graphs, Results,ResultsView, ResultSchemas, SourceFiles, ApplicationValues are not updated.org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResultResponse
fetchRawResults(String wuidorlogicalname, boolean useWuid, int sequence, String cluster, boolean suppressXMLShema, long resultOffset, int resultCount)
Fetches results associated with a given WUID or logical file name.org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResultResponse
fetchRawResults(org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResult parameters)
Fetches results associated with a given WUID or logical file name.String
fetchResults(String wuid, int sequence, String cluster, boolean suppressXMLShema, long resultOffset, int resultCount)
Fetches results associated with a given WUID.String
fetchResultsFromLogicalName(String logicalName, int sequence, String cluster, boolean suppressXMLShema, long resultOffset, int resultCount)
Fetches results associated with a given Logical name.protected void
fullWURefresh(WorkunitWrapper wu)
Performs full refresh of local WU instance based on that WU's state on target HPCC cluster.void
fullWURefresh(WorkunitWrapper wu, boolean includeGraphs, boolean includeResults, boolean includeSourceFiles, boolean includeApplicationValues)
Full WU refresh.static HPCCWsWorkUnitsClient
get(String protocol, String targetHost, String targetPort, String user, String pass)
Gets the.static HPCCWsWorkUnitsClient
get(String protocol, String targetHost, String targetPort, String user, String pass, int timeout)
Gets the.static HPCCWsWorkUnitsClient
get(Connection connection)
Gets the.org.apache.axis2.client.Stub
getDefaultStub()
Gets the default stub.org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUQuerySetDetailsResponse
getQueriesDetail(String querySetName, String clusterName, String filter)
Fetch details about the given query.List<QueryFileWrapper>
getQueryFiles(String queryname, String cluster)
Gets the query files.org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.QuerySet[]
getQuerySets()
Fetch set of available QuerySets.String
getServiceURI()
Gets the service URI.static int
getServiceWSDLPort()
Gets the service WSDL port.static String
getServiceWSDLURL()
Gets the service WSDLURL.static WUState
getStateID(Integer id)
Converts integer representation of WU state, to WUState enumeration.static WUState
getStateID(WorkunitWrapper wu)
Gets the state ID.WULogFileWrapper
getWorkunitFile(String wuid, String filename, WUFileType filetype, String description, String ipaddr, boolean entirefile)
Get Workunit file.String
getWorkunitResult(String wuid, String resultname)
Gets the workunit result.org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResultResponse
getWorkunitResult(org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResult wur)
Return a workunit result.org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResultResponse
getWorkunitResult(org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResult wur, boolean unarchive)
Return a workunit result.List<WorkunitWrapper>
getWorkunits(String jobName, String owner, String ecl, Boolean archived, String wuid, String cluster, WUState state)
Gets the workunits.List<WorkunitWrapper>
getWorkunits(WUQueryWrapper params)
Gets the workunits.WorkunitWrapper
getWUInfo(String wuid)
Get information about a given WorkUnit.WorkunitWrapper
getWUInfo(String wuid, boolean unarchive)
Get information about a given WorkUnit, caller can request to unarchive the WU if necessary to fetch WU info.WorkunitWrapper
getWUInfo(String wuid, boolean includeResults, boolean includeGraphs, boolean includeSourceFiles, boolean includeApplicationValues, Boolean includeDebugValues, Boolean includeExceptions, Boolean includeVariables, Boolean includeXmlSchemas, Boolean includeTimers)
Deprecated.WorkunitWrapper
getWUInfo(String wuid, boolean includeResults, boolean includeGraphs, boolean includeSourceFiles, boolean includeApplicationValues, Boolean includeDebugValues, Boolean includeExceptions, Boolean includeVariables, Boolean includeXmlSchemas, Boolean includeTimers, boolean unarchive)
Deprecated.WorkunitWrapper
getWUInfo(WUInfoRequestWrapper wuinfodetailsparams)
Get information about a given WorkUnit, caller can request to unarchive the WU if necessary to fetch WU info.void
initWsWorkUnitsClientStub(Connection conn)
Initializes the service's underlying soap proxy.boolean
isWorkunitCompiled(String wuid)
Reports if the WU in question is in the compiled state.boolean
isWorkunitCompiled(WorkunitWrapper thewui)
Reports if the WU in question is in the compiled state.boolean
isWorkunitComplete(String wuid)
Replies true if given wuid is in complete state.static boolean
isWorkunitComplete(WorkunitWrapper thewui)
Replies true if given wuid is in complete state.static boolean
isWorkunitComplete(WUState state)
reports if WuState is in the completed set.static boolean
isWorkunitComplete(WUState state, WUActionCode origAction)
reports if a workunit is complete based on wustate, and original action if available.boolean
isWorkunitFailed(String state)
Reports if the string state represents the failed state.boolean
isWorkunitFailed(WorkunitWrapper thewui)
Reports if the WU in question is in the failed state.List<QueryResultWrapper>
listQueries(String queryid, String queryname, String clustername, String querysetname, Integer pageSize, Integer pageStartFrom, Boolean activated, String filename, Boolean descending)
Call WUListQueries servicestatic boolean
looksLikeAWuid(String wuid)
Looks like A wuid.boolean
ping()
Ping.WorkunitWrapper
protectWorkunit(String wuid)
Protect a workunitvoid
publishWU(String wuid)
Publish WU.org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUPublishWorkunitResponse
publishWU(WorkunitWrapper wu)
Deprecated.use publishWUWrappedorg.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUPublishWorkunitResponse
publishWUFromEcl(WorkunitWrapper wu)
Deprecated.use publishWUFromEclWrappedorg.hpccsystems.ws.client.wrappers.gen.wsworkunits.WUPublishWorkunitResponseWrapper
publishWUFromEclWrapped(WorkunitWrapper wu)
Attempts to create, compile and publish a query based on ecl provided via a workunitinfo object.org.hpccsystems.ws.client.wrappers.gen.wsworkunits.WUPublishWorkunitResponseWrapper
publishWUWrapped(WorkunitWrapper wu)
void
resubmitWU(String wuid, boolean restart, boolean clone)
Request that a given workunit is re-submitted.WorkunitWrapper
runWorkunit(String wuid, HashMap<String,String> namedvalues, HashMap<String,String> appvalues, Integer timeout, Boolean cloneWorkunit, String appsource)
Request to run a given workunit.List<QueryResultWrapper>
searchQueries(QuerySetFilterType filtertype, String filtervalue, String querySetName, String clustername)
Fetch list of querysets.void
submitWU(String wuid, String cluster)
Submit WU.void
submitWU(WorkunitWrapper wu)
Given an ECL query, this method will create a WU, compile and run it.void
submitWU(WUSubmitWrapper wusubmitwrapper)
Use this version if targeting HPCC 8+ Provides caller full control over request options via WUSubmitWrapperArrayOfECLExceptionWrapper
syntaxCheckECL(String ecl, String cluster, Integer timeout)
Submit the given ECL code for syntax check upon the given target cluster.boolean
testWUQuery()
This method queries WU information using a bogus WUID.List<WorkunitWrapper>
workUnitUQuery(String wuid, String jobname, String cluster, Boolean archived, WUQueryWrapper.SortBy sortby, WUState state, Date endDate, Date startDate, Long pageStartFrom, Long pageSize, String owner, List<ApplicationValueWrapper> applicationValues)
As of Platform version 6.0.0.List<WorkunitWrapper>
workUnitUQuery(WUQueryWrapper info)
Work unit U query.-
Methods inherited from class org.hpccsystems.ws.client.BaseHPCCWsClient
compatibilityCheck, compatibilityCheck, equals, fastRefresh, fullRefresh, getConnectionURL, getInitError, getServiceVersion, getServiceVersion, getServiceWSDLPort, getServiceWSDLURL, getStubConnectionTO, getTargetESPInterfaceVersion, getTargetHPCCBuildVersion, getVerbose, getWsClientSpanBuilder, getWsClientTracer, handleECLExceptions, handleECLExceptions, handleEspExceptions, handleEspExceptions, handleEspSoapFaults, handleEspSoapFaults, hashCode, hasInitError, initBaseWsClient, injectCurrentSpanTraceParentHeader, injectCurrentSpanTraceParentHeader, isComplete, isTargetHPCCContainerized, loadESPRuntimeInterfaceVer, setActiveConnectionInfo, setClientAuth, setStubConnectionTO, setStubOptions, setUpBuildVersionParser, setUpContainerizedParser, setUpversionParser, setVerbose, verifyStub
-
Methods inherited from class org.hpccsystems.ws.client.utils.DataSingleton
monitor
-
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
-
-
-
Field Detail
-
WSWORKUNITSWSDLURI
public static final String WSWORKUNITSWSDLURI
ConstantWSWORKUNITSWSDLURI="/WsWorkunits"
- See Also:
- Constant Field Values
-
defaultWaitTime
public static final int defaultWaitTime
ConstantdefaultWaitTime=10000
- See Also:
- Constant Field Values
-
defaultResultLimit
public static final int defaultResultLimit
ConstantdefaultResultLimit=100
- See Also:
- Constant Field Values
-
defaultMaxWaitTime
public static final int defaultMaxWaitTime
ConstantdefaultMaxWaitTime=1000 * 60 * 5
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HPCCWsWorkUnitsClient
protected HPCCWsWorkUnitsClient(Connection baseConnection)
Instantiates a new HPCC ws work units client.- Parameters:
baseConnection
- the base connection
-
-
Method Detail
-
getServiceURI
public String getServiceURI()
Gets the service URI.- Specified by:
getServiceURI
in classBaseHPCCWsClient
- Returns:
- the service URI
-
getServiceWSDLURL
public static String getServiceWSDLURL()
Gets the service WSDLURL.- Returns:
- the service WSDLURL
-
getServiceWSDLPort
public static int getServiceWSDLPort()
Gets the service WSDL port.- Returns:
- the service WSDL port
-
get
public static HPCCWsWorkUnitsClient get(Connection connection)
Gets the.- Parameters:
connection
- the connection- Returns:
- the HPCC ws work units client
-
get
public static HPCCWsWorkUnitsClient get(String protocol, String targetHost, String targetPort, String user, String pass)
Gets the.- Parameters:
protocol
- the protocoltargetHost
- the target hosttargetPort
- the target portuser
- the userpass
- the pass- Returns:
- the HPCC ws work units client
-
get
public static HPCCWsWorkUnitsClient get(String protocol, String targetHost, String targetPort, String user, String pass, int timeout)
Gets the.- Parameters:
protocol
- the protocoltargetHost
- the target hosttargetPort
- the target portuser
- the userpass
- the passtimeout
- the timeout- Returns:
- the HPCC ws work units client
-
initWsWorkUnitsClientStub
public void initWsWorkUnitsClientStub(Connection conn)
Initializes the service's underlying soap proxy. Should only be used by constructors- Parameters:
conn
- the conn
-
fastWURefresh
public void fastWURefresh(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper
Performs limited refresh of local WU instance based on that WU's state on target HPCC cluster if state of WU has not changed, Graphs, Results,ResultsView, ResultSchemas, SourceFiles, ApplicationValues are not updated. However if local WU instance's state is found to differ from the server's version, a full refresh is performed.- Parameters:
wu
- the wu- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
fullWURefresh
protected void fullWURefresh(WorkunitWrapper wu) throws Exception
Performs full refresh of local WU instance based on that WU's state on target HPCC cluster. Full refresh includes Graphs, Results,ResultsView, ResultSchemas, SourceFiles, ApplicationValues.- Parameters:
wu
- the wu- Throws:
Exception
- the exception
-
fullWURefresh
public void fullWURefresh(WorkunitWrapper wu, boolean includeGraphs, boolean includeResults, boolean includeSourceFiles, boolean includeApplicationValues) throws Exception
Full WU refresh.- Parameters:
wu
- the wuincludeGraphs
- the include graphsincludeResults
- the include resultsincludeSourceFiles
- the include source filesincludeApplicationValues
- the include application values- Throws:
Exception
- the exception
-
isWorkunitCompiled
public boolean isWorkunitCompiled(String wuid) throws Exception, ArrayOfEspExceptionWrapper
Reports if the WU in question is in the compiled state. Makes a call to the target Web Service to extract information about the WU- Parameters:
wuid
- the wuid- Returns:
- true if state is compiled
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
isWorkunitCompiled
public boolean isWorkunitCompiled(WorkunitWrapper thewui)
Reports if the WU in question is in the compiled state. Does not make call to the target Web Service, extracts information from the WU object- Parameters:
thewui
- the thewui- Returns:
- true if state is compiled
-
isWorkunitFailed
public boolean isWorkunitFailed(WorkunitWrapper thewui)
Reports if the WU in question is in the failed state. Does not make call to the target Web Service, extracts information from the WU object- Parameters:
thewui
- the thewui- Returns:
- true if state is failed
-
isWorkunitFailed
public boolean isWorkunitFailed(String state)
Reports if the string state represents the failed state.- Parameters:
state
- the state- Returns:
- true if state is failed
-
isWorkunitComplete
public boolean isWorkunitComplete(String wuid) throws Exception, ArrayOfEspExceptionWrapper
Replies true if given wuid is in complete state. This method makes call to WS, it is preferable to use WU object version- Parameters:
wuid
- the wuid- Returns:
- true, if is workunit complete
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
isWorkunitComplete
public static boolean isWorkunitComplete(WorkunitWrapper thewui)
Replies true if given wuid is in complete state. This method does not make a call to WS, and it is preferable over the version that calls WS.- Parameters:
thewui
- the thewui- Returns:
- true if wu is in one of the complete states
-
isWorkunitComplete
public static boolean isWorkunitComplete(WUState state, WUActionCode origAction)
reports if a workunit is complete based on wustate, and original action if available.- Parameters:
state
- the stateorigAction
- the orig action- Returns:
- true if wu is in completed state
-
isWorkunitComplete
public static boolean isWorkunitComplete(WUState state)
reports if WuState is in the completed set.- Parameters:
state
- the state- Returns:
- true if state is in completed set
-
getStateID
public static WUState getStateID(WorkunitWrapper wu)
Gets the state ID.- Parameters:
wu
- the workunit- Returns:
- the state of the workunit
-
getStateID
public static WUState getStateID(Integer id)
Converts integer representation of WU state, to WUState enumeration.- Parameters:
id
- the id- Returns:
- WU state enumeration
-
publishWUFromEcl
public org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUPublishWorkunitResponse publishWUFromEcl(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper
Deprecated.use publishWUFromEclWrappedAttempts to create, compile and publish a query based on ecl provided via a workunitinfo object.- Parameters:
wu
- - Workunitinfo object containing all pertinent information for WU request- Returns:
- the WU publish workunit response
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
publishWUFromEclWrapped
public org.hpccsystems.ws.client.wrappers.gen.wsworkunits.WUPublishWorkunitResponseWrapper publishWUFromEclWrapped(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper
Attempts to create, compile and publish a query based on ecl provided via a workunitinfo object.- Parameters:
wu
- - Workunitinfo object containing all pertinent information for WU request- Returns:
- the WU publish workunit response
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
publishWU
public org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUPublishWorkunitResponse publishWU(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper
Deprecated.use publishWUWrappedAttempts to publish a query based on a given Workunit.- Parameters:
wu
- the wu- Returns:
- the WU publish workunit response
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
publishWUWrapped
public org.hpccsystems.ws.client.wrappers.gen.wsworkunits.WUPublishWorkunitResponseWrapper publishWUWrapped(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper
- Throws:
Exception
ArrayOfEspExceptionWrapper
-
publishWU
public void publishWU(String wuid) throws Exception
Publish WU.- Parameters:
wuid
- the wuid- Throws:
Exception
- the exception
-
getWUInfo
public WorkunitWrapper getWUInfo(WUInfoRequestWrapper wuinfodetailsparams) throws Exception, ArrayOfEspExceptionWrapper
Get information about a given WorkUnit, caller can request to unarchive the WU if necessary to fetch WU info.- Parameters:
wuinfodetailsparams
- - workunit info request wrapper- Returns:
- - WorkunitWrapper object with information pertaining to the WU
- Throws:
Exception
- aException
object. - Caller must handle exceptionsArrayOfEspExceptionWrapper
- aArrayOfEspExceptionWrapper
object. the array of esp exception wrapper
-
getWUInfo
public WorkunitWrapper getWUInfo(String wuid) throws Exception, ArrayOfEspExceptionWrapper
Get information about a given WorkUnit. Workunit must not be archived.- Parameters:
wuid
- - ID of target workunit- Returns:
- - ECLWorkunit object with information pertaining to the WU
- Throws:
Exception
- - Caller must handle exceptionsArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
getWUInfo
public WorkunitWrapper getWUInfo(String wuid, boolean unarchive) throws Exception, ArrayOfEspExceptionWrapper
Get information about a given WorkUnit, caller can request to unarchive the WU if necessary to fetch WU info.- Parameters:
wuid
- - ID of target workunitunarchive
- - unarchive archived workunit- Returns:
- - ECLWorkunit object with information pertaining to the WU
- Throws:
Exception
- - Caller must handle exceptionsArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
getWUInfo
@Deprecated public WorkunitWrapper getWUInfo(String wuid, boolean includeResults, boolean includeGraphs, boolean includeSourceFiles, boolean includeApplicationValues, Boolean includeDebugValues, Boolean includeExceptions, Boolean includeVariables, Boolean includeXmlSchemas, Boolean includeTimers) throws Exception, ArrayOfEspExceptionWrapper
Deprecated.Get information about a given WorkUnit, Workunit must not be archived. Caller can choose which WU information portion to fetch Deprecated; use getWUInfo(WSInfoRequestWrapper,unarchive)- Parameters:
wuid
- the wuidincludeResults
- the include resultsincludeGraphs
- the include graphsincludeSourceFiles
- the include source filesincludeApplicationValues
- the include application valuesincludeDebugValues
- the include debug valuesincludeExceptions
- the include exceptionsincludeVariables
- the include variablesincludeXmlSchemas
- the include xml schemasincludeTimers
- the include timers- Returns:
- the WU info
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
getWUInfo
@Deprecated public WorkunitWrapper getWUInfo(String wuid, boolean includeResults, boolean includeGraphs, boolean includeSourceFiles, boolean includeApplicationValues, Boolean includeDebugValues, Boolean includeExceptions, Boolean includeVariables, Boolean includeXmlSchemas, Boolean includeTimers, boolean unarchive) throws Exception, ArrayOfEspExceptionWrapper
Deprecated.Get information about a given WorkUnit, caller can request to unarchive Caller can choose which WU information portion to fetch. Deprecated; use getWUInfo(WSInfoRequestWrapper,unarchive)- Parameters:
wuid
- the wuidincludeResults
- the include resultsincludeGraphs
- the include graphsincludeSourceFiles
- the include source filesincludeApplicationValues
- the include application valuesincludeDebugValues
- the include debug valuesincludeExceptions
- the include exceptionsincludeVariables
- the include variablesincludeXmlSchemas
- the include xml schemasincludeTimers
- the include timersunarchive
- the unarchive- Returns:
- the WU info
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
testWUQuery
public boolean testWUQuery() throws Exception
This method queries WU information using a bogus WUID. Used as a mechanism for testing connectivity with HPCC ESP. Temporarily increases timeout value to 3 seconds;- Returns:
- - True if able to reply is received within timout value of 3 secs, false otherwise
- Throws:
Exception
- - Caller must handle exceptions
-
workUnitUQuery
public List<WorkunitWrapper> workUnitUQuery(String wuid, String jobname, String cluster, Boolean archived, WUQueryWrapper.SortBy sortby, WUState state, Date endDate, Date startDate, Long pageStartFrom, Long pageSize, String owner, List<ApplicationValueWrapper> applicationValues) throws Exception, ArrayOfEspExceptionWrapper
As of Platform version 6.0.0. Now maps to new prototype, excluding the pageSize and startPageFrom parameters. Executes a WUQuery, based on parameters provided. If a custom WUQuery is desired, the caller can make a direct call to WUQuery based on the soapproxy for this client. If using applicationValues objects for filtering, a user must pair the Application with either an attribute name, or attribute value.- Parameters:
wuid
- the wuidjobname
- the jobnamecluster
- the clusterarchived
- the archivedsortby
- the sortbystate
- the stateendDate
- the end datestartDate
- the start datepageStartFrom
- the page start frompageSize
- the page sizeowner
- the ownerapplicationValues
- the application values- Returns:
- the list
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
workUnitUQuery
public List<WorkunitWrapper> workUnitUQuery(WUQueryWrapper info) throws Exception, ArrayOfEspExceptionWrapper
Work unit U query.- Parameters:
info
- the info- Returns:
- the list
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
doesWUContainErrors
public boolean doesWUContainErrors(String wuid) throws Exception, ArrayOfEspExceptionWrapper
This method queries information about a given WU and answers if the WU has reported errors.- Parameters:
wuid
- - The ID of the target workunit- Returns:
- - true if errors present
- Throws:
Exception
- - Caller must handle exceptionsArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
createWUFromECL
public WorkunitWrapper createWUFromECL(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper
Requests target HPCC System to create and compile WU based on workunit info provided.- Parameters:
wu
- - The workunit information used to create WU on HPCC cluster- Returns:
- the workunit wrapper
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
createWUFromECL
public WorkunitWrapper createWUFromECL(String archiveOrEcl, int resultLimit, List<ApplicationValueWrapper> appVals, String jobName, boolean compileOnly) throws Exception, ArrayOfEspExceptionWrapper
Creates the WU from ECL.- Parameters:
archiveOrEcl
- the archive or eclresultLimit
- the result limitappVals
- the app valsjobName
- the job namecompileOnly
- the compile only- Returns:
- the workunit wrapper
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
getWorkunits
public List<WorkunitWrapper> getWorkunits(String jobName, String owner, String ecl, Boolean archived, String wuid, String cluster, WUState state) throws Exception, ArrayOfEspExceptionWrapper
Gets the workunits.- Parameters:
jobName
- the pattern to find in the jobname (wildcard * matches multiple jobnames)owner
- - hpcc owner of the jobecl
- - text in the eclarchived
- - if true, search archived workunits. If false or null, search unarchived workunits.wuid
- - wuid to search forcluster
- - cluster to search workunits forstate
- - WUState of workunits to find- Returns:
- an List <WorkunitInfo> of matching workunits
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
getWorkunits
public List<WorkunitWrapper> getWorkunits(WUQueryWrapper params) throws Exception, ArrayOfEspExceptionWrapper
Gets the workunits.- Parameters:
params
- the params- Returns:
- the workunits
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
compileWUFromECL
public WorkunitWrapper compileWUFromECL(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
Given an ECL query, this method will create a WU, compile and run it.- Parameters:
wu
- the wu- Returns:
- - Object with WU information
- Throws:
Exception
- - Caller must handle exceptionsArrayOfEspExceptionWrapper
- the array of esp exception wrapperArrayOfECLExceptionWrapper
- the array of ECL exception wrapper
-
submitWU
public void submitWU(WUSubmitWrapper wusubmitwrapper) throws Exception
Use this version if targeting HPCC 8+ Provides caller full control over request options via WUSubmitWrapper- Parameters:
wusubmitwrapper
- aWUSubmitWrapper
object.- Throws:
Exception
- aException
object.
-
submitWU
public void submitWU(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper
Given an ECL query, this method will create a WU, compile and run it.- Parameters:
wu
- the wu- Throws:
Exception
- - Caller must handle exceptionsArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
submitWU
public void submitWU(String wuid, String cluster) throws Exception, ArrayOfEspExceptionWrapper
Submit WU.- Parameters:
wuid
- the wuidcluster
- the cluster- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
createAndRunWUFromECL
public org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WURunResponse createAndRunWUFromECL(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
Deprecated.use createAndRunWUFromECLWrappedGiven an ECL query, this method will create a WU, compile and run it.- Parameters:
wu
- the wu- Returns:
- - Object with WU information
- Throws:
Exception
- - Caller must handle exceptionsArrayOfEspExceptionWrapper
- the array of esp exception wrapperArrayOfECLExceptionWrapper
- the array of ECL exception wrapper
-
createAndRunWUFromECLWrapped
public org.hpccsystems.ws.client.wrappers.gen.wsworkunits.WURunResponseWrapper createAndRunWUFromECLWrapped(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
Given an ECL query, this method will create a WU, compile and run it.- Parameters:
wu
- the wu- Returns:
- - WURunResponseWrapper Object with WU information
- Throws:
Exception
- - Caller must handle exceptionsArrayOfEspExceptionWrapper
- the array of esp exception wrapperArrayOfECLExceptionWrapper
- the array of ECL exception wrapper
-
createAndRunWUFromECLAndGetResults
public String createAndRunWUFromECLAndGetResults(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
Given an ECL query, this method will create a WU, compile and run it, and return results in String object - Not recommended for large resultsets.- Parameters:
wu
- the wu- Returns:
- - Object with WU information
- Throws:
Exception
- - Caller must handle exceptionsArrayOfEspExceptionWrapper
- the array of esp exception wrapperArrayOfECLExceptionWrapper
- the array of ECL exception wrapper
-
createAndRunWUFromECLAndGetWUID
public String createAndRunWUFromECLAndGetWUID(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
Given an ECL query, this method will create a WU, compile and run it, and return wuid. Workuinit state, and results can be queried based on WUID- Parameters:
wu
- the wu- Returns:
- - Workunit ID
- Throws:
Exception
- - Caller must handle exceptionsArrayOfEspExceptionWrapper
- the array of esp exception wrapperArrayOfECLExceptionWrapper
- the array of ECL exception wrapper
-
fetchResultsFromLogicalName
public String fetchResultsFromLogicalName(String logicalName, int sequence, String cluster, boolean suppressXMLShema, long resultOffset, int resultCount) throws Exception, ArrayOfEspExceptionWrapper
Fetches results associated with a given Logical name.- Parameters:
logicalName
- the logical namesequence
- - Zero based index result sequence (Each result set may contain multiple results)cluster
- - The target clustersuppressXMLShema
- - Results are accompanied by a schema, do you want to suppress it?resultOffset
- - Request results starting at record offsetresultCount
- - Total result record count- Returns:
- - Results in xml string
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
fetchResults
public String fetchResults(String wuid, int sequence, String cluster, boolean suppressXMLShema, long resultOffset, int resultCount) throws Exception, ArrayOfEspExceptionWrapper
Fetches results associated with a given WUID. If the given WUID has been archived, results might not be available using this function Use fetchResultsFromLogicalName instead- Parameters:
wuid
- - The target WUID to fetch results fromsequence
- - Zero based index result sequence (Each result set may contain multiple results)cluster
- - The target clustersuppressXMLShema
- - Results are accompanied by a schema, do you want to suppress it?resultOffset
- - Request results starting at record offsetresultCount
- - Total result record count re- Returns:
- - Results in xml string
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
fetchRawResults
public org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResultResponse fetchRawResults(String wuidorlogicalname, boolean useWuid, int sequence, String cluster, boolean suppressXMLShema, long resultOffset, int resultCount) throws Exception
Fetches results associated with a given WUID or logical file name. If the given WUID has been archived, results might not be available -use fetchResultsFromLogicalName instead- Parameters:
wuidorlogicalname
- the wuidorlogicalnameuseWuid
- the use wuidsequence
- the sequencecluster
- the clustersuppressXMLShema
- the suppress XML shemaresultOffset
- the result offsetresultCount
- the result count- Returns:
- the WU result response
- Throws:
Exception
- the exception
-
looksLikeAWuid
public static boolean looksLikeAWuid(String wuid)
Looks like A wuid.- Parameters:
wuid
- does this string follow the known WU format- Returns:
- true if it wuid appears to be a workunit, false otherwise logic borrowed from platform code: workunit.cpp bool looksLikeAWuid(const char * wuid) { if (!wuid) return false; if (wuid[0] != 'W') return false; if (!isdigit(wuid[1]) || !isdigit(wuid[2]) || !isdigit(wuid[3]) || !isdigit(wuid[4])) return false; if (!isdigit(wuid[5]) || !isdigit(wuid[6]) || !isdigit(wuid[7]) || !isdigit(wuid[8])) return false; return (wuid[9]=='-'); }
-
fetchRawResults
public org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResultResponse fetchRawResults(org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResult parameters) throws Exception
Fetches results associated with a given WUID or logical file name. All parameters and options must be pre-set in the "parameters" input param- Parameters:
parameters
- the parameters- Returns:
- the WU result response
- Throws:
Exception
- the exception
-
syntaxCheckECL
public ArrayOfECLExceptionWrapper syntaxCheckECL(String ecl, String cluster, Integer timeout) throws Exception
Submit the given ECL code for syntax check upon the given target cluster.- Parameters:
ecl
- - The ECL to syntax checkcluster
- - The HPCC target cluster on which to syntax checktimeout
- - Maximum time for this check- Returns:
- the array of ECL exception wrapper
- Throws:
Exception
- the exception
-
getQueriesDetail
public org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUQuerySetDetailsResponse getQueriesDetail(String querySetName, String clusterName, String filter) throws Exception
Fetch details about the given query.- Parameters:
querySetName
- the query set nameclusterName
- the cluster namefilter
- the filter- Returns:
- the queries detail
- Throws:
Exception
- the exception
-
abortWU
public void abortWU(String wuid) throws Exception
Request that a given workunit is aborted.- Parameters:
wuid
- the wuid- Throws:
Exception
- the exception
-
deleteWU
public void deleteWU(String wuid) throws Exception, ArrayOfEspExceptionWrapper
Request that a given workunit is deleted.- Parameters:
wuid
- the wuid- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
resubmitWU
public void resubmitWU(String wuid, boolean restart, boolean clone) throws Exception
Request that a given workunit is re-submitted. Caller can choose to clone the wu, and to restart the WU's workflow.- Parameters:
wuid
- the wuidrestart
- the restartclone
- the clone- Throws:
Exception
- the exception
-
getQuerySets
public org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.QuerySet[] getQuerySets() throws Exception
Fetch set of available QuerySets.- Returns:
- the query sets
- Throws:
Exception
- the exception
-
getWorkunitResult
public org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResultResponse getWorkunitResult(org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResult wur) throws Exception, ArrayOfEspExceptionWrapper
Return a workunit result.- Parameters:
wur
- the wur- Returns:
- WUResultResponse
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
getWorkunitResult
public String getWorkunitResult(String wuid, String resultname) throws Exception, ArrayOfEspExceptionWrapper
Gets the workunit result.- Parameters:
wuid
- - wuid to return result forresultname
- - resultname to return result for- Returns:
- content of result
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
getWorkunitResult
public org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResultResponse getWorkunitResult(org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.WUResult wur, boolean unarchive) throws Exception, ArrayOfEspExceptionWrapper
Return a workunit result.- Parameters:
wur
- the wurunarchive
- the unarchive- Returns:
- WUResultResponse
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
doWorkunitAction
public boolean doWorkunitAction(String wuid, org.hpccsystems.ws.client.gen.axis2.wsworkunits.latest.ECLWUActions action) throws RemoteException, Exception, ArrayOfEspExceptionWrapper
Request a given action to be performed upon the given workunit.- Parameters:
wuid
- - The target workunitaction
- - The action to be requested see ECLWUActions- Returns:
- true, if successful
- Throws:
RemoteException
- the remote exceptionRemoteException
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapperException
-
createWorkunit
public WorkunitWrapper createWorkunit() throws Exception
Create a new workunit. Does not update/run/submit- Returns:
- new WorkunitInfo containing created wuid
- Throws:
Exception
- the exception
-
protectWorkunit
public WorkunitWrapper protectWorkunit(String wuid) throws Exception
Protect a workunit- Parameters:
wuid
- - wuid to protect- Returns:
- WorkunitInfo with updated status
- Throws:
Exception
- the exception
-
getWorkunitFile
public WULogFileWrapper getWorkunitFile(String wuid, String filename, WUFileType filetype, String description, String ipaddr, boolean entirefile) throws Exception
Get Workunit file.- Parameters:
wuid
- the wuidfilename
- the filenamefiletype
- the filetypedescription
- the descriptionipaddr
- the ipaddrentirefile
- the entirefile- Returns:
- the workunit file
- Throws:
Exception
- the exception
-
runWorkunit
public WorkunitWrapper runWorkunit(String wuid, HashMap<String,String> namedvalues, HashMap<String,String> appvalues, Integer timeout, Boolean cloneWorkunit, String appsource) throws Exception
Request to run a given workunit. Caller can set various WU options.- Parameters:
wuid
- - wuid to call WURun fornamedvalues
- - override stored variables with this set of stored variablesappvalues
- - override application values with this set of app valuestimeout
- - if provided, timeout before returningcloneWorkunit
- - if true, clone workunit before rerunningappsource
- - application source for app values- Returns:
- WorkunitInfo with wuid of run, run status and result
- Throws:
Exception
- the exception
-
searchQueries
public List<QueryResultWrapper> searchQueries(QuerySetFilterType filtertype, String filtervalue, String querySetName, String clustername) throws Exception
Fetch list of querysets.- Parameters:
filtertype
- the filtertypefiltervalue
- the filtervaluequerySetName
- the query set nameclustername
- the clustername- Returns:
- the list
- Throws:
Exception
- the exception
-
listQueries
public List<QueryResultWrapper> listQueries(String queryid, String queryname, String clustername, String querysetname, Integer pageSize, Integer pageStartFrom, Boolean activated, String filename, Boolean descending) throws Exception
Call WUListQueries service- Parameters:
queryid
- - unique ID of the queryqueryname
- - name/alias of the queryclustername
- - name of the cluster the query is onquerysetname
- - name of the queryset the cluster is part ofpageSize
- - number of results to return (if null, 100 results are returned)pageStartFrom
- - which result to start returning on (if null, results start with 1)activated
- - whether to return activated queriesfilename
- - return queries using this filenamedescending
- the descending- Returns:
- List of QueryResults populated from QuerySetQuery list
- Throws:
Exception
- the exception
-
getQueryFiles
public List<QueryFileWrapper> getQueryFiles(String queryname, String cluster) throws Exception
Gets the query files.- Parameters:
queryname
- - query to retrieve files forcluster
- - the cluster to search for said query- Returns:
- - List <QueryFileWrapper> of matching queries
- Throws:
Exception
- the exception
-
activateQuery
public QueryResultWrapper activateQuery(String queryId, String cluster) throws Exception
Activate query.- Parameters:
queryId
- - unique id of query to activatecluster
- - cluster to activate upon- Returns:
- the query result wrapper
- Throws:
Exception
- the exception
-
deleteQueries
public List<QueryResultWrapper> deleteQueries(Set<String> querynames, String cluster) throws Exception
Delete queries.- Parameters:
querynames
- - queries to deletecluster
- - cluster to delete from- Returns:
- - List <QueryResult> result of actions
- Throws:
Exception
- the exception
-
ping
public boolean ping() throws Exception
Ping.- Returns:
- true, if successful
- Throws:
Exception
- the exception
-
getDefaultStub
public org.apache.axis2.client.Stub getDefaultStub() throws org.apache.axis2.AxisFault
Gets the default stub.- Specified by:
getDefaultStub
in classBaseHPCCWsClient
- Returns:
- the default stub
- Throws:
org.apache.axis2.AxisFault
- the axis fault
-
-