public class HPCCWsClient extends DataSingleton
Modifier and Type | Field and Description |
---|---|
static DataSingletonCollection |
All |
protected Connection |
connection |
protected Object |
connectionLock |
static String |
defaultTargetWsECLWatchHost |
static String |
defaultTWsECLWatchPort |
static String |
defaultTWsECLWatchSSLPort |
static DataSingletonCollection |
SubClients |
protected boolean |
verbosemode |
Modifier | Constructor and Description |
---|---|
protected |
HPCCWsClient()
Instantiates HPCCWsClient, attempts to establish all communications on http://localhost:8010.
|
protected |
HPCCWsClient(Connection conn)
Instantiates HPCCWsClient, uses contents of connection object to communicate with target HPCC System.
|
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.
|
Modifier and Type | Method and 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 |
getHPCCWsPackageProcessClientVer()
Reports the version of the original WSDL used to create the HPCCWsPackageProcessClient 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).
|
String |
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.
|
HPCCWsDFUClient |
getWsDFUClient()
Gets the ws DFU client.
|
String |
getwsDFUClientClientVer()
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(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 |
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.
|
monitor
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
public static DataSingletonCollection All
public static DataSingletonCollection SubClients
public static final String defaultTargetWsECLWatchHost
public static final String defaultTWsECLWatchPort
public static final String defaultTWsECLWatchSSLPort
protected boolean verbosemode
protected Connection connection
protected Object connectionLock
protected HPCCWsClient()
protected HPCCWsClient(String protocol)
protocol
- the protocolprotected HPCCWsClient(String targetWsECLWatchAddress, String targetWsECLWatchPort)
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 8010protected HPCCWsClient(String protocol, String targetWsECLWatchAddress, String targetWsECLWatchPort)
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 8010public HPCCWsClient(String targetWsECLWatchAddress, String targetWsECLWatchPort, String username, String password)
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 Passwordprotected HPCCWsClient(String protocol, String targetWsECLWatchAddress, String targetWsECLWatchPort, String username, String password)
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 Passwordprotected HPCCWsClient(Connection conn)
conn
- the connpublic static HPCCWsClient get(String protocol, String targetWsECLWatchAddress, int targetWsECLWatchPort, String user, String password)
protocol
- the protocoltargetWsECLWatchAddress
- the target ws ECL watch addresstargetWsECLWatchPort
- the target ws ECL watch portuser
- the userpassword
- the passwordpublic static HPCCWsClient getNoCreate(String protocol, String targetWsECLWatchAddress, int targetWsECLWatchPort, String user, String password)
protocol
- the protocoltargetWsECLWatchAddress
- the target ws ECL watch addresstargetWsECLWatchPort
- the target ws ECL watch portuser
- the userpassword
- the passwordpublic static void remove(HPCCWsClient p)
p
- the ppublic boolean isVerbosemode()
public void setVerbosemode(boolean verbosemode)
verbosemode
- the new verbosemodepublic void update(String protocol, String targetWsECLWatchAddress, String targetWsECLWatchPort, String username, String password)
protocol
- the protocoltargetWsECLWatchAddress
- the target ws ECL watch addresstargetWsECLWatchPort
- the target ws ECL watch portusername
- the usernamepassword
- the passwordpublic void updateConnection(Connection conn)
conn
- the connprotected Connection getConnection()
public boolean pingServer() throws Exception
Exception
- the exceptionpublic String getWsSQLClientVer()
public HPCCWsSQLClient getWsSQLClient(String wsSQLPort)
wsSQLPort
- the ws SQL portpublic HPCCWsSQLClient getWsSQLClient()
public String getWsAttributesClientVer()
public HPCCWsAttributesClient getWsAttributesClient(String wsAttributesPort)
wsAttributesPort
- - If wsattributes is not running on eclwatch portpublic HPCCWsAttributesClient getWsAttributesClient()
public HPCCFileSprayClient getFileSprayClient()
public String getHPCCWsPackageProcessClientVer()
public String getWsFileIOClientVer()
public HPCCWsFileIOClient getWsFileIOClient()
public HPCCWsPackageProcessClient getWsPackageProcessClient()
public String getWsTopologyClientVer()
public HPCCWsTopologyClient getWsTopologyClient()
public String getwsDFUClientClientVer()
public HPCCWsDFUClient getWsDFUClient()
public String getWsSMCClientClientVer()
public HPCCWsSMCClient getWsSMCClient()
public String getWsWorkunitsClientVer()
public HPCCWsWorkUnitsClient getWsWorkunitsClient()
public String[] getAvailableClusterGroups() throws Exception
Exception
- the exceptionpublic String[] getAvailableClusterNames(String clusterGroupType) throws Exception, ArrayOfEspExceptionWrapper
clusterGroupType
- - The cluster group type/nameException
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapperpublic List<String> getAvailableTargetClusterNames() throws Exception, ArrayOfEspExceptionWrapper
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapperpublic boolean sprayFlatHPCCFile(String fileName, String targetFileLabel, int recordSize, String targetCluster, boolean overwritesprayedfile)
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 namepublic boolean sprayCustomCSVHPCCFile(String fileName, String targetFileLabel, String targetCluster, String escapedEscapeSequence, String escapedFieldDelim, String escapedQuote, String escapedRecTerminator, boolean overwritesprayedfile, HPCCFileSprayClient.SprayVariableFormat format)
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
- - SprayVariableFormatpublic boolean sprayDefaultCSVHPCCFile(String fileName, String targetFileLabel, String targetCluster, boolean overwritesprayedfile)
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 namepublic boolean sprayVariableHPCCFile(String fileName, String targetFileLabel, String targetCluster, DelimitedDataOptions options, boolean overwritesprayedfile, HPCCFileSprayClient.SprayVariableFormat format)
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
- - SprayVariableFormatpublic boolean handleSprayResponse(ProgressResponseWrapper progressResponseWrapper) throws Exception, ArrayOfEspExceptionWrapper
progressResponseWrapper
- the progress response wrapperException
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapperpublic boolean uploadFileToHPCC(String localFileName, String targetFilename, String machineLoginUser, String password)
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 passwordpublic boolean httpUploadFileToFirstHPCCLandingZone(String localFileName)
localFileName
- Fully qualified local file name to be uploadedpublic String submitECLandGetResults(WorkunitWrapper wu) throws Exception
wu
- - The workunit info objectException
- the exceptionpublic List<List<Object>> submitECLandGetResultsList(WorkunitWrapper wu) throws Exception
wu
- - The workunit infoException
- the exceptionpublic String submitECLandGetWUID(WorkunitWrapper wu)
wu
- - The workunit info to be submittedpublic String getProtocol()
public String getHost()
public int getPortInt()
public String getUserName()
public String getPassword()
protected boolean isComplete()
isComplete
in class DataSingleton
protected void fastRefresh()
fastRefresh
in class DataSingleton
protected void fullRefresh()
fullRefresh
in class DataSingleton
public boolean equals(Object aThat)
equals
in class DataSingleton
public int hashCode()
hashCode
in class DataSingleton
Copyright © 2021. All rights reserved.