Sparksee
6.0.2
|
Base TypeLoader class. More...
Instance Methods | |
(void) | - setLogError: |
Sets a log error file. More... | |
(void) | - setLogOff |
Truns off all the error reporting. More... | |
(void) | - registerListener: |
Registers a new listener. More... | |
(void) | - run |
Run the loader. More... | |
(void) | - runTwoPhases |
Run the loader for two phases loading. More... | |
(void) | - runNPhases: |
Run the loader for N phases loading. More... | |
(void) | - setRowReader: |
Sets the input data source. More... | |
(void) | - setGraph: |
Sets the graph where the data will be loaded. More... | |
(void) | - setLocale: |
Sets the locale that will be used to read the data. More... | |
(void) | - setType: |
Sets the type to be loaded. More... | |
(void) | - setAttributes: |
Sets the list of Attributes. More... | |
(void) | - setAttributePositions: |
Sets the list of attribute positions. More... | |
(void) | - setTimestampFormat: |
Sets a specific timestamp format. More... | |
(void) | - setFrequency: |
Sets the frequency of listener notification. More... | |
Base TypeLoader class.
Base class to load a node or edge type from a graph using a RowReader.
TypeLoaderListener can be registered to receive information about the progress of the load process by means of TypeLoaderEvent. The default frequency of notification to listeners is 100000.
Check out the 'Data import' section in the SPARKSEE User Manual for more details on this.
- (void) registerListener: | (STSTypeLoaderListener *) | tel |
Registers a new listener.
tel | TypeLoaderListener to be registered. |
- (void) run |
Run the loader.
System.ApplicationException | null |
System.IO.IOException | null |
Implemented in STSNodeTypeLoader, and STSEdgeTypeLoader.
- (void) runNPhases: | (int) | partitions |
Run the loader for N phases loading.
Firstly load all objects (and create them if necessary) and secondly loads all the attributes. But in this case, attributes are loaded one by one. This way, if there are three attributes, then 4 traverses are necessary.
Working on this mode it is necessary to build a temporary file.
partitions | [in] Number of horizontal partitions to perform the load. |
System.ApplicationException | null |
System.IO.IOException | null |
Implemented in STSNodeTypeLoader, and STSEdgeTypeLoader.
- (void) runTwoPhases |
Run the loader for two phases loading.
Firstly load all objects (and create them if necessary) and secondly loads all the attributes.
Working on this mode it is necessary to build a temporary file.
System.ApplicationException | null |
System.IO.IOException | null |
Implemented in STSNodeTypeLoader, and STSEdgeTypeLoader.
- (void) setAttributePositions: | (STSInt32List *) | attrsPos |
Sets the list of attribute positions.
attrsPos | [in] Attribute positions (column index >=0). |
- (void) setAttributes: | (STSAttributeList *) | attrs |
Sets the list of Attributes.
attrs | [in] Attribute identifiers to be loaded |
- (void) setFrequency: | (int) | freq |
Sets the frequency of listener notification.
freq | [in] Frequency in number of rows managed to notify progress to all listeners |
- (void) setGraph: | (STSGraph *) | graph |
Sets the graph where the data will be loaded.
graph | [in] Graph. |
- (void) setLocale: | (NSString *) | localeStr |
Sets the locale that will be used to read the data.
It should match the locale used in the rowreader.
localeStr | [in] The locale string for the read data. See CSVReader. |
- (void) setLogError: | (NSString *) | path |
Sets a log error file.
By default errors are thrown as a exception and the load process ends. If a log file is set, errors are logged there and the load process does not stop.
path | [in] The path to the error log file. |
System.IO.IOException | If bad things happen opening the file. |
- (void) setLogOff |
Truns off all the error reporting.
The log file will not be created and no exceptions for invalid data will be thrown. If you just want to turn off the logs, but abort at the first error what you should do is not call this method and not set a logError file.
- (void) setRowReader: | (STSRowReader *) | rr |
Sets the input data source.
rr | [in] Input RowReader. |
- (void) setTimestampFormat: | (NSString *) | timestampFormat |
Sets a specific timestamp format.
timestampFormat | [in] A string with the timestamp format definition. |
- (void) setType: | (int) | type |
Sets the type to be loaded.
type | [in] Type identifier. |