Package org.hpccsystems.ws.client
Class HPCCFileSprayClient
- java.lang.Object
-
- java.util.Observable
-
- org.hpccsystems.ws.client.utils.DataSingleton
-
- org.hpccsystems.ws.client.BaseHPCCWsClient
-
- org.hpccsystems.ws.client.HPCCFileSprayClient
-
public class HPCCFileSprayClient extends BaseHPCCWsClient
Facilitates File Spray related activities. This includes listing available dropzones, uploading files to dropzone, listing files in a dropzone, spraying files from dropzone and more. This class can be enhanced to provide further service calls.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HPCCFileSprayClient.SprayVariableFormat
Used to declare variable data format of file to be sprayed
-
Field Summary
Fields Modifier and Type Field Description static Version
TrailingSlashPathHPCCVer
-
Fields inherited from class org.hpccsystems.ws.client.BaseHPCCWsClient
DEAFULTECLWATCHPORT, DEFAULTECLWATCHTLSPORT, initErrMessage, stub, targetESPInterfaceVer, targetHPCCBuildVersion, targetsContainerizedHPCC, verbose, wsconn
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HPCCFileSprayClient(Connection baseConnection)
Instantiates a new HPCC file spray client.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
copyFile(String from, String to, boolean overwrite)
Copy file.static DelimitedDataOptions
createDelimitedDataOptionsObject(String recordTerminator, String fieldDelimiter, String escapeSequence, String quote)
Convenience static method, crates new delimited data format descriptor.org.hpccsystems.ws.client.wrappers.gen.filespray.DFUWorkunitsActionResponseWrapper
deleteDropZoneFiles(String dropzoneName, List<String> fileNames, String netAddress, String path, String os)
Deletes a file from a drop zoneorg.hpccsystems.ws.client.wrappers.gen.filespray.DesprayResponseWrapper
despray(Boolean compressed, String decrypt, String destip, String destpath, String dfuserverqueue, String encrypt, Integer maxconnections, Boolean multicopy, Boolean norecover, Boolean overwrite, Boolean singleconnection, String sourcelogicalname, String splitprefix, Integer throttle, Integer transferbuffersize, Boolean wrap)
Despray HPCC logical file - see actual service page for field descriptionsString
despray(String sourcelogicalname, String destinationIP, String destinationPath)
Despray HPCC logical file - see actual service page for field descriptionsString
despray(String sourcelogicalname, String destinationIP, String destinationPath, String splitprefix, boolean overwrite, boolean singleconnection)
Despray HPCC logical file - see actual service page for field descriptionsorg.hpccsystems.ws.client.wrappers.gen.filespray.DesprayResponseWrapper
despray(org.hpccsystems.ws.client.wrappers.gen.filespray.DesprayWrapper desprayreq)
Despray HPCC logical filelong
downloadFile(File outFile, org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper dropZone, String fileName)
Attempts to download the specified file from a dropzone.long
downloadFile(FileChannel outputChannel, org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper dropZone, String fileName)
Attempts to download the specified file from a dropzone.org.hpccsystems.ws.client.gen.axis2.filespray.latest.PhysicalFileStruct[]
dzFileSearch(String dzname, String netaddr, String namefilter)
Perform HPCC Drop Zone file search.boolean
equals(Object aThat)
List<org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper>
fetchDropZones(String dropzoneNetAddress)
Fetch drop zones.org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneFilesResponseWrapper
fetchDropZones(String dzname, String netaddress, String os, String path, String subfolder, boolean dironly, boolean watchvisibleonely)
Fetch drop zones.org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneFilesResponseWrapper
fetchDropZones(org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneFilesRequestWrapper szrequest)
Fetch drop zones.List<org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper>
fetchLocalDropZones()
Fetch local drop zones.static HPCCFileSprayClient
get(String protocol, String targetHost, String targetPort, String user, String pass)
Gets a HPCCFileSprayClient connected to target HPCC Systems as described by connection parameters.static HPCCFileSprayClient
get(String protocol, String targetHost, String targetPort, String user, String pass, int timeout)
Gets a HPCCFileSprayClient connected to target HPCC Systems as described by connection parameters.static HPCCFileSprayClient
get(Connection connection)
Gets a HPCCFileSprayClient connected to target HPCC Systems as described by connection object.org.apache.axis2.client.Stub
getDefaultStub()
Gets the default stub.org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper
getDfuProgress(String dfuwuid)
Get progress report for given DFU Work Unit.org.hpccsystems.ws.client.wrappers.gen.filespray.GetDFUWorkunitResponseWrapper
getDFUWorkunit(String workunitid)
Attempts to fetch information regarding a DFU Workunit.org.hpccsystems.ws.client.wrappers.gen.filespray.GetDFUWorkunitsResponseWrapper
getDFUWorkunits(String cluster, Long pagesize)
Attempts to fetch list of DFU Workunits.int
getFileUploadReadBufferLength()
Gets the file upload read buffer length.String
getServiceURI()
Gets the service URI.static int
getServiceWSDLPort()
Gets the service WSDL port.static String
getServiceWSDLURL()
Gets the service WSDLURL.boolean
handleSprayResponse(org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper progressResponseWrapper, int maxRetries, int milliesBetweenRetry)
Handle spray response.int
hashCode()
List<org.hpccsystems.ws.client.wrappers.gen.filespray.PhysicalFileStructWrapper>
listFiles(String netAddress, String path, String OS)
Fetch list of files on a given dropzone's machine on the target HPCC System Note: a logical dropzone can contain multiple machines.boolean
ping()
Sends ping request to WsFileSpray service on target HPCC Systems instance.String
renameLogicalFile(String sourceFileName, String targetFilename, boolean overwrite)
Renames HPCC logical filevoid
setFileUploadReadBufferLength(int length)
Set the buffer length used to read files during upload process.protected static void
setupUploadResultParser()
void
sftpPutFileOnTargetLandingZone(String localFileName, String targetFilename, String machineLoginUserName, String password)
Attempts to upload given file to HPCC Systems on the first dropzone encountered at the target HPCCSystem address.void
sftpPutFileOnTargetLandingZone(String localFileName, String targetDropzoneAddress, String targetFilename, String machineLoginUserName, String password, Properties connconfig)
Attempts to upload given file to HPCC Systems on the first dropzone encountered at the given address.void
sftpPutFileOnTargetLandingZone(String localFileName, String targetFilename, String machineLoginUserName, String password, Properties connconfig)
Attempts to upload given file to HPCC Systems on the first dropzone encountered at the target HPCCSystem address.org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper
sprayFixed(String dropzoneNetAddress, String sourceFileName, int recordSize, String targetFileLabel, String prefix, String destGroup, boolean overwrite)
Spray fixed file from first dropzone encountered on the given dropzone net address.org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper
sprayFixed(org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper targetDropZone, String sourceFileName, int recordSize, String targetFileLabel, String prefix, String destGroup, boolean overwrite, Integer maxConnections, Boolean compress, Boolean replicate, Boolean failIfNoSourceFile, Integer expireDays, String decryptKey, String encryptKey, Boolean nosplit, Boolean recordStructurePresent, Integer transferBufferSize, Boolean wrap)
Spray fixed file from the given target dropzone onto cluster destionation group.org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper
sprayFixedLocalDropZone(String sourceFileName, int recordSize, String targetFileLabel, String prefix, String destGroup, boolean overwrite)
Spray fixed file from first local dropzone encountered onto destination cluster group.org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper
sprayLocalXML(String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite)
Spray XML data file from the first local dropzone onto given cluster group.org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper
sprayLocalXML(String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite, HPCCFileSprayClient.SprayVariableFormat format, String rowtag, Integer maxrecsize)
Spray XML data file from the first local dropzone onto given cluster group.org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper
sprayVariable(String dropzoneNetAddress, String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite)
* Spray default CSV variable/delimited HPCC file, from the given dropzone address onto given cluster group.org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper
sprayVariable(String dropzoneNetAddress, DelimitedDataOptions options, String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite)
Spray variable/delimited HPCC file described in the give delimited data options, from the given dropzone address onto given cluster group.org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper
sprayVariable(DelimitedDataOptions options, org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper targetDropZone, String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite)
Spray variable/delimited HPCC file described in the give delimited data options, from given dropzone onto given cluster group.org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper
sprayVariable(DelimitedDataOptions options, org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper targetDropZone, String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite, HPCCFileSprayClient.SprayVariableFormat format, Integer sourceMaxRecordSize, Integer maxConnections, Boolean compress, Boolean replicate, Boolean failIfNoSourceFile, Boolean recordStructurePresent, Integer expireDays)
Spray variable/delimited HPCC file described in the give delimited data options, from given dropzone onto given cluster group.org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper
sprayVariableLocalDropZone(DelimitedDataOptions options, String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite, HPCCFileSprayClient.SprayVariableFormat format)
Spray variable/delimited HPCC file described in the give delimited data options, from local dropzone onto given cluster group.org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper
sprayXML(org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper targetDropZone, String sourceFileName, String targetFileName, String prefix, String destGroup, String rowtag, boolean overwrite, HPCCFileSprayClient.SprayVariableFormat format, Integer maxrecsize, Integer maxConnections, Boolean replicate, Boolean compress, Boolean failIfNoSourceFile, Integer expireDays)
Spray XML data file from the given dropzone onto given cluster group.boolean
uploadFile(File file, String targetDropzoneAddress)
THIS IS NOT THE PREFERED WAY TO UPLOAD FILES ONTO HPCCSYSTEMS ONLY USE THIS FUNCTION FOR SMALL FILES AND IN THE CASE YOU CANNOT PROVIDE CREDENTIALS TO LOGON TO THE TARGET MACHINE USE sftpPutFileOnTargetLandingZone(...) if possible Attempts to upload given file to HPCC System on the first dropzone encountered at the given addressboolean
uploadFileLocalDropZone(File file)
THIS IS NOT THE PREFERED WAY TO UPLOAD FILES ONTO HPCCSYSTEMS ONLY USE THIS FUNCTION FOR SMALL FILES AND IN THE CASE YOU CANNOT PROVIDE CREDENTIALS TO LOGON TO THE TARGET MACHINE USE sftpPutFileOnTargetLandingZone(...) if possible Attempts to upload given file to HPCC System on the first local dropzone encounteredboolean
uploadLargeFile(File uploadFile, org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper dropZone)
UPLOADS A FILE( UP TO 2GB FILE SIZES) TO THE SPECIFIED LANDING ZONE.-
Methods inherited from class org.hpccsystems.ws.client.BaseHPCCWsClient
compatibilityCheck, compatibilityCheck, fastRefresh, fullRefresh, getConnectionURL, getInitError, getServiceVersion, getServiceVersion, getServiceWSDLPort, getServiceWSDLURL, getStubConnectionTO, getTargetESPInterfaceVersion, getTargetHPCCBuildVersion, getVerbose, handleECLExceptions, handleECLExceptions, handleEspExceptions, handleEspExceptions, handleEspSoapFaults, handleEspSoapFaults, hasInitError, initBaseWsClient, 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
-
TrailingSlashPathHPCCVer
public static final Version TrailingSlashPathHPCCVer
-
-
Constructor Detail
-
HPCCFileSprayClient
protected HPCCFileSprayClient(Connection baseConnection)
Instantiates a new HPCC file spray 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
-
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
-
get
public static HPCCFileSprayClient get(Connection connection)
Gets a HPCCFileSprayClient connected to target HPCC Systems as described by connection object.- Parameters:
connection
- the connection- Returns:
- the HPCC file spray client
-
get
public static HPCCFileSprayClient get(String protocol, String targetHost, String targetPort, String user, String pass)
Gets a HPCCFileSprayClient connected to target HPCC Systems as described by connection parameters.- Parameters:
protocol
- the protocoltargetHost
- the target hosttargetPort
- the target portuser
- the userpass
- the pass- Returns:
- the HPCC file spray client
-
get
public static HPCCFileSprayClient get(String protocol, String targetHost, String targetPort, String user, String pass, int timeout)
Gets a HPCCFileSprayClient connected to target HPCC Systems as described by connection parameters.- Parameters:
protocol
- the protocoltargetHost
- the target hosttargetPort
- the target portuser
- the userpass
- the passtimeout
- the timeout- Returns:
- the HPCC file spray client
-
ping
public boolean ping() throws Exception
Sends ping request to WsFileSpray service on target HPCC Systems instance.- Returns:
- true, if successful
- Throws:
Exception
- the exception
-
getFileUploadReadBufferLength
public int getFileUploadReadBufferLength()
Gets the file upload read buffer length.- Returns:
- the upload file buffer length
-
setFileUploadReadBufferLength
public void setFileUploadReadBufferLength(int length)
Set the buffer length used to read files during upload process.- Parameters:
length
- the new file upload read buffer length
-
handleSprayResponse
public boolean handleSprayResponse(org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper progressResponseWrapper, int maxRetries, int milliesBetweenRetry) throws Exception, ArrayOfEspExceptionWrapper
Handle spray response.- Parameters:
progressResponseWrapper
- the progress response wrappermaxRetries
- the max retriesmilliesBetweenRetry
- the millies between retry- Returns:
- true, if successful
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
createDelimitedDataOptionsObject
public static DelimitedDataOptions createDelimitedDataOptionsObject(String recordTerminator, String fieldDelimiter, String escapeSequence, String quote)
Convenience static method, crates new delimited data format descriptor. Parameters not provided are csv defaulted- Parameters:
recordTerminator
- the record terminatorfieldDelimiter
- the field delimiterescapeSequence
- the escape sequencequote
- the quote- Returns:
- the delimited data options
-
fetchLocalDropZones
public List<org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper> fetchLocalDropZones() throws Exception, ArrayOfEspExceptionWrapper
Fetch local drop zones.- Returns:
- List of all local drop zones on target HPCC system
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
fetchDropZones
public List<org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper> fetchDropZones(String dropzoneNetAddress) throws Exception, ArrayOfEspExceptionWrapper
Fetch drop zones.- Parameters:
dropzoneNetAddress
- the dropzone net address- Returns:
- list of all dropzones on dropzoneNetAddress
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
copyFile
public String copyFile(String from, String to, boolean overwrite) throws Exception, ArrayOfEspExceptionWrapper
Copy file.- Parameters:
from
- the fromto
- the tooverwrite
- the overwrite- Returns:
- the string
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
fetchDropZones
public org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneFilesResponseWrapper fetchDropZones(String dzname, String netaddress, String os, String path, String subfolder, boolean dironly, boolean watchvisibleonely) throws Exception, ArrayOfEspExceptionWrapper
Fetch drop zones.- Parameters:
dzname
- the dznamenetaddress
- the netaddressos
- the ospath
- the pathsubfolder
- the subfolderdironly
- the dironlywatchvisibleonely
- the watchvisibleonely- Returns:
- the drop zone files response wrapper
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
fetchDropZones
public org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneFilesResponseWrapper fetchDropZones(org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneFilesRequestWrapper szrequest) throws Exception, ArrayOfEspExceptionWrapper
Fetch drop zones.- Parameters:
szrequest
- the szrequest- Returns:
- the drop zone files response wrapper
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
dzFileSearch
public org.hpccsystems.ws.client.gen.axis2.filespray.latest.PhysicalFileStruct[] dzFileSearch(String dzname, String netaddr, String namefilter) throws Exception, ArrayOfEspExceptionWrapper
Perform HPCC Drop Zone file search.- Parameters:
dzname
- - Required, the name of the Drop Zone to querynetaddr
- - Required, the netaddress of the Drop Zone node to querynamefilter
- - Required, the wildcard based name-filter to query- Returns:
- the physical file struct[]
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
listFiles
public List<org.hpccsystems.ws.client.wrappers.gen.filespray.PhysicalFileStructWrapper> listFiles(String netAddress, String path, String OS) throws Exception, ArrayOfEspExceptionWrapper
Fetch list of files on a given dropzone's machine on the target HPCC System Note: a logical dropzone can contain multiple machines.- Parameters:
netAddress
- - Address of specific dropzone instancepath
- - The dropzone zone path on the local filesystemOS
- - Optional, OS code- Returns:
- - Array of file descriptors
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sprayVariable
public org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper sprayVariable(String dropzoneNetAddress, String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite) throws Exception, ArrayOfEspExceptionWrapper
* Spray default CSV variable/delimited HPCC file, from the given dropzone address onto given cluster group.- Parameters:
dropzoneNetAddress
- the dropzone net addresssourceFileName
- the source file nametargetFileName
- the target file nameprefix
- the prefixdestGroup
- the dest groupoverwrite
- the overwrite- Returns:
- - Progress response at time of request
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sprayVariable
public org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper sprayVariable(String dropzoneNetAddress, DelimitedDataOptions options, String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite) throws Exception, ArrayOfEspExceptionWrapper
Spray variable/delimited HPCC file described in the give delimited data options, from the given dropzone address onto given cluster group.- Parameters:
dropzoneNetAddress
- the dropzone net addressoptions
- the optionssourceFileName
- the source file nametargetFileName
- the target file nameprefix
- the prefixdestGroup
- the dest groupoverwrite
- the overwrite- Returns:
- - Progress response at time of request
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sprayVariableLocalDropZone
public org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper sprayVariableLocalDropZone(DelimitedDataOptions options, String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite, HPCCFileSprayClient.SprayVariableFormat format) throws Exception, ArrayOfEspExceptionWrapper
Spray variable/delimited HPCC file described in the give delimited data options, from local dropzone onto given cluster group.- Parameters:
options
- the optionssourceFileName
- the source file nametargetFileName
- the target file nameprefix
- the prefixdestGroup
- the dest groupoverwrite
- the overwriteformat
- - SprayVariableFormat object describing the file format- Returns:
- - Progress response at time of request
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sprayVariable
public org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper sprayVariable(DelimitedDataOptions options, org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper targetDropZone, String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite) throws Exception, ArrayOfEspExceptionWrapper
Spray variable/delimited HPCC file described in the give delimited data options, from given dropzone onto given cluster group.- Parameters:
options
- the optionstargetDropZone
- the target drop zonesourceFileName
- the source file nametargetFileName
- the target file nameprefix
- the prefixdestGroup
- the dest groupoverwrite
- the overwrite- Returns:
- - Progress response at time of request
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sprayVariable
public org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper sprayVariable(DelimitedDataOptions options, org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper targetDropZone, String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite, HPCCFileSprayClient.SprayVariableFormat format, Integer sourceMaxRecordSize, Integer maxConnections, Boolean compress, Boolean replicate, Boolean failIfNoSourceFile, Boolean recordStructurePresent, Integer expireDays) throws Exception, ArrayOfEspExceptionWrapper
Spray variable/delimited HPCC file described in the give delimited data options, from given dropzone onto given cluster group.- Parameters:
options
- the optionstargetDropZone
- the target drop zonesourceFileName
- the source file nametargetFileName
- the target file nameprefix
- the prefixdestGroup
- the dest groupoverwrite
- the overwriteformat
- - SprayVariableFormat object describing the file formatsourceMaxRecordSize
- the source max record sizemaxConnections
- the max connectionscompress
- the compressreplicate
- the replicatefailIfNoSourceFile
- the fail if no source filerecordStructurePresent
- the record structure presentexpireDays
- the expire days- Returns:
- - Progress response at time of request
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sprayLocalXML
public org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper sprayLocalXML(String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite) throws Exception, ArrayOfEspExceptionWrapper
Spray XML data file from the first local dropzone onto given cluster group. defaults to first local dropzone, row tag to "tag", source format to "ASCII" default max record size- Parameters:
sourceFileName
- the source file nametargetFileName
- the target file nameprefix
- the prefixdestGroup
- the dest groupoverwrite
- the overwrite- Returns:
- ProgressResponse
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sprayLocalXML
public org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper sprayLocalXML(String sourceFileName, String targetFileName, String prefix, String destGroup, boolean overwrite, HPCCFileSprayClient.SprayVariableFormat format, String rowtag, Integer maxrecsize) throws Exception, ArrayOfEspExceptionWrapper
Spray XML data file from the first local dropzone onto given cluster group.- Parameters:
sourceFileName
- the source file nametargetFileName
- the target file nameprefix
- the prefixdestGroup
- the dest groupoverwrite
- the overwriteformat
- the formatrowtag
- the rowtagmaxrecsize
- the maxrecsize- Returns:
- ProgressResponse
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sprayXML
public org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper sprayXML(org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper targetDropZone, String sourceFileName, String targetFileName, String prefix, String destGroup, String rowtag, boolean overwrite, HPCCFileSprayClient.SprayVariableFormat format, Integer maxrecsize, Integer maxConnections, Boolean replicate, Boolean compress, Boolean failIfNoSourceFile, Integer expireDays) throws Exception, ArrayOfEspExceptionWrapper
Spray XML data file from the given dropzone onto given cluster group.- Parameters:
targetDropZone
- the target drop zonesourceFileName
- the source file nametargetFileName
- the target file nameprefix
- the prefixdestGroup
- the dest grouprowtag
- the rowtagoverwrite
- the overwriteformat
- the formatmaxrecsize
- the maxrecsizemaxConnections
- the max connectionsreplicate
- the replicatecompress
- the compressfailIfNoSourceFile
- the fail if no source fileexpireDays
- the expire days- Returns:
- ProgressResponse
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sprayFixed
public org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper sprayFixed(String dropzoneNetAddress, String sourceFileName, int recordSize, String targetFileLabel, String prefix, String destGroup, boolean overwrite) throws Exception, ArrayOfEspExceptionWrapper
Spray fixed file from first dropzone encountered on the given dropzone net address.- Parameters:
dropzoneNetAddress
- the dropzone net addresssourceFileName
- the source file namerecordSize
- the record sizetargetFileLabel
- the target file labelprefix
- the prefixdestGroup
- the dest groupoverwrite
- the overwrite- Returns:
- - Progress response at time of request
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sprayFixedLocalDropZone
public org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper sprayFixedLocalDropZone(String sourceFileName, int recordSize, String targetFileLabel, String prefix, String destGroup, boolean overwrite) throws Exception, ArrayOfEspExceptionWrapper
Spray fixed file from first local dropzone encountered onto destination cluster group.- Parameters:
sourceFileName
- the source file namerecordSize
- the record sizetargetFileLabel
- the target file labelprefix
- the prefixdestGroup
- the dest groupoverwrite
- the overwrite- Returns:
- - Progress response at time of request
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sprayFixed
public org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper sprayFixed(org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper targetDropZone, String sourceFileName, int recordSize, String targetFileLabel, String prefix, String destGroup, boolean overwrite, Integer maxConnections, Boolean compress, Boolean replicate, Boolean failIfNoSourceFile, Integer expireDays, String decryptKey, String encryptKey, Boolean nosplit, Boolean recordStructurePresent, Integer transferBufferSize, Boolean wrap) throws Exception, ArrayOfEspExceptionWrapper
Spray fixed file from the given target dropzone onto cluster destionation group.- Parameters:
targetDropZone
- the target drop zonesourceFileName
- the source file namerecordSize
- the record sizetargetFileLabel
- the target file labelprefix
- the prefixdestGroup
- the dest groupoverwrite
- the overwritemaxConnections
- the max connectionscompress
- the compressreplicate
- the replicatefailIfNoSourceFile
- the fail if no source fileexpireDays
- the expire daysdecryptKey
- the decrypt keyencryptKey
- the encrypt keynosplit
- the nosplitrecordStructurePresent
- the record structure presenttransferBufferSize
- the transfer buffer sizewrap
- the wrap- Returns:
- - Progress response at time of request
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
getDfuProgress
public org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper getDfuProgress(String dfuwuid) throws Exception, ArrayOfEspExceptionWrapper
Get progress report for given DFU Work Unit.- Parameters:
dfuwuid
- - The DFU Work unit number- Returns:
- - The Progress report at time of request
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
uploadFile
public boolean uploadFile(File file, String targetDropzoneAddress) throws Exception, ArrayOfEspExceptionWrapper
THIS IS NOT THE PREFERED WAY TO UPLOAD FILES ONTO HPCCSYSTEMS ONLY USE THIS FUNCTION FOR SMALL FILES AND IN THE CASE YOU CANNOT PROVIDE CREDENTIALS TO LOGON TO THE TARGET MACHINE USE sftpPutFileOnTargetLandingZone(...) if possible Attempts to upload given file to HPCC System on the first dropzone encountered at the given address- Parameters:
file
- - The File to uploadtargetDropzoneAddress
- - The target dropzone address- Returns:
- - Boolean, success
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
uploadFileLocalDropZone
public boolean uploadFileLocalDropZone(File file) throws Exception, ArrayOfEspExceptionWrapper
THIS IS NOT THE PREFERED WAY TO UPLOAD FILES ONTO HPCCSYSTEMS ONLY USE THIS FUNCTION FOR SMALL FILES AND IN THE CASE YOU CANNOT PROVIDE CREDENTIALS TO LOGON TO THE TARGET MACHINE USE sftpPutFileOnTargetLandingZone(...) if possible Attempts to upload given file to HPCC System on the first local dropzone encountered- Parameters:
file
- - The File to upload- Returns:
- - Boolean, success
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
setupUploadResultParser
protected static void setupUploadResultParser() throws XPathExpressionException, ParserConfigurationException
-
uploadLargeFile
public boolean uploadLargeFile(File uploadFile, org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper dropZone)
UPLOADS A FILE( UP TO 2GB FILE SIZES) TO THE SPECIFIED LANDING ZONE.- Parameters:
uploadFile
- - The File to uploaddropZone
- - The target dropzone- Returns:
- - Boolean, success
-
downloadFile
public long downloadFile(File outFile, org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper dropZone, String fileName)
Attempts to download the specified file from a dropzone.- Parameters:
outFile
- - The File to write todropZone
- - The target HPCC file dropzonefileName
- - The file to download- Returns:
- - long, bytes transferred, -1 on error
-
downloadFile
public long downloadFile(FileChannel outputChannel, org.hpccsystems.ws.client.wrappers.gen.filespray.DropZoneWrapper dropZone, String fileName)
Attempts to download the specified file from a dropzone.- Parameters:
outputChannel
- - The FileChannel to write todropZone
- - The target HPCC file dropzonefileName
- - The file to download- Returns:
- - long, bytes transferred, -1 on error
-
sftpPutFileOnTargetLandingZone
public void sftpPutFileOnTargetLandingZone(String localFileName, String targetFilename, String machineLoginUserName, String password) throws Exception, ArrayOfEspExceptionWrapper
Attempts to upload given file to HPCC Systems on the first dropzone encountered at the target HPCCSystem address.- Parameters:
localFileName
- - The File to uploadtargetFilename
- (optional) - The desired name for the uploaded filemachineLoginUserName
- - The user account name to log on to the target machinepassword
- - The user account password to log on to the target machine- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sftpPutFileOnTargetLandingZone
public void sftpPutFileOnTargetLandingZone(String localFileName, String targetFilename, String machineLoginUserName, String password, Properties connconfig) throws Exception, ArrayOfEspExceptionWrapper
Attempts to upload given file to HPCC Systems on the first dropzone encountered at the target HPCCSystem address.- Parameters:
localFileName
- - The File to uploadtargetFilename
- (optional) - The desired name for the uploaded filemachineLoginUserName
- - The user account name to log on to the target machinepassword
- - The user account password to log on to the target machineconnconfig
- (optional) - Connection config options- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
sftpPutFileOnTargetLandingZone
public void sftpPutFileOnTargetLandingZone(String localFileName, String targetDropzoneAddress, String targetFilename, String machineLoginUserName, String password, Properties connconfig) throws Exception, ArrayOfEspExceptionWrapper
Attempts to upload given file to HPCC Systems on the first dropzone encountered at the given address.- Parameters:
localFileName
- - The File to uploadtargetDropzoneAddress
- - The target landing zone ip addresstargetFilename
- (optional) - The desired name for the uploaded filemachineLoginUserName
- - The user account name to log on to the target machinepassword
- - The user account password to log on to the target machineconnconfig
- (optional) - Connection config options- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
getDFUWorkunit
public org.hpccsystems.ws.client.wrappers.gen.filespray.GetDFUWorkunitResponseWrapper getDFUWorkunit(String workunitid) throws Exception, ArrayOfEspExceptionWrapper
Attempts to fetch information regarding a DFU Workunit.- Parameters:
workunitid
- the workunitid- Returns:
- the DFU workunit
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
getDFUWorkunits
public org.hpccsystems.ws.client.wrappers.gen.filespray.GetDFUWorkunitsResponseWrapper getDFUWorkunits(String cluster, Long pagesize) throws Exception, ArrayOfEspExceptionWrapper
Attempts to fetch list of DFU Workunits.- Parameters:
cluster
- the clusterpagesize
- the pagesize- Returns:
- the DFU workunits
- Throws:
Exception
- the exceptionArrayOfEspExceptionWrapper
- the array of esp exception wrapper
-
deleteDropZoneFiles
public org.hpccsystems.ws.client.wrappers.gen.filespray.DFUWorkunitsActionResponseWrapper deleteDropZoneFiles(String dropzoneName, List<String> fileNames, String netAddress, String path, String os) throws Exception
Deletes a file from a drop zone- Parameters:
dropzoneName
- - The name of the dropzone to delete fromfileNames
- - A List of names to delete from the drop zonenetAddress
- - The net address of the dropzonepath
- - The full path to the dropzone on the filesystem ie /var/lib/HPCCSystems/mydropzoneos
- - The os- Returns:
- response from dfu workunit
- Throws:
Exception
- if any.
-
renameLogicalFile
public String renameLogicalFile(String sourceFileName, String targetFilename, boolean overwrite) throws Exception, ArrayOfEspExceptionWrapper
Renames HPCC logical file- Parameters:
sourceFileName
- - The name of the file to renametargetFilename
- - The new name for the fileoverwrite
- - Overwrite if targetfilename already exists- Returns:
- - The resulting DFU workunit Can be used to track progress and status via getDFUWorkunit(String) or getDfuProgress
- Throws:
Exception
- general exceptionArrayOfEspExceptionWrapper
- array of esp exception wrapper
-
equals
public boolean equals(Object aThat)
- Overrides:
equals
in classBaseHPCCWsClient
-
despray
public String despray(String sourcelogicalname, String destinationIP, String destinationPath) throws Exception
Despray HPCC logical file - see actual service page for field descriptions
-
despray
public String despray(String sourcelogicalname, String destinationIP, String destinationPath, String splitprefix, boolean overwrite, boolean singleconnection) throws Exception
Despray HPCC logical file - see actual service page for field descriptions
-
despray
public org.hpccsystems.ws.client.wrappers.gen.filespray.DesprayResponseWrapper despray(Boolean compressed, String decrypt, String destip, String destpath, String dfuserverqueue, String encrypt, Integer maxconnections, Boolean multicopy, Boolean norecover, Boolean overwrite, Boolean singleconnection, String sourcelogicalname, String splitprefix, Integer throttle, Integer transferbuffersize, Boolean wrap) throws Exception
Despray HPCC logical file - see actual service page for field descriptions- Parameters:
compressed
- aBoolean
object.decrypt
- aString
object.destip
- aString
object.destpath
- aString
object.dfuserverqueue
- aString
object.encrypt
- aString
object.maxconnections
- aInteger
object.multicopy
- aBoolean
object.norecover
- aBoolean
object.overwrite
- aBoolean
object.singleconnection
- aBoolean
object.sourcelogicalname
- aString
object.splitprefix
- aString
object.throttle
- aInteger
object.transferbuffersize
- aInteger
object.wrap
- aBoolean
object.- Returns:
- a
DesprayResponseWrapper
object. - Throws:
Exception
- aException
object
-
despray
public org.hpccsystems.ws.client.wrappers.gen.filespray.DesprayResponseWrapper despray(org.hpccsystems.ws.client.wrappers.gen.filespray.DesprayWrapper desprayreq) throws Exception
Despray HPCC logical file
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classBaseHPCCWsClient
-
-