80 #ifndef END_POINT_DIR_H
81 #define END_POINT_DIR_H
83 #define DIR_MERGE_INDEX 0
84 #define DIR_SUB_CMD_ARG 1
85 #define DIR_INPUT_SEARCH_RGX 2
86 #define DIR_OUPUT_REPLACE_RGX 3
87 #define DIR_OUPUT_REPLACE_RGX_ARG 4
88 #define DIR_FILE_SORT_INDEXES 15
90 #define DIR_GET_FILE_SIZE 7
91 #define DIR_SET_CHUNK_SIZE 8
92 #define DIR_GET_ALL_CHUNK_TAGS 9
93 #define DIR_SET_ALL_CHUNK_TAGS 10
96 #define DIR_INPUT_ELASTIC_SIZE 11
97 #define DIR_OUTPUT_ELASTIC_SIZE 12
98 #define DIR_SET_OUTPUT_FILE_NAMES 13
116 std::string endpoint_info;
118 std::string sub_endpoint_info;
122 std::vector<std::string> dir_file_list;
123 int dir_file_list_current_index = 0;
125 std::string append_sub_endpoint_info;
126 std::vector<int> dir_chunk_size, dir_overlap_size;
128 int dir_data_merge_index = 0;
131 bool input_replace_regex_flag =
false;
132 std::regex *input_filter_regex;
134 bool output_replace_regex_flag =
false;
135 std::regex *output_replace_regex;
136 std::string output_replace_regex_aug;
137 std::string output_replace_regex_match_str;
139 bool has_ordering_on_file_list =
false;
140 std::vector<size_t> order_on_file_list;
150 endpoint_info = endpoint_info_p;
152 if (sub_endpoint_type ==
EP_HDF5)
155 std::vector<std::string> cmd_argv;
159 else if (sub_endpoint_type ==
EP_TDMS)
173 if (sub_endpoint !=
nullptr)
211 int Read(std::vector<unsigned long long> start, std::vector<unsigned long long> end,
void *data)
override;
221 int Write(std::vector<unsigned long long> start, std::vector<unsigned long long> end,
void *data)
override;
228 int Close()
override;
257 int Control(
int opt_code, std::vector<std::string> ¶meter_v)
override;
280 int WriteAttribute(
const std::string &name,
const void *data,
FTDataType data_type_p,
const size_t &data_length_p = 0)
override;
289 int ReadAttribute(
const std::string &name,
void *data,
FTDataType data_type_p,
const size_t &data_length_p = 0)
override;
Definition: ft_endpoint_dir.h:114
int ParseEndpointInfo() override
parse endpoint_info to my own info
Definition: ft_endpoint_dir.cpp:402
int PrintInfo() override
print information about the endpoint
Definition: ft_endpoint_dir.cpp:392
int Create() override
create the endpoint
Definition: ft_endpoint_dir.cpp:173
int WriteAttribute(const std::string &name, const void *data, FTDataType data_type_p, const size_t &data_length_p=0) override
Set the Attribute object Do not need to be pure virtual method.
Definition: ft_endpoint_dir.cpp:621
int Read(std::vector< unsigned long long > start, std::vector< unsigned long long > end, void *data) override
read the data from end-point
Definition: ft_endpoint_dir.cpp:194
int ReadAttribute(const std::string &name, void *data, FTDataType data_type_p, const size_t &data_length_p=0) override
Get the Attribute object Do not need to be pure virtual method.
Definition: ft_endpoint_dir.cpp:652
int ReadAllAttributeName(std::vector< std::string > &attr_name)
Read all attribute name.
Definition: ft_endpoint_dir.cpp:603
std::vector< std::string > GetDirFileVector() override
Get the Dir File Vector object.
Definition: ft_endpoint_dir.cpp:438
void SetDirFileVector(std::vector< std::string > &file_list) override
Set the Dir File Vector object.
Definition: ft_endpoint_dir.cpp:443
EndpointDIR()
Definition: ft_endpoint_dir.h:167
int GetMergeIndex()
Get the Merge Index object.
Definition: ft_endpoint_dir.cpp:592
~EndpointDIR()
Definition: ft_endpoint_dir.h:171
int Write(std::vector< unsigned long long > start, std::vector< unsigned long long > end, void *data) override
write the data to the end-point
Definition: ft_endpoint_dir.cpp:297
EndpointDIR(std::string endpoint_info_p)
Construct a new EndpointDIR object.
Definition: ft_endpoint_dir.h:148
void Map2MyType() override
call the finalize to close everything (like call Destractor)
Definition: ft_endpoint_dir.cpp:398
void SetMergeIndex(int index_p)
Set the Merge Index.
Definition: ft_endpoint_dir.cpp:582
int ExtractMeta() override
extracts metadata, possbile endpoint_ranks/endpoint_dim_size/data_element_type
Definition: ft_endpoint_dir.cpp:88
void SetDirChunkSize(std::vector< int > &dir_chunk_size_p) override
Set the Dir Chunk Size object.
Definition: ft_endpoint_dir.cpp:433
int GetAttributeSize(const std::string &name, FTDataType data_type_p) override
Definition: ft_endpoint_dir.cpp:664
void DisableCollectiveIO() override
Definition: ft_endpoint_dir.cpp:388
void EnableCollectiveIO() override
Definition: ft_endpoint_dir.cpp:384
int Open() override
open the endpoint
Definition: ft_endpoint_dir.cpp:181
int Control(int opt_code, std::vector< std::string > ¶meter_v) override
call a special operator on endpoint such as, enable collective I/O for HDF5 dump file from MEMORY to ...
Definition: ft_endpoint_dir.cpp:493
int Close() override
close the end-point
Definition: ft_endpoint_dir.cpp:379
std::vector< int > GetDirChunkSize() override
Get the Chunk Size object.
Definition: ft_endpoint_dir.cpp:428
Definition: ft_endpoint_hdf5.h:108
Define the class for the Endpoint used by ArrayUDF to store the data. It contains basic infomation fo...
Definition: ft_endpoint.h:106
void SetDataElementType(AuEndpointDataType data_element_type_p)
set the type of data element
Definition: ft_endpoint.cpp:104
void SetEndpointType(AuEndpointType endpoint_type_p)
Set the Endpoint Type object.
Definition: ft_endpoint.cpp:355
AuEndpointDataType data_element_type
Definition: ft_endpoint.h:113
virtual int Control(int opt_code, std::vector< std::string > ¶meter_v)
call a special operator on endpoint such as, enable collective I/O for HDF5 dump file from MEMORY to ...
Definition: ft_endpoint.cpp:421
Definition: ft_endpoint_tdms.h:130
#define OP_DISABLE_COLLECTIVE_IO
Definition: ft_endpoint_hdf5.h:103
#define OP_DISABLE_MPI_IO
Definition: ft_endpoint_hdf5.h:101
AuEndpointType
Definition: ft_type.h:95
@ EP_HDF5
Definition: ft_type.h:96
@ EP_DIR
Definition: ft_type.h:103
@ EP_TDMS
Definition: ft_type.h:105
AuEndpointDataType
Definition: ft_type.h:118