public class HPCCWsDFUClient extends DataSingleton
Modifier and Type | Field and Description |
---|---|
static String |
DATASET_ELEMENT |
static String |
ROW_ELEMENT |
static String |
WSDFUURI |
Modifier | Constructor and Description |
---|---|
protected |
HPCCWsDFUClient(Connection baseConnection) |
protected |
HPCCWsDFUClient(String protocol,
String targetHost,
String targetPort,
String user,
String pass) |
protected |
HPCCWsDFUClient(WsDfuServiceSoapProxy wsDfuServiceSoapProxy) |
Modifier and Type | Method and Description |
---|---|
DFUCreateFileWrapper |
createFile(String fileName,
String cluster,
String eclRecordDefinition,
int expirySeconds)
Create a new (unpublished), uncompressed dfu file.
|
DFUCreateFileWrapper |
createFile(String fileName,
String cluster,
String eclRecordDefinition,
int expirySeconds,
Boolean compressed)
Create a new (unpublished) dfu file.
|
DFUCreateFileWrapper |
createFile(String fileName,
String cluster,
String eclRecordDefinition,
int expirySeconds,
Boolean compressed,
DFUFileTypeWrapper filetype,
String requestid)
Create a new (unpublished) dfu file.
|
DFUCreateFileWrapper |
createFile(String fileName,
String cluster,
String eclRecordDefinition,
String[] partitionHostMap,
int expirySeconds)
Create a new (unpublished) dfu file.
|
DFUCreateFileWrapper |
createFileAndAcquireAccess(String fileName,
String cluster,
String eclRecordDefinition,
int expirySeconds,
Boolean compressed,
DFUFileTypeWrapper type,
String requestId)
Create a new (unpublished) dfu file.
|
DFUCreateFileWrapper |
createFileAndAcquireAccess(String fileName,
String cluster,
String eclRecordDefinition,
String[] partitionHostMap,
int expirySeconds,
Boolean returnBinTypeInfo,
Boolean returnJsonTypeInfo,
FileAccessRole accessRole,
SecAccessType accessType)
Create a new (unpublished) dfu file.
|
List<DFUResult> |
deleteFiles(Set<String> files,
String cluster) |
boolean |
equals(Object aThat) |
protected void |
fastRefresh() |
protected void |
fullRefresh() |
static HPCCWsDFUClient |
get(Connection connection) |
EclRecordInfo |
getDatasetFields(String datasetname,
String clusterName,
String fieldSeparator)
This method retrieves a list of columns for a THOR or CSV dataset.
|
DFUSearchDataResponse |
getDFUData(String openLogicalName,
String cluster,
boolean roxieSelections,
int chooseFile,
int count,
boolean schemaOnly,
long startIndex)
Return raw response from WsDFU DFUSearchData method requests
|
DFUFileAccessInfoWrapper |
getFileAccess(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.
|
DFUFileAccessInfoWrapper |
getFileAccess(String filename,
String clustername,
int expiryseconds,
String jobid)
To be used in conjunction with DAFILESRV's rowservice distributed file read/write stream.
|
String |
getFileAccessBlob(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.
|
String |
getFileAccessBlob(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.
|
NodeList |
getFileData(String logicalname,
Long beginrow,
Integer numrows,
String clustername) |
List<DFUDataColumnInfo> |
getFileDataColumns(String logicalname,
String clustername) |
DFUFileDetailInfo |
getFileDetails(String logicalname,
String clustername) |
DFUFileDetailInfo |
getFileDetails(String logicalname,
String clustername,
boolean jsonTypeInfo,
boolean binTypeInfo) |
DFUInfoResponse |
getFileInfo(String logicalname,
String clustername) |
DFUInfoResponse |
getFileInfo(String logicalname,
String clustername,
boolean jsonTypeInfo,
boolean binTypeInfo) |
DFUDataColumn[] |
getFileMetaData(String logicalname,
String clustername)
Deprecated.
|
List<DFUDataColumnInfo> |
getFileMetaDataInfo(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<DFULogicalFileInfo> |
getFiles(String scope) |
String |
getFirstRow(String datasetname,
String clustername)
Returns the first row of data for a dataset
|
String |
getInitError()
Returns error message encountered during initialization of wsdfuclient.
|
List<DFULogicalFileInfo> |
getLogicalFiles(String filename,
String cluster,
int firstN,
int pageStartFrom,
int pageSize)
Get array of logical files on target HPCC system based on input parameters
|
static int |
getOriginalPort() |
static URL |
getOriginalURL() |
static String |
getOriginalWSDLURL()
Provides the WSDL URL originally used to create the underlying stub code
|
WsDfuServiceSoapProxy |
getSoapProxy()
Provides soapproxy object for HPCCWsDFUClient which can be used to access the web service methods directly
|
int |
hashCode() |
boolean |
hasInitError()
Should be called after instantiation to confirm
Successful initialization.
|
protected boolean |
isComplete() |
void |
publishFile(String fileId,
String eclRecordDefinition,
long totalRecords,
long fileSize)
Publishes file created by WsDFUCreateFile.
|
void |
publishFile(String fileId,
String eclRecordDefinition,
long totalRecords,
long fileSize,
Boolean overwrite)
Publishes file created by WsDFUCreateFile.
|
List<DFULogicalFileInfo> |
searchFiles(String logicalFilename,
String cluster)
searchFiles
|
void |
setVerbose(boolean verbose) |
monitor
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
public static final String WSDFUURI
public static final String ROW_ELEMENT
public static final String DATASET_ELEMENT
protected HPCCWsDFUClient(WsDfuServiceSoapProxy wsDfuServiceSoapProxy)
wsDfuServiceSoapProxy
- protected HPCCWsDFUClient(Connection baseConnection)
baseConnection
- protected HPCCWsDFUClient(String protocol, String targetHost, String targetPort, String user, String pass)
protocol
- - http or httpstargetHost
- server IP/name of the HPCC ClustertargetPort
- - port of the HPCC Clusteruser
- - username to use when connecting to the HPCC Clusterpass
- - Password to use when connecting to the HPCC Clusterpublic static URL getOriginalURL() throws MalformedURLException
MalformedURLException
public static int getOriginalPort() throws MalformedURLException
MalformedURLException
public static HPCCWsDFUClient get(Connection connection)
public boolean hasInitError()
public String getInitError()
public void setVerbose(boolean verbose)
verbose
- - sets verbose modepublic WsDfuServiceSoapProxy getSoapProxy() throws Exception
Exception
public DFUInfoResponse getFileInfo(String logicalname, String clustername) throws Exception
logicalname
- - logical file to get file info for, can start with '~' or notclustername
- - Optional. If specified, the cluster on which to search for the fileException
public DFUInfoResponse getFileInfo(String logicalname, String clustername, boolean jsonTypeInfo, boolean binTypeInfo) throws Exception
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 formatException
public NodeList getFileData(String logicalname, Long beginrow, Integer numrows, String clustername) throws Exception
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.Exception
public List<DFULogicalFileInfo> getFiles(String scope) throws Exception
scope
- - file scope/directory to return files forException
public List<DFUDataColumnInfo> getFileMetaDataInfo(String logicalname, String clustername) throws Exception
logicalname
- - Logical filename.clustername
- - Optional - The cluster the logical filename is associated with.Exception
@Deprecated public DFUDataColumn[] getFileMetaData(String logicalname, String clustername) throws Exception
logicalname
- - Logical filename.clustername
- - Optional - The cluster the logical filename is associated with.Exception
public List<DFUDataColumnInfo> getFileDataColumns(String logicalname, String clustername) throws Exception
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.Exception
public static String getOriginalWSDLURL()
public EclRecordInfo getDatasetFields(String datasetname, String clusterName, String fieldSeparator) throws Exception
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 fieldsException
public String getFirstRow(String datasetname, String clustername) throws Exception
datasetname
- - logical filename, with or without '~' at the beginningclustername
- - optional. name of the cluster the file's associated withException
public List<DFULogicalFileInfo> getLogicalFiles(String filename, String cluster, int firstN, int pageStartFrom, int pageSize) throws Exception
filename
- cluster
- --- NO LONGER USED ---firstN
- pageStartFrom
- pageSize
- Exception
public DFUSearchDataResponse getDFUData(String openLogicalName, String cluster, boolean roxieSelections, int chooseFile, int count, boolean schemaOnly, long startIndex) throws Exception
openLogicalName
- cluster
- roxieSelections
- chooseFile
- count
- schemaOnly
- startIndex
- Exception
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
public List<DFUResult> deleteFiles(Set<String> files, String cluster) throws Exception
files
- - list of filenames to deletecluster
- - name of cluster to delete from (will delete from all clusters if null)Exception
public List<DFULogicalFileInfo> searchFiles(String logicalFilename, String cluster) throws Exception
logicalFilename
- - the filename to search forcluster
- - the cluster to search onException
public String getFileAccessBlob(SecAccessType accesstype, String filename, String clustername, int expiryseconds, String jobid) throws Exception
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 tokenException
public String getFileAccessBlob(String filename, String clustername, int expiryseconds, String jobid) throws Exception
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 tokenException
public DFUFileAccessInfoWrapper getFileAccess(SecAccessType accesstype, String filename, String clustername, int expiryseconds, String jobid, boolean includejsonTypeInfo, boolean includebinTypeInfo, boolean requestfileinfo) throws Exception
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 formatException
public DFUFileAccessInfoWrapper getFileAccess(String filename, String clustername, int expiryseconds, String jobid) throws Exception
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 tokenException
public DFUCreateFileWrapper createFile(String fileName, String cluster, String eclRecordDefinition, String[] partitionHostMap, int expirySeconds) throws Exception
fileName
- cluster
- eclRecordDefinition
- partitionHostMap
- Array declaring the Filepart[i] to Node mappingexpirySeconds
- Exception
public DFUCreateFileWrapper createFileAndAcquireAccess(String fileName, String cluster, String eclRecordDefinition, String[] partitionHostMap, int expirySeconds, Boolean returnBinTypeInfo, Boolean returnJsonTypeInfo, FileAccessRole accessRole, SecAccessType accessType) throws Exception
fileName
- cluster
- eclRecordDefinition
- partitionHostMap
- Array declaring the Filepart[i] to Node mappingexpirySeconds
- returnBinTypeInfo
- returnJsonTypeInfo
- accessRole
- accessType
- Exception
public DFUCreateFileWrapper createFile(String fileName, String cluster, String eclRecordDefinition, int expirySeconds) throws Exception
fileName
- cluster
- eclRecordDefinition
- expirySeconds
- Exception
public DFUCreateFileWrapper createFile(String fileName, String cluster, String eclRecordDefinition, int expirySeconds, Boolean compressed) throws Exception
fileName
- cluster
- eclRecordDefinition
- expirySeconds
- compressed
- Exception
public DFUCreateFileWrapper createFile(String fileName, String cluster, String eclRecordDefinition, int expirySeconds, Boolean compressed, DFUFileTypeWrapper filetype, String requestid) throws Exception
fileName
- cluster
- eclRecordDefinition
- expirySeconds
- compressed
- filetype
- - for example DFUFileTypeWrapper.Csvrequestid
- Exception
public DFUCreateFileWrapper createFileAndAcquireAccess(String fileName, String cluster, String eclRecordDefinition, int expirySeconds, Boolean compressed, DFUFileTypeWrapper type, String requestId) throws Exception
fileName
- cluster
- eclRecordDefinition
- expirySeconds
- compressed
- type
- - for example DFUFileTypeWrapper.CsvrequestId
- Exception
public void publishFile(String fileId, String eclRecordDefinition, long totalRecords, long fileSize) throws Exception
fileId
- eclRecordDefinition
- totalRecords
- fileSize
- Exception
public void publishFile(String fileId, String eclRecordDefinition, long totalRecords, long fileSize, Boolean overwrite) throws Exception
fileId
- eclRecordDefinition
- totalRecords
- fileSize
- overwrite
- Exception
public DFUFileDetailInfo getFileDetails(String logicalname, String clustername) throws Exception
logicalname
- - logical file to get file info for, can start with '~' or notclustername
- - Optional. If specified, the cluster on which to search for the fileException
public DFUFileDetailInfo getFileDetails(String logicalname, String clustername, boolean jsonTypeInfo, boolean binTypeInfo) throws Exception
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 returnedException
Copyright © 2019. All rights reserved.