Package org.hpccsystems.ws.client
Class HPCCWsDFUClient
- java.lang.Object
-
- java.util.Observable
-
- org.hpccsystems.ws.client.utils.DataSingleton
-
- org.hpccsystems.ws.client.BaseHPCCWsClient
-
- org.hpccsystems.ws.client.HPCCWsDFUClient
-
public class HPCCWsDFUClient extends BaseHPCCWsClient
Facilitates Logical File System actions on target HPCC Systems instance. Supported actions include fetching file information, file data, file listings, creating, publishing and deleting files, and more.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classHPCCWsDFUClient.DFUQueryFileType
-
Field Summary
Fields Modifier and Type Field Description static StringDATASET_ELEMENTConstantDATASET_ELEMENT="Dataset"static StringROW_ELEMENTConstantROW_ELEMENT="Row"static StringWSDFUURIConstantWSDFUURI="/WsDFU/"-
Fields inherited from class org.hpccsystems.ws.client.BaseHPCCWsClient
DEAFULTECLWATCHPORT, DEFAULTECLWATCHTLSPORT, initErrMessage, stub, targetESPInterfaceVer, targetHPCCBuildVersion, targetsContainerizedHPCC, verbose, wsconn
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHPCCWsDFUClient(Connection baseConnection)Instantiates a new HPCC ws DFU client.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.hpccsystems.ws.client.wrappers.gen.wsdfu.AddtoSuperfileResponseWrapperaddToSuperFile(org.hpccsystems.ws.client.wrappers.gen.wsdfu.AddtoSuperfileRequestWrapper request)addToSuperFile.DFUCreateFileWrappercreateFile(String fileName, String cluster, String eclRecordDefinition, int expirySeconds)Create a new (unpublished), uncompressed dfu file.DFUCreateFileWrappercreateFile(String fileName, String cluster, String eclRecordDefinition, int expirySeconds, Boolean compressed)Create a new (unpublished) dfu file.DFUCreateFileWrappercreateFile(String fileName, String cluster, String eclRecordDefinition, int expirySeconds, Boolean compressed, DFUFileTypeWrapper filetype, String requestid)Create a new (unpublished) dfu file.DFUCreateFileWrappercreateFile(String fileName, String cluster, String eclRecordDefinition, String[] partitionHostMap, int expirySeconds)Create a new (unpublished) dfu file.DFUCreateFileWrappercreateFileAndAcquireAccess(String fileName, String cluster, String eclRecordDefinition, int expirySeconds, Boolean compressed, DFUFileTypeWrapper type, String requestId)Create a new (unpublished) dfu file.DFUCreateFileWrappercreateFileAndAcquireAccess(String fileName, String cluster, String eclRecordDefinition, String[] partitionHostMap, int expirySeconds, Boolean returnBinTypeInfo, Boolean returnJsonTypeInfo, org.hpccsystems.ws.client.gen.axis2.wsdfu.v1_39.FileAccessRole accessrole, org.hpccsystems.ws.client.gen.axis2.wsdfu.v1_39.SecAccessType accesstype)Create a new (unpublished) dfu file.org.hpccsystems.ws.client.wrappers.gen.wsdfu.AddtoSuperfileResponseWrappercreateSuperfile(String superfilename, String[] subfiles)Create super fileList<DFUResultWrapper>deleteFiles(Set<String> files, String cluster)Delete files.voiddeleteSuperFileSubfiles(String superfile, List<String> subfiles)Delete super file subfiles.static HPCCWsDFUClientget(String protocol, String targetHost, String targetPort, String user, String pass)Gets the.static HPCCWsDFUClientget(String protocol, String targetHost, String targetPort, String user, String pass, int timeout)Gets the.static HPCCWsDFUClientget(Connection connection)Gets the.EclRecordWrappergetDatasetFields(String datasetname, String clusterName, String fieldSeparator)This method retrieves a list of columns for a THOR or CSV dataset.org.apache.axis2.client.StubgetDefaultStub()Gets the default stub.org.hpccsystems.ws.client.gen.axis2.wsdfu.latest.DFUSearchDataResponsegetDFUData(String openLogicalName, String cluster, boolean roxieSelections, int chooseFile, int count, boolean schemaOnly, long startIndex)Deprecated.org.hpccsystems.ws.client.wrappers.gen.wsdfu.DFUSearchDataResponseWrappergetDFUData(org.hpccsystems.ws.client.wrappers.gen.wsdfu.DFUSearchDataRequestWrapper req)Return wrapped response from WsDFU DFUSearchData method requests.DFUFileAccessInfoWrappergetFileAccess(String filename, String clustername, int expiryseconds, String jobid)To be used in conjunction with DAFILESRV's rowservice distributed file read/write stream.DFUFileAccessInfoWrappergetFileAccess(org.hpccsystems.ws.client.gen.axis2.wsdfu.v1_39.SecAccessType accesstype, String filename, String clustername, int expiryseconds, String jobid, boolean includejsonTypeInfo, boolean includebinTypeInfo, boolean requestfileinfo)To be used in conjunction with DAFILESRV's rowservice distributed file read stream.StringgetFileAccessBlob(String filename, String clustername, int expiryseconds, String jobid)getFileAccessBlob The response is to be used in conjunction with DAFILESRV's rowservice distributed file read/write stream.StringgetFileAccessBlob(org.hpccsystems.ws.client.gen.axis2.wsdfu.v1_39.SecAccessType accesstype, String filename, String clustername, int expiryseconds, String jobid)getFileAccessBlob - HPCC 7.0.x version The response is to be used in conjunction with DAFILESRV's rowservice distributed file read stream.NodeListgetFileData(String logicalname, Long beginrow, Integer numrows, String clustername)Gets the file data.List<DFUDataColumnWrapper>getFileDataColumns(String logicalname, String clustername)getFileDataColumns.DFUFileDetailWrappergetFileDetails(String logicalname, String clustername)Gets the file details.DFUFileDetailWrappergetFileDetails(String logicalname, String clustername, boolean jsonTypeInfo, boolean binTypeInfo)Gets the file details.DFUInfoWrappergetFileInfo(String logicalname, String clustername)Gets the file info.DFUInfoWrappergetFileInfo(String logicalname, String clustername, boolean jsonTypeInfo, boolean binTypeInfo)Gets the file info.List<DFUDataColumnWrapper>getFileMetaData(String logicalname, String clustername)Use this function to retrieve file metadata such as column information, for superfiles the metadata from the first subfile will be returned.List<DFULogicalFileWrapper>getFiles(String scope)Gets the files.StringgetFirstRow(String datasetname, String clustername)Returns the first row of data for a dataset.List<DFULogicalFileWrapper>getLogicalFiles(String filename, String cluster, int firstN, int pageStartFrom, int pageSize)Get array of logical files on target HPCC system based on input parameters.StringgetServiceURI()Gets the service URI.static intgetServiceWSDLPort()Gets the service WSDL port.static StringgetServiceWSDLURL()Gets the service WSDLURL.String[]getSuperFileSubfiles(String filename)Gets the super file subfiles.protected voidinitWsDFUClientStub(Connection conn)Initializes the service's underlying stub Should only be used by constructors.booleanping()Ping.voidpublishFile(String fileId, String eclRecordDefinition, long totalRecords, long fileSize)Publishes file created by WsDFUCreateFile.voidpublishFile(String fileId, String eclRecordDefinition, long totalRecords, long fileSize, Boolean overwrite)Publishes file created by WsDFUCreateFile.List<DFULogicalFileWrapper>searchFiles(String logicalFilename, String cluster)searchFiles.List<DFULogicalFileWrapper>searchFiles(String logicalFilename, String cluster, Integer pagesize, Integer pageStartFrom)searchFilesList<DFULogicalFileWrapper>searchFiles(String logicalFilename, String cluster, Integer pagesize, Integer pageStartFrom, HPCCWsDFUClient.DFUQueryFileType queryfiletype)searchFilesList<DFULogicalFileWrapper>searchFiles(org.hpccsystems.ws.client.wrappers.gen.wsdfu.DFUQueryRequestWrapper request)searchFiles Note, DFUQueryFileType.getText() can be used to populate DFUQueryRequestWrapper.setFileType-
Methods inherited from class org.hpccsystems.ws.client.BaseHPCCWsClient
compatibilityCheck, compatibilityCheck, equals, fastRefresh, fullRefresh, getConnectionURL, getInitError, getServiceVersion, getServiceVersion, getServiceWSDLPort, getServiceWSDLURL, getStubConnectionTO, getTargetESPInterfaceVersion, getTargetHPCCBuildVersion, getVerbose, handleECLExceptions, handleECLExceptions, handleEspExceptions, handleEspExceptions, handleEspSoapFaults, handleEspSoapFaults, hashCode, 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
-
WSDFUURI
public static final String WSDFUURI
ConstantWSDFUURI="/WsDFU/"- See Also:
- Constant Field Values
-
ROW_ELEMENT
public static final String ROW_ELEMENT
ConstantROW_ELEMENT="Row"- See Also:
- Constant Field Values
-
DATASET_ELEMENT
public static final String DATASET_ELEMENT
ConstantDATASET_ELEMENT="Dataset"- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HPCCWsDFUClient
protected HPCCWsDFUClient(Connection baseConnection)
Instantiates a new HPCC ws DFU client.- Parameters:
baseConnection- the base connection
-
-
Method Detail
-
getServiceURI
public String getServiceURI()
Gets the service URI.- Specified by:
getServiceURIin 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.AxisFaultGets the default stub.- Specified by:
getDefaultStubin classBaseHPCCWsClient- Returns:
- the default stub
- Throws:
org.apache.axis2.AxisFault- the axis fault
-
get
public static HPCCWsDFUClient get(Connection connection)
Gets the.- Parameters:
connection- the connection- Returns:
- the HPCC ws DFU client
-
get
public static HPCCWsDFUClient 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 DFU client
-
get
public static HPCCWsDFUClient 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 DFU client
-
initWsDFUClientStub
protected void initWsDFUClientStub(Connection conn)
Initializes the service's underlying stub Should only be used by constructors.- Parameters:
conn- -- All connection settings included
-
getFileInfo
public DFUInfoWrapper getFileInfo(String logicalname, String clustername) throws Exception, ArrayOfEspExceptionWrapper
Gets the file info.- Parameters:
logicalname- - logical file to get file info for, can start with '~' or notclustername- - Optional. If specified, the cluster on which to search for the file- Returns:
- a DFUInfoResponse object containing the file info
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getFileInfo
public DFUInfoWrapper getFileInfo(String logicalname, String clustername, boolean jsonTypeInfo, boolean binTypeInfo) throws Exception, ArrayOfEspExceptionWrapper
Gets the file info.- Parameters:
logicalname- logical file name, can start with ~clustername- optional, if specified the cluster name used in the searchjsonTypeInfo- want record structure information returned as JSONbinTypeInfo- want record structure information returned in binary format- Returns:
- the file info
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getFileData
public NodeList getFileData(String logicalname, Long beginrow, Integer numrows, String clustername) throws Exception, ArrayOfEspExceptionWrapper
Gets the file data.- Parameters:
logicalname- - logical file to retrieve data forbeginrow- - beginning row to retrieve data fromnumrows- - number of rows of data to retrieveclustername- - Optional. If specified, the cluster on which to find the logical file.- Returns:
- an XML Element object holding the '<Row>' elements containing data.
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getFiles
public List<DFULogicalFileWrapper> getFiles(String scope) throws Exception, ArrayOfEspExceptionWrapper
Gets the files.- Parameters:
scope- - file scope/directory to return files for- Returns:
- an array of DFULogicalFile objects
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
createSuperfile
public org.hpccsystems.ws.client.wrappers.gen.wsdfu.AddtoSuperfileResponseWrapper createSuperfile(String superfilename, String[] subfiles) throws Exception, ArrayOfEspExceptionWrapper
Create super file- Parameters:
superfilename- super file namesubfiles- sub files- Returns:
- Add to super file request object
- Throws:
Exception- general exceptionArrayOfEspExceptionWrapper- array of esp exception wrapper
-
addToSuperFile
public org.hpccsystems.ws.client.wrappers.gen.wsdfu.AddtoSuperfileResponseWrapper addToSuperFile(org.hpccsystems.ws.client.wrappers.gen.wsdfu.AddtoSuperfileRequestWrapper request) throws Exception, ArrayOfEspExceptionWrapperaddToSuperFile.
- Parameters:
request- - User provided request wrapper- Returns:
- add to super file response object
- Throws:
Exception- general exceptionArrayOfEspExceptionWrapper- array of esp exception wrapper
-
getSuperFileSubfiles
public String[] getSuperFileSubfiles(String filename) throws Exception, ArrayOfEspExceptionWrapper
Gets the super file subfiles.- Parameters:
filename- the filename- Returns:
- the super file subfiles
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getFileMetaData
public List<DFUDataColumnWrapper> getFileMetaData(String logicalname, String clustername) throws Exception, ArrayOfEspExceptionWrapper
Use this function to retrieve file metadata such as column information, for superfiles the metadata from the first subfile will be returned.- Parameters:
logicalname- - Logical filename.clustername- - Optional - The cluster the logical filename is associated with.- Returns:
- ArrayList of DFUDataColumnInfo
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getFileDataColumns
public List<DFUDataColumnWrapper> getFileDataColumns(String logicalname, String clustername) throws Exception, ArrayOfEspExceptionWrapper
getFileDataColumns.
- Parameters:
logicalname- - logical filename to retrieve the dfu data columns for. Currently this method/service call functions for THOR files but will return nothing for CSV/XML/FLAT data filesclustername- - optional. The cluster the logical filename is associated with.- Returns:
- ArrayList of DFUDataColumns
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getDatasetFields
public EclRecordWrapper getDatasetFields(String datasetname, String clusterName, String fieldSeparator) throws Exception, ArrayOfEspExceptionWrapper
This method retrieves a list of columns for a THOR or CSV dataset. -if THOR, this is a straightforward service call to get the columns. -if CSV, depending on whether or not the CSV was sprayed or output by thor, it may or may not - have a record definition associated with it. If it doesn't, the number of fields in the CSV - is calculated by retrieving the first line and splitting it on the separator, and returning - a list of string Field1, Field2, etc. fields (that match the standard CSV field naming conventions.)- Parameters:
datasetname- - the name of the dataset to get dataset fields for. Can begin with '~' or not.clusterName- - optional. If given, the name of the cluster associated with the dataset.fieldSeparator- - optional. if given, and if the file being retrieved is a csv file, and if no field definitions exist for that csv,. this separator will be used rather than the separator defined during spraying when splitting up the first line of the file to define the number of fields- Returns:
- an ArrayList of DFUDataColumns containing the name and field type.
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getFirstRow
public String getFirstRow(String datasetname, String clustername) throws Exception, ArrayOfEspExceptionWrapper
Returns the first row of data for a dataset.- Parameters:
datasetname- - logical filename, with or without '~' at the beginningclustername- - optional. name of the cluster the file's associated with- Returns:
- a String of data representing the first row in the file.
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getLogicalFiles
public List<DFULogicalFileWrapper> getLogicalFiles(String filename, String cluster, int firstN, int pageStartFrom, int pageSize) throws Exception, ArrayOfEspExceptionWrapper
Get array of logical files on target HPCC system based on input parameters.- Parameters:
filename- the filenamecluster- --- NO LONGER USED ---firstN- the first NpageStartFrom- the page start frompageSize- the page size- Returns:
- the logical files
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getDFUData
public org.hpccsystems.ws.client.wrappers.gen.wsdfu.DFUSearchDataResponseWrapper getDFUData(org.hpccsystems.ws.client.wrappers.gen.wsdfu.DFUSearchDataRequestWrapper req) throws Exception, ArrayOfEspExceptionWrapperReturn wrapped response from WsDFU DFUSearchData method requests.- Parameters:
req- aDFUSearchDataRequestWrapperobject.- Returns:
- a
DFUSearchDataResponseWrapperobject. - Throws:
Exception- aExceptionobject.ArrayOfEspExceptionWrapper- aArrayOfEspExceptionWrapperobject.
-
getDFUData
@Deprecated public org.hpccsystems.ws.client.gen.axis2.wsdfu.latest.DFUSearchDataResponse getDFUData(String openLogicalName, String cluster, boolean roxieSelections, int chooseFile, int count, boolean schemaOnly, long startIndex) throws Exception, ArrayOfEspExceptionWrapper
Deprecated.Deprecated - use DFUSearchDataResponseWrapper getDFUData(DFUSearchDataRequestWrapper req) instead Return raw response from WsDFU DFUSearchData method requests.- Parameters:
openLogicalName- the open logical namecluster- the clusterroxieSelections- the roxie selectionschooseFile- the choose filecount- the countschemaOnly- the schema onlystartIndex- the start index- Returns:
- the DFU data
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
deleteSuperFileSubfiles
public void deleteSuperFileSubfiles(String superfile, List<String> subfiles) throws Exception, ArrayOfEspExceptionWrapper
Delete super file subfiles.- Parameters:
superfile- the superfilesubfiles- the subfiles- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
deleteFiles
public List<DFUResultWrapper> deleteFiles(Set<String> files, String cluster) throws Exception, ArrayOfEspExceptionWrapper
Delete files.- Parameters:
files- - list of filenames to delete - can use filename@cluster notationcluster- - name of cluster to delete from (will delete from all clusters if null) If provided, it is post-pended to files- Returns:
- list of results of file deletions
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
searchFiles
public List<DFULogicalFileWrapper> searchFiles(String logicalFilename, String cluster) throws Exception, ArrayOfEspExceptionWrapper
searchFiles.- Parameters:
logicalFilename- - the filename to search forcluster- - the cluster to search on- Returns:
- - collection of files matching the logicalfilename passed in
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
searchFiles
public List<DFULogicalFileWrapper> searchFiles(String logicalFilename, String cluster, Integer pagesize, Integer pageStartFrom) throws Exception, ArrayOfEspExceptionWrapper
searchFiles- Parameters:
logicalFilename- - the filename to search forcluster- - the cluster to search onpagesize- - the size of the pagepageStartFrom- - the location to search from- Returns:
- - collection of files matching the logicalfilename passed in
- Throws:
Exception- general exceptionArrayOfEspExceptionWrapper- array of esp exception wrapper
-
searchFiles
public List<DFULogicalFileWrapper> searchFiles(String logicalFilename, String cluster, Integer pagesize, Integer pageStartFrom, HPCCWsDFUClient.DFUQueryFileType queryfiletype) throws Exception, ArrayOfEspExceptionWrapper
searchFiles- Parameters:
logicalFilename- - the filename to search forcluster- - the cluster to search onpagesize- - the size of the pagepageStartFrom- - the location to search fromqueryfiletype- - the file type to query- Returns:
- - collection of files matching the logicalfilename passed in
- Throws:
Exception- general exceptionArrayOfEspExceptionWrapper- array of esp exception wrapper
-
searchFiles
public List<DFULogicalFileWrapper> searchFiles(org.hpccsystems.ws.client.wrappers.gen.wsdfu.DFUQueryRequestWrapper request) throws Exception, ArrayOfEspExceptionWrapper
searchFiles Note, DFUQueryFileType.getText() can be used to populate DFUQueryRequestWrapper.setFileType- Parameters:
request- - the search request- Returns:
- - collection of files matching the request passed in
- Throws:
Exception- general exceptionArrayOfEspExceptionWrapper- array of esp exception wrapper
-
getFileAccessBlob
public String getFileAccessBlob(org.hpccsystems.ws.client.gen.axis2.wsdfu.v1_39.SecAccessType accesstype, String filename, String clustername, int expiryseconds, String jobid) throws Exception, ArrayOfEspExceptionWrapper
getFileAccessBlob - HPCC 7.0.x version The response is to be used in conjunction with DAFILESRV's rowservice distributed file read stream. The response grants the holder access to the target file for the duration of 'expiryseconds' seconds since the Accessblob is generated. This version is to be used when targeting a 7.0.x HPCC (ESP and DAFILESRV)- Parameters:
accesstype- - the file access level to request to requestfilename- - the name of the target file to be accessedclustername- - the name of the target file's HPCC cluster (can be empty)expiryseconds- - the number of seconds file access is grantedjobid- - unique identifier for access token- Returns:
- - Access artifact to be propagated as part of DAFILESERV file access requests
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getFileAccessBlob
public String getFileAccessBlob(String filename, String clustername, int expiryseconds, String jobid) throws Exception, ArrayOfEspExceptionWrapper
getFileAccessBlob The response is to be used in conjunction with DAFILESRV's rowservice distributed file read/write stream. The response grants the holder access to the target file for the duration of 'expiryseconds' seconds since the Accessblob is generated.- Parameters:
filename- - the name of the target file to be accessedclustername- - the name of the target file's HPCC cluster (can be empty)expiryseconds- - the number of seconds file access is grantedjobid- - unique identifier for access token- Returns:
- - Access artifact to be propagated as part of DAFILESERV file access requests
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getFileAccess
public DFUFileAccessInfoWrapper getFileAccess(org.hpccsystems.ws.client.gen.axis2.wsdfu.v1_39.SecAccessType accesstype, String filename, String clustername, int expiryseconds, String jobid, boolean includejsonTypeInfo, boolean includebinTypeInfo, boolean requestfileinfo) throws Exception, ArrayOfEspExceptionWrapper
To be used in conjunction with DAFILESRV's rowservice distributed file read stream. The response wrapper provides access to the 'accessblob' which grants the holder read access to the target file for the duration of 'expiryseconds' seconds. Other access details can be fetched from the wrapper. since the Accessblob is generated.- Parameters:
accesstype- HPCC 7.0.x version - the file access level to request to requestfilename- - the name of the target file to be accessedclustername- - the name of the target file's HPCC cluster (can be empty)expiryseconds- - the number of seconds file access is grantedjobid- - unique identifier for access tokenincludejsonTypeInfo- - flag to request file info in JSON formatincludebinTypeInfo- - flag to request file info in Binary formatrequestfileinfo- the requestfileinfo- Returns:
- - Access artifact to be propagated as part of DAFILESERV file access requests
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getFileAccess
public DFUFileAccessInfoWrapper getFileAccess(String filename, String clustername, int expiryseconds, String jobid) throws Exception, ArrayOfEspExceptionWrapper
To be used in conjunction with DAFILESRV's rowservice distributed file read/write stream. The response wrapper provides access to the 'accessblob' which grants the holder read access to the target file for the duration of 'expiryseconds' seconds. Other access details can be fetched from the wrapper.- Parameters:
filename- - the name of the target file to be accessedclustername- - the name of the target file's HPCC cluster (can be empty)expiryseconds- - the number of seconds file access is grantedjobid- - unique identifier for access token- Returns:
- - Access artifact to be propagated as part of DAFILESERV file access requests
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
createFile
public DFUCreateFileWrapper createFile(String fileName, String cluster, String eclRecordDefinition, String[] partitionHostMap, int expirySeconds) throws Exception, ArrayOfEspExceptionWrapper
Create a new (unpublished) dfu file. Does not request all file metadata. DAFILESERV fileaccess token is requested- Parameters:
fileName- the file namecluster- the clustereclRecordDefinition- the ecl record definitionpartitionHostMap- Array declaring the Filepart[i] to Node mappingexpirySeconds- the expiry seconds- Returns:
- the DFU create file wrapper
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
createFileAndAcquireAccess
public DFUCreateFileWrapper createFileAndAcquireAccess(String fileName, String cluster, String eclRecordDefinition, String[] partitionHostMap, int expirySeconds, Boolean returnBinTypeInfo, Boolean returnJsonTypeInfo, org.hpccsystems.ws.client.gen.axis2.wsdfu.v1_39.FileAccessRole accessrole, org.hpccsystems.ws.client.gen.axis2.wsdfu.v1_39.SecAccessType accesstype) throws Exception, ArrayOfEspExceptionWrapper
Create a new (unpublished) dfu file. All file metadata can be requested. DAFILESERV fileaccess token is requested- Parameters:
fileName- the file namecluster- the clustereclRecordDefinition- the ecl record definitionpartitionHostMap- Array declaring the Filepart[i] to Node mappingexpirySeconds- the expiry secondsreturnBinTypeInfo- the return bin type inforeturnJsonTypeInfo- the return json type infoaccessrole- the accessroleaccesstype- the accesstype- Returns:
- the DFU create file wrapper
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
createFile
public DFUCreateFileWrapper createFile(String fileName, String cluster, String eclRecordDefinition, int expirySeconds) throws Exception, ArrayOfEspExceptionWrapper
Create a new (unpublished), uncompressed dfu file. JSON based info will be requested -- appropriate for HPCC post 7.2.0 DAFILESERV fileaccess token is requested- Parameters:
fileName- the file namecluster- the clustereclRecordDefinition- the ecl record definitionexpirySeconds- the expiry seconds- Returns:
- the DFU create file wrapper
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
createFile
public DFUCreateFileWrapper createFile(String fileName, String cluster, String eclRecordDefinition, int expirySeconds, Boolean compressed) throws Exception, ArrayOfEspExceptionWrapper
Create a new (unpublished) dfu file. JSON based info will be requested -- appropriate for HPCC post 7.2.0 DAFILESERV fileaccess token is requested- Parameters:
fileName- the file namecluster- the clustereclRecordDefinition- the ecl record definitionexpirySeconds- the expiry secondscompressed- the compressed- Returns:
- the DFU create file wrapper
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
createFile
public DFUCreateFileWrapper createFile(String fileName, String cluster, String eclRecordDefinition, int expirySeconds, Boolean compressed, DFUFileTypeWrapper filetype, String requestid) throws Exception, ArrayOfEspExceptionWrapper
Create a new (unpublished) dfu file. JSON based info will be requested -- appropriate for HPCC post 7.2.0 DAFILESERV fileaccess token is requested- Parameters:
fileName- the file namecluster- the clustereclRecordDefinition- the ecl record definitionexpirySeconds- the expiry secondscompressed- the compressedfiletype- - for example DFUFileTypeWrapper.Csvrequestid- the requestid- Returns:
- the DFU create file wrapper
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
createFileAndAcquireAccess
public DFUCreateFileWrapper createFileAndAcquireAccess(String fileName, String cluster, String eclRecordDefinition, int expirySeconds, Boolean compressed, DFUFileTypeWrapper type, String requestId) throws Exception, ArrayOfEspExceptionWrapper
Create a new (unpublished) dfu file. JSON based info will be requested -- appropriate for HPCC post 7.2.0 DAFILESERV fileaccess token is requested- Parameters:
fileName- the file namecluster- the clustereclRecordDefinition- the ecl record definitionexpirySeconds- the expiry secondscompressed- the compressedtype- - for example DFUFileTypeWrapper.CsvrequestId- the request id- Returns:
- the DFU create file wrapper
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
publishFile
public void publishFile(String fileId, String eclRecordDefinition, long totalRecords, long fileSize) throws Exception, ArrayOfEspExceptionWrapper
Publishes file created by WsDFUCreateFile. Requires fileId returned from createfile method call- Parameters:
fileId- the file ideclRecordDefinition- the ecl record definitiontotalRecords- the total recordsfileSize- the file size- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
publishFile
public void publishFile(String fileId, String eclRecordDefinition, long totalRecords, long fileSize, Boolean overwrite) throws Exception, ArrayOfEspExceptionWrapper
Publishes file created by WsDFUCreateFile. Requires fileId returned from createfile method call- Parameters:
fileId- the file ideclRecordDefinition- the ecl record definitiontotalRecords- the total recordsfileSize- the file sizeoverwrite- the overwrite- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getFileDetails
public DFUFileDetailWrapper getFileDetails(String logicalname, String clustername) throws Exception, ArrayOfEspExceptionWrapper
Gets the file details.- Parameters:
logicalname- - logical file to get file info for, can start with '~' or notclustername- - Optional. If specified, the cluster on which to search for the file- Returns:
- a DFUInfoResponse object containing the file info
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
getFileDetails
public DFUFileDetailWrapper getFileDetails(String logicalname, String clustername, boolean jsonTypeInfo, boolean binTypeInfo) throws Exception, ArrayOfEspExceptionWrapper
Gets the file details.- Parameters:
logicalname- logical file for request, can start with ~clustername- optionaljsonTypeInfo- true if record structure information in JSON format is to be returnedbinTypeInfo- true if record structure information in binary format is to be returned- Returns:
- DFUInfoResponse object containing the information
- Throws:
Exception- the exceptionArrayOfEspExceptionWrapper- the array of esp exception wrapper
-
-