SaveDataToFile
Function Usage
Save the archive or archive merging result based on the parameters set in the config file. The result is serialized based on the protobuf message defined in common/ArchiveResult.proto and saved to a local PC. The storage file name is ArchiveName_DIM_dim_NUM_count.archiveResult.
For example, demo_DIM_512_NUM_1000000.archiveResult records the clustering results of the demo whose data dimension is 512, which contains 1000000 data records.
To improve the usability of subsequent service integration, the current clustering archive result is saved in serialization mode using the messages defined by Protobuf. The default file permission is -rw-r--r--.
Exercise caution when using this API to process sensitive data. Before using this API, ensure that you have known the security risks to prevent the saved clustering result file from being abused and causing other losses.
Prototype
APP_ERROR SaveDataToFile(std::string dstFilename = "");
Parameter Description
Parameter |
Description |
|---|---|
dstFilename |
Path and file name of the clustering result. Set it as required. Otherwise, the clustering result is saved in the default file in the default path where the running program is located. |
Response Parameters
Data Structure |
Description |
|---|---|
APP_ERROR |
|