Package org.hpccsystems.ws.client
Class HPCCWsClient
- java.lang.Object
-
- java.util.Observable
-
- org.hpccsystems.ws.client.utils.DataSingleton
-
- org.hpccsystems.ws.client.HPCCWsClient
-
public class HPCCWsClient extends DataSingleton
Convenient interface which exposes most common HPCC-centric activities. More actions, and more flexibility can be added in the future. If neither the HPCCWsClient nor the Service specific client classes expose a desired action, it can be executed by obtaining the SoapProxy from the appropriate client, an executing the web service method request directly.
-
-
Field Summary
Fields Modifier and Type Field Description static DataSingletonCollection
All
ConstantAll
protected Connection
connection
protected Object
connectionLock
static String
defaultTargetWsECLWatchHost
ConstantdefaultTargetWsECLWatchHost="localhost"
static String
defaultTWsECLWatchPort
ConstantdefaultTWsECLWatchPort="8010"
static String
defaultTWsECLWatchSSLPort
ConstantdefaultTWsECLWatchSSLPort="18010"
static DataSingletonCollection
SubClients
ConstantSubClients
protected boolean
verbosemode
-
Constructor Summary
Constructors Modifier Constructor Description protected
HPCCWsClient()
Instantiates HPCCWsClient, attempts to establish all communications on http://localhost:8010.protected
HPCCWsClient(String protocol)
Instantiates HPCCWsClient, attempts to establish all communications on <protocol>://localhost:<defaultportonprotocol>.protected
HPCCWsClient(String targetWsECLWatchAddress, String targetWsECLWatchPort)
Instantiates HPCCWsClient, communicates with HPCC on HTTP protocol.protected
HPCCWsClient(String protocol, String targetWsECLWatchAddress, String targetWsECLWatchPort)
Instantiates HPCCWsClient, communicates with HPCC over the given protocol.HPCCWsClient(String targetWsECLWatchAddress, String targetWsECLWatchPort, String username, String password)
Instantiates HPCCWsClient, communicates with HPCC over http, and provides user/pass credentials.protected
HPCCWsClient(String protocol, String targetWsECLWatchAddress, String targetWsECLWatchPort, String username, String password)
Instantiates HPCCWsClient, communicates with HPCC over given protocol, and provides user/pass credentials.protected
HPCCWsClient(Connection conn)
Instantiates HPCCWsClient, uses contents of connection object to communicate with target HPCC System.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object aThat)
protected void
fastRefresh()
protected void
fullRefresh()
static HPCCWsClient
get(String protocol, String targetWsECLWatchAddress, int targetWsECLWatchPort, String user, String password)
Fetch pre-existing HPCCWsClient instance from collection, if pre-existing instance with exact connection option doesn't exist, create new instance.String[]
getAvailableClusterGroups()
Returns all the available cluster groups (hthor, thor, roxie, etc.) on the target HPCC System.String[]
getAvailableClusterNames(String clusterGroupType)
Returns all the available target cluster names (mythor, myroxie, etc) given a cluster group type/name (thor, roxie, etc.)List<String>
getAvailableTargetClusterNames()
Gets the available target cluster names.protected Connection
getConnection()
get this HPCCWsClient's connection object.HPCCFileSprayClient
getFileSprayClient()
Gets the file spray client.String
getHost()
Get this HPCCWsClient's connection host address.String
getHPCCWsCodeSignClientVer()
Reports the version of the original WSDL used to create the HPCCWsCodeSignClient logic.String
getHPCCWsPackageProcessClientVer()
Reports the version of the original WSDL used to create the HPCCWsPackageProcessClient logic.HPCCWsResourcesClient
getHPCCWsResourcesClient()
Gets the HPCCWsResourcesClient client.HPCCWsResourcesClient
getHPCCWsResourcesClient(String wsresourcesport)
Gets the HPCCWsResourcesClient client.String
getHPCCWsResourcesClientVer()
Reports the version of the original WSDL used to create the HPCCWsCodeSignClient logic.static HPCCWsClient
getNoCreate(String protocol, String targetWsECLWatchAddress, int targetWsECLWatchPort, String user, String password)
Fetch pre-existing HPCCWsClient instance from collection, if pre-existing instance with exact connection option doesn't exist return null.String
getPassword()
Get the password used to by HPCCWsClient to authenticate against target ECLWatch.int
getPortInt()
Get this HPCCWsClient's connection port.String
getProtocol()
Get this HPCCWsClient's connection protocol (http|https).List<org.hpccsystems.ws.client.wrappers.gen.wstopology.TpGroupWrapper>
getTopologyGroups(HPCCWsTopologyClient.TopologyGroupQueryKind kind)
Queries WsTopology for HPCC Topology GroupsString
getUserName()
Get the user name used to by HPCCWsClient to authenticate against target ECLWatch.HPCCWsAttributesClient
getWsAttributesClient()
Gets the ws attributes client.HPCCWsAttributesClient
getWsAttributesClient(String wsAttributesPort)
provides WsAttributesClient for direct method execution.String
getWsAttributesClientVer()
Reports the version of the original WSDL used to create the HPCCWsAttributesClient logic.HPCCWsCodeSignClient
getWsCodeSignClient()
Gets the WsCodeSign client.HPCCWsCodeSignClient
getWsCodeSignClient(String codeSignPort)
Gets the WsCodeSign client.HPCCWsDFUClient
getWsDFUClient()
Gets the ws DFU client.String
getwsDFUClientClientVer()
Reports the version of the original WSDL used to create the HPCCWsSMCClient logic.HPCCWsDFUXRefClient
getWsDFUXRefClient()
Gets the WsDFUXRef client.String
getwsDFUXRefClientClientVer()
Reports the version of the original WSDL used to create the HPCCWsSMCClient logic.HPCCWsFileIOClient
getWsFileIOClient()
Gets the ws file IO client.String
getWsFileIOClientVer()
Reports the version of the original WSDL used to create the HPCCWsFileIOClient logic.HPCCWsPackageProcessClient
getWsPackageProcessClient()
Gets the ws package process client.HPCCWsSMCClient
getWsSMCClient()
Gets the ws SMC client.String
getWsSMCClientClientVer()
Reports the version of the original WSDL used to create the HPCCWsSMCClient logic.HPCCWsSQLClient
getWsSQLClient()
Gets the ws SQL client.HPCCWsSQLClient
getWsSQLClient(String wsSQLPort)
Gets the ws SQL client.String
getWsSQLClientVer()
Reports the version of the original WSDL used to create the HPCCWsAttributesClient logic.HPCCWsTopologyClient
getWsTopologyClient()
Gets the ws topology client.String
getWsTopologyClientVer()
Reports the version of the original WSDL used to create the HPCCWsTopologyClient logic.HPCCWsWorkUnitsClient
getWsWorkunitsClient()
Gets the ws workunits client.String
getWsWorkunitsClientVer()
Reports the version of the original WSDL used to create the HPCCWsWorkUnitsClient logic.boolean
handleSprayResponse(org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper progressResponseWrapper)
Handle spray response.int
hashCode()
boolean
httpUploadFileToFirstHPCCLandingZone(String localFileName)
NOT the preferred mechanism for uploading files to HPCC landingzone.protected boolean
isComplete()
boolean
isContainerized()
Queries ECLWatch for containerized flag.boolean
isVerbosemode()
Checks if is verbosemode.boolean
pingServer()
Test availability of target HPCC ESP service.static void
remove(HPCCWsClient p)
Remove an instance of HPCCWsClient from pool, and therefore from potential re-use.void
setVerbosemode(boolean verbosemode)
sets the client verbose mode.boolean
sprayCustomCSVHPCCFile(String fileName, String targetFileLabel, String targetCluster, String escapedEscapeSequence, String escapedFieldDelim, String escapedQuote, String escapedRecTerminator, boolean overwritesprayedfile, HPCCFileSprayClient.SprayVariableFormat format)
Spray a variable/delimited data file onto a target cluster on the target HPCC System.boolean
sprayDefaultCSVHPCCFile(String fileName, String targetFileLabel, String targetCluster, boolean overwritesprayedfile)
Spray a CSV delimited data file (default CSV options) onto a target cluster on the target HPCC System.boolean
sprayFlatHPCCFile(String fileName, String targetFileLabel, int recordSize, String targetCluster, boolean overwritesprayedfile)
Spray a fixed record length data file onto a target cluster on the target HPCC System.boolean
sprayVariableHPCCFile(String fileName, String targetFileLabel, String targetCluster, DelimitedDataOptions options, boolean overwritesprayedfile, HPCCFileSprayClient.SprayVariableFormat format)
Spray a variable/delimited data file onto a target cluster on the target HPCC System.String
submitECLandGetResults(WorkunitWrapper wu)
Submits the given ECL to compile/execute on the targetclust, and returns results.List<List<Object>>
submitECLandGetResultsList(WorkunitWrapper wu)
Submits the given ECL to compile/execute on the targetclust, and returns parsed results.String
submitECLandGetWUID(WorkunitWrapper wu)
Submits the given ECL to compile/execute on the targetclust and returns WUID to track the query.void
update(String protocol, String targetWsECLWatchAddress, String targetWsECLWatchPort, String username, String password)
Caller can edit connection properties for this HPCCWsClient, then get appropriate subclient.void
updateConnection(Connection conn)
Caller can edit connection properties for this HPCCWsClient by providing connection object, then get appropriate subclient.boolean
uploadFileToHPCC(String localFileName, String targetFilename, String machineLoginUser, String password)
Preferred mechanism for uploading files to HPCC landingzone.-
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
-
All
public static DataSingletonCollection All
ConstantAll
-
SubClients
public static DataSingletonCollection SubClients
ConstantSubClients
-
defaultTargetWsECLWatchHost
public static final String defaultTargetWsECLWatchHost
ConstantdefaultTargetWsECLWatchHost="localhost"
- See Also:
- Constant Field Values
-
defaultTWsECLWatchPort
public static final String defaultTWsECLWatchPort
ConstantdefaultTWsECLWatchPort="8010"
- See Also:
- Constant Field Values
-
defaultTWsECLWatchSSLPort
public static final String defaultTWsECLWatchSSLPort
ConstantdefaultTWsECLWatchSSLPort="18010"
- See Also:
- Constant Field Values
-
verbosemode
protected boolean verbosemode
-
connection
protected Connection connection
-
connectionLock
protected Object connectionLock
-
-
Constructor Detail
-
HPCCWsClient
protected HPCCWsClient()
Instantiates HPCCWsClient, attempts to establish all communications on http://localhost:8010.
-
HPCCWsClient
protected HPCCWsClient(String protocol)
Instantiates HPCCWsClient, attempts to establish all communications on <protocol>://localhost:<defaultportonprotocol>.- Parameters:
protocol
- the protocol
-
HPCCWsClient
protected HPCCWsClient(String targetWsECLWatchAddress, String targetWsECLWatchPort)
Instantiates HPCCWsClient, communicates with HPCC on HTTP protocol.- Parameters:
targetWsECLWatchAddress
- - The address of the WsECLWatch ESP on the Target HPCC System e.g. 192.168.1.100targetWsECLWatchPort
- - The port on which WsECLWatch ESP is listening on the Target HPCC System usually 8010
-
HPCCWsClient
protected HPCCWsClient(String protocol, String targetWsECLWatchAddress, String targetWsECLWatchPort)
Instantiates HPCCWsClient, communicates with HPCC over the given protocol.- Parameters:
protocol
- the protocoltargetWsECLWatchAddress
- - The address of the WsECLWatch ESP on the Target HPCC System e.g. 192.168.1.100targetWsECLWatchPort
- - The port on which WsECLWatch ESP is listening on the Target HPCC System usually 8010
-
HPCCWsClient
public HPCCWsClient(String targetWsECLWatchAddress, String targetWsECLWatchPort, String username, String password)
Instantiates HPCCWsClient, communicates with HPCC over http, and provides user/pass credentials.- Parameters:
targetWsECLWatchAddress
- - The address of the WsECLWatch ESP on the Target HPCC System e.g. 192.168.1.100targetWsECLWatchPort
- - The port on which WsECLWatch ESP is listening on the Target HPCC System usually 8010username
- - ESP Usernamepassword
- - ESP Password
-
HPCCWsClient
protected HPCCWsClient(String protocol, String targetWsECLWatchAddress, String targetWsECLWatchPort, String username, String password)
Instantiates HPCCWsClient, communicates with HPCC over given protocol, and provides user/pass credentials.- Parameters:
protocol
- - http | httpstargetWsECLWatchAddress
- - The address of the WsECLWatch ESP on the Target HPCC System e.g. 192.168.1.100targetWsECLWatchPort
- - The port on which WsECLWatch ESP is listening on the Target HPCC System usually 8010username
- - ESP Usernamepassword
- - ESP Password
-
HPCCWsClient
protected HPCCWsClient(Connection conn)
Instantiates HPCCWsClient, uses contents of connection object to communicate with target HPCC System.- Parameters:
conn
- the conn
-
-
Method Detail
-
get
public static HPCCWsClient get(String protocol, String targetWsECLWatchAddress, int targetWsECLWatchPort, String user, String password)
Fetch pre-existing HPCCWsClient instance from collection, if pre-existing instance with exact connection option doesn't exist, create new instance.- Parameters:
protocol
- the protocoltargetWsECLWatchAddress
- the target ws ECL watch addresstargetWsECLWatchPort
- the target ws ECL watch portuser
- the userpassword
- the password- Returns:
- the HPCC ws client
-
getNoCreate
public static HPCCWsClient getNoCreate(String protocol, String targetWsECLWatchAddress, int targetWsECLWatchPort, String user, String password)
Fetch pre-existing HPCCWsClient instance from collection, if pre-existing instance with exact connection option doesn't exist return null.- Parameters:
protocol
- the protocoltargetWsECLWatchAddress
- the target ws ECL watch addresstargetWsECLWatchPort
- the target ws ECL watch portuser
- the userpassword
- the password- Returns:
- the no create
-
remove
public static void remove(HPCCWsClient p)
Remove an instance of HPCCWsClient from pool, and therefore from potential re-use.- Parameters:
p
- the p
-
isVerbosemode
public boolean isVerbosemode()
Checks if is verbosemode.- Returns:
- true if the client is set to be verbose
-
setVerbosemode
public void setVerbosemode(boolean verbosemode)
sets the client verbose mode.- Parameters:
verbosemode
- the new verbosemode
-
update
public void update(String protocol, String targetWsECLWatchAddress, String targetWsECLWatchPort, String username, String password)
Caller can edit connection properties for this HPCCWsClient, then get appropriate subclient.- Parameters:
protocol
- the protocoltargetWsECLWatchAddress
- the target ws ECL watch addresstargetWsECLWatchPort
- the target ws ECL watch portusername
- the usernamepassword
- the password
-
updateConnection
public void updateConnection(Connection conn)
Caller can edit connection properties for this HPCCWsClient by providing connection object, then get appropriate subclient.- Parameters:
conn
- the conn
-
getConnection
protected Connection getConnection()
get this HPCCWsClient's connection object.- Returns:
- the connection
-
pingServer
public boolean pingServer() throws Exception
Test availability of target HPCC ESP service.- Returns:
- bool value indicating if ping success
- Throws:
Exception
- the exception
-
isContainerized
public boolean isContainerized()
Queries ECLWatch for containerized flag.- Returns:
- a boolean.
-
getTopologyGroups
public List<org.hpccsystems.ws.client.wrappers.gen.wstopology.TpGroupWrapper> getTopologyGroups(HPCCWsTopologyClient.TopologyGroupQueryKind kind) throws HpccContainerizedUnsupportedException, Exception
Queries WsTopology for HPCC Topology Groups- Parameters:
kind
- - the kind of topology group desired Plane|hthor|thor|roxie- Returns:
- List of wrapped groups
- Throws:
HpccContainerizedUnsupportedException
- if unsupported HPCC deployment encounteredException
- aException
object.
-
getHPCCWsResourcesClient
public HPCCWsResourcesClient getHPCCWsResourcesClient(String wsresourcesport)
Gets the HPCCWsResourcesClient client.- Parameters:
wsresourcesport
- aString
object.- Returns:
- provides HPCCWsResourcesClient on a port other than ECLWatch port.
-
getHPCCWsResourcesClient
public HPCCWsResourcesClient getHPCCWsResourcesClient()
Gets the HPCCWsResourcesClient client.- Returns:
- provides HPCCWsResourcesClient for direct method execution
-
getHPCCWsResourcesClientVer
public String getHPCCWsResourcesClientVer()
Reports the version of the original WSDL used to create the HPCCWsCodeSignClient logic.- Returns:
- Original WSDL version
-
getWsCodeSignClient
public HPCCWsCodeSignClient getWsCodeSignClient(String codeSignPort)
Gets the WsCodeSign client.- Parameters:
codeSignPort
- aString
object.- Returns:
- provides WsCodeSign on a port other than ECLWatch port.
-
getWsCodeSignClient
public HPCCWsCodeSignClient getWsCodeSignClient()
Gets the WsCodeSign client.- Returns:
- provides WsCodeSign for direct method execution
-
getHPCCWsCodeSignClientVer
public String getHPCCWsCodeSignClientVer()
Reports the version of the original WSDL used to create the HPCCWsCodeSignClient logic.- Returns:
- Original WSDL version
-
getWsSQLClientVer
public String getWsSQLClientVer()
Reports the version of the original WSDL used to create the HPCCWsAttributesClient logic.- Returns:
- Original WSDL version
-
getWsSQLClient
public HPCCWsSQLClient getWsSQLClient(String wsSQLPort)
Gets the ws SQL client.- Parameters:
wsSQLPort
- the ws SQL port- Returns:
- provides wsSQLClient on a port other than ECLWatch port.
-
getWsSQLClient
public HPCCWsSQLClient getWsSQLClient()
Gets the ws SQL client.- Returns:
- provides wsSQLClient for direct method execution
-
getWsAttributesClientVer
public String getWsAttributesClientVer()
Reports the version of the original WSDL used to create the HPCCWsAttributesClient logic.- Returns:
- Original WSDL version
-
getWsAttributesClient
public HPCCWsAttributesClient getWsAttributesClient(String wsAttributesPort)
provides WsAttributesClient for direct method execution.- Parameters:
wsAttributesPort
- - If wsattributes is not running on eclwatch port- Returns:
- the ws attributes client
-
getWsAttributesClient
public HPCCWsAttributesClient getWsAttributesClient()
Gets the ws attributes client.- Returns:
- provides WsAttributesClient for direct method execution
-
getFileSprayClient
public HPCCFileSprayClient getFileSprayClient()
Gets the file spray client.- Returns:
- provides fileSprayClient for direct method execution
-
getHPCCWsPackageProcessClientVer
public String getHPCCWsPackageProcessClientVer()
Reports the version of the original WSDL used to create the HPCCWsPackageProcessClient logic.- Returns:
- Original WSDL version
-
getWsFileIOClientVer
public String getWsFileIOClientVer()
Reports the version of the original WSDL used to create the HPCCWsFileIOClient logic.- Returns:
- Original WSDL version
-
getWsFileIOClient
public HPCCWsFileIOClient getWsFileIOClient()
Gets the ws file IO client.- Returns:
- the ws file IO client
-
getWsPackageProcessClient
public HPCCWsPackageProcessClient getWsPackageProcessClient()
Gets the ws package process client.- Returns:
- provides HPCCWsPackageProcessClient for direct method execution
-
getWsTopologyClientVer
public String getWsTopologyClientVer()
Reports the version of the original WSDL used to create the HPCCWsTopologyClient logic.- Returns:
- Original WSDL version
-
getWsTopologyClient
public HPCCWsTopologyClient getWsTopologyClient()
Gets the ws topology client.- Returns:
- the ws topology client
-
getwsDFUClientClientVer
public String getwsDFUClientClientVer()
Reports the version of the original WSDL used to create the HPCCWsSMCClient logic.- Returns:
- Original WSDL version
-
getWsDFUClient
public HPCCWsDFUClient getWsDFUClient()
Gets the ws DFU client.- Returns:
- the ws DFU client
-
getwsDFUXRefClientClientVer
public String getwsDFUXRefClientClientVer()
Reports the version of the original WSDL used to create the HPCCWsSMCClient logic.- Returns:
- Original WSDL version
-
getWsDFUXRefClient
public HPCCWsDFUXRefClient getWsDFUXRefClient()
Gets the WsDFUXRef client.- Returns:
- the WsDFUXRef client
-
getWsSMCClientClientVer
public String getWsSMCClientClientVer()
Reports the version of the original WSDL used to create the HPCCWsSMCClient logic.- Returns:
- Original WSDL version
-
getWsSMCClient
public HPCCWsSMCClient getWsSMCClient()
Gets the ws SMC client.- Returns:
- provides HPCCWsSMCClient for direct method execution
-
getWsWorkunitsClientVer
public String getWsWorkunitsClientVer()
Reports the version of the original WSDL used to create the HPCCWsWorkUnitsClient logic.- Returns:
- Original WSDL version
-
getWsWorkunitsClient
public HPCCWsWorkUnitsClient getWsWorkunitsClient()
Gets the ws workunits client.- Returns:
- provides HPCCWsWorkUnitsClient for direct method execution
-
getAvailableClusterGroups
public String[] getAvailableClusterGroups() throws Exception
Returns all the available cluster groups (hthor, thor, roxie, etc.) on the target HPCC System.- Returns:
- - The available cluster groups (hthor, thor, roxie, etc.) on the target HPCC System.
- Throws:
Exception
- the exception
-
getAvailableClusterNames
public String[] getAvailableClusterNames(String clusterGroupType) throws Exception, ArrayOfEspExceptionWrapper
Returns all the available target cluster names (mythor, myroxie, etc) given a cluster group type/name (thor, roxie, etc.)- Parameters:
clusterGroupType
- - The cluster group type/name- Returns:
- - Names of all available target cluster in the given cluster group
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
getAvailableTargetClusterNames
public List<String> getAvailableTargetClusterNames() throws Exception, ArrayOfEspExceptionWrapper
Gets the available target cluster names.- Returns:
- - List of all available target cluster names (mythor, myroxie, etc) on this HPCC System
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sprayFlatHPCCFile
public boolean sprayFlatHPCCFile(String fileName, String targetFileLabel, int recordSize, String targetCluster, boolean overwritesprayedfile)
Spray a fixed record length data file onto a target cluster on the target HPCC System.- Parameters:
fileName
- - The existing file (on the target HPCC System) to spraytargetFileLabel
- - The full label the sprayed file will be assignedrecordSize
- - The record lengthtargetCluster
- - The cluster on which to sprayoverwritesprayedfile
- - Boolean, overwrite possibly sprayed file of same name- Returns:
- - Boolean, success.
-
sprayCustomCSVHPCCFile
public boolean sprayCustomCSVHPCCFile(String fileName, String targetFileLabel, String targetCluster, String escapedEscapeSequence, String escapedFieldDelim, String escapedQuote, String escapedRecTerminator, boolean overwritesprayedfile, HPCCFileSprayClient.SprayVariableFormat format)
Spray a variable/delimited data file onto a target cluster on the target HPCC System.- Parameters:
fileName
- - The existing file (on the target HPCC System) to spraytargetFileLabel
- - The full label the sprayed file will be assignedtargetCluster
- - The cluster on which to sprayescapedEscapeSequence
- - The escape character sequence (must be escaped)escapedFieldDelim
- - The field delimiter (must be escaped)escapedQuote
- - The data quote (must be escaped)escapedRecTerminator
- - The record terminator sequence (must be escaped)overwritesprayedfile
- - Boolean, overwrite possibly sprayed file of same nameformat
- - SprayVariableFormat- Returns:
- - Boolean, success.
-
sprayDefaultCSVHPCCFile
public boolean sprayDefaultCSVHPCCFile(String fileName, String targetFileLabel, String targetCluster, boolean overwritesprayedfile)
Spray a CSV delimited data file (default CSV options) onto a target cluster on the target HPCC System.- Parameters:
fileName
- - The existing file (on the target HPCC System) to spraytargetFileLabel
- - The full label the sprayed file will be assignedtargetCluster
- - The cluster on which to sprayoverwritesprayedfile
- - Boolean, overwrite possibly sprayed file of same name- Returns:
- - Boolean, success.
-
sprayVariableHPCCFile
public boolean sprayVariableHPCCFile(String fileName, String targetFileLabel, String targetCluster, DelimitedDataOptions options, boolean overwritesprayedfile, HPCCFileSprayClient.SprayVariableFormat format)
Spray a variable/delimited data file onto a target cluster on the target HPCC System.- Parameters:
fileName
- - The existing file (on the target HPCC System) to spraytargetFileLabel
- - The full label the sprayed file will be assignedtargetCluster
- - The cluster on which to sprayoptions
- - Delimited file descriptionoverwritesprayedfile
- - Boolean, overwrite possibly sprayed file of same nameformat
- - SprayVariableFormat- Returns:
- - Boolean, success.
-
handleSprayResponse
public boolean handleSprayResponse(org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper progressResponseWrapper) throws Exception, ArrayOfEspExceptionWrapper
Handle spray response.- Parameters:
progressResponseWrapper
- the progress response wrapper- Returns:
- true, if successful
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
uploadFileToHPCC
public boolean uploadFileToHPCC(String localFileName, String targetFilename, String machineLoginUser, String password)
Preferred mechanism for uploading files to HPCC landingzone. Utilizes sftp protocol, requires target machine user account- Parameters:
localFileName
- Fully qualified local file name to be uploadedtargetFilename
- Desired name to apply to uploaded filemachineLoginUser
- Target machine user account namepassword
- Target machine user account password- Returns:
- true, if successful
-
httpUploadFileToFirstHPCCLandingZone
public boolean httpUploadFileToFirstHPCCLandingZone(String localFileName)
NOT the preferred mechanism for uploading files to HPCC landingzone. Utilizes http protocol, targets hpcc ws ONLY USE THIS METHOD for small files and/or when sftp access is not available- Parameters:
localFileName
- Fully qualified local file name to be uploaded- Returns:
- true, if successful
-
submitECLandGetResults
public String submitECLandGetResults(WorkunitWrapper wu) throws Exception
Submits the given ECL to compile/execute on the targetclust, and returns results.- Parameters:
wu
- - The workunit info object- Returns:
- - If successful, the resulting dataset(s)
- Throws:
Exception
- the exception
-
submitECLandGetResultsList
public List<List<Object>> submitECLandGetResultsList(WorkunitWrapper wu) throws Exception
Submits the given ECL to compile/execute on the targetclust, and returns parsed results.- Parameters:
wu
- - The workunit info- Returns:
- - If successful, the resulting dataset(s)
- Throws:
Exception
- the exception
-
submitECLandGetWUID
public String submitECLandGetWUID(WorkunitWrapper wu)
Submits the given ECL to compile/execute on the targetclust and returns WUID to track the query.- Parameters:
wu
- - The workunit info to be submitted- Returns:
- - If successful, the resulting WUID, which can be used to query info, including results
-
getProtocol
public String getProtocol()
Get this HPCCWsClient's connection protocol (http|https).- Returns:
- the protocol
-
getHost
public String getHost()
Get this HPCCWsClient's connection host address.- Returns:
- the host
-
getPortInt
public int getPortInt()
Get this HPCCWsClient's connection port.- Returns:
- the port int
-
getUserName
public String getUserName()
Get the user name used to by HPCCWsClient to authenticate against target ECLWatch.- Returns:
- the user name
-
getPassword
public String getPassword()
Get the password used to by HPCCWsClient to authenticate against target ECLWatch.- Returns:
- the password
-
isComplete
protected boolean isComplete()
- Specified by:
isComplete
in classDataSingleton
-
fastRefresh
protected void fastRefresh()
- Specified by:
fastRefresh
in classDataSingleton
-
fullRefresh
protected void fullRefresh()
- Specified by:
fullRefresh
in classDataSingleton
-
equals
public boolean equals(Object aThat)
- Specified by:
equals
in classDataSingleton
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classDataSingleton
-
-