1 /** 2 * Copyright 2021-2022 Huawei Technologies Co., Ltd 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef MINDSPORE_CCSRC_DISTRIBUTED_PERSISTENT_STORAGE_CONSTANTS_H_ 18 #define MINDSPORE_CCSRC_DISTRIBUTED_PERSISTENT_STORAGE_CONSTANTS_H_ 19 20 #include <cstddef> 21 22 namespace mindspore { 23 namespace distributed { 24 namespace storage { 25 // Block and BlockMeta related. 26 constexpr char kFieldsLength[] = "field_length"; 27 constexpr char kOffset[] = "offset"; 28 constexpr char kShardShape[] = "shard_shape"; 29 constexpr char kShardRangeLowerBound[] = "shard_range_lower_bound"; 30 constexpr char kShardRangeUpperBound[] = "shard_range_upper_bound"; 31 constexpr char kHashSeq[] = "hash_seq"; 32 33 constexpr char kBlockFilePrefix[] = "block_"; 34 constexpr char kBlockMetaFilePrefix[] = "block_meta_"; 35 constexpr char kJsonSuffix[] = ".json"; 36 constexpr size_t JSON_SUFFIX_LENS = 5; 37 38 // Storage config related. 39 constexpr char kFileStoragePath[] = "file_storage_path"; 40 constexpr char kMaxBlockLength[] = "max_block_length"; 41 42 constexpr char kElementSize[] = "element_size"; 43 } // namespace storage 44 } // namespace distributed 45 } // namespace mindspore 46 47 #endif // MINDSPORE_CCSRC_DISTRIBUTED_PERSISTENT_STORAGE_CONSTANTS_H_ 48