diff --git a/cpp/CHANGELOG.md b/cpp/CHANGELOG.md index a41bc23484..68cd3568b8 100644 --- a/cpp/CHANGELOG.md +++ b/cpp/CHANGELOG.md @@ -34,6 +34,7 @@ Please mark all change in change log and use the ticket from JIRA. - MS-586 - Remove BUILD_FAISS_WITH_MKL option - MS-590 - Refine cmake code to support cpplint - MS-600 - Reconstruct unittest code +- MS-602 - Remove zilliz namespace # Milvus 0.4.0 (2019-09-12) diff --git a/cpp/src/cache/Cache.h b/cpp/src/cache/Cache.h index 7818a2e6b7..62a7f13ca8 100644 --- a/cpp/src/cache/Cache.h +++ b/cpp/src/cache/Cache.h @@ -25,7 +25,6 @@ #include #include -namespace zilliz { namespace milvus { namespace cache { @@ -88,6 +87,5 @@ class Cache { } // namespace cache } // namespace milvus -} // namespace zilliz #include "cache/Cache.inl" diff --git a/cpp/src/cache/Cache.inl b/cpp/src/cache/Cache.inl index ebd8f3c25d..2ab6b3ffa6 100644 --- a/cpp/src/cache/Cache.inl +++ b/cpp/src/cache/Cache.inl @@ -17,7 +17,7 @@ -namespace zilliz { + namespace milvus { namespace cache { @@ -190,5 +190,5 @@ Cache::print() { } // namespace cache } // namespace milvus -} // namespace zilliz + diff --git a/cpp/src/cache/CacheMgr.h b/cpp/src/cache/CacheMgr.h index 11cd742a6a..f5e04f6509 100644 --- a/cpp/src/cache/CacheMgr.h +++ b/cpp/src/cache/CacheMgr.h @@ -24,7 +24,6 @@ #include #include -namespace zilliz { namespace milvus { namespace cache { @@ -70,6 +69,5 @@ class CacheMgr { } // namespace cache } // namespace milvus -} // namespace zilliz #include "cache/CacheMgr.inl" diff --git a/cpp/src/cache/CacheMgr.inl b/cpp/src/cache/CacheMgr.inl index b0c47b3dc3..23b2f0df74 100644 --- a/cpp/src/cache/CacheMgr.inl +++ b/cpp/src/cache/CacheMgr.inl @@ -16,7 +16,7 @@ // under the License. -namespace zilliz { + namespace milvus { namespace cache { @@ -142,4 +142,4 @@ CacheMgr::SetCapacity(int64_t capacity) { } // namespace cache } // namespace milvus -} // namespace zilliz + diff --git a/cpp/src/cache/CpuCacheMgr.cpp b/cpp/src/cache/CpuCacheMgr.cpp index 99a284f074..7cfe59e72e 100644 --- a/cpp/src/cache/CpuCacheMgr.cpp +++ b/cpp/src/cache/CpuCacheMgr.cpp @@ -21,7 +21,6 @@ #include -namespace zilliz { namespace milvus { namespace cache { @@ -72,4 +71,3 @@ CpuCacheMgr::GetIndex(const std::string& key) { } // namespace cache } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/cache/CpuCacheMgr.h b/cpp/src/cache/CpuCacheMgr.h index ad6087de7c..2f8c50991a 100644 --- a/cpp/src/cache/CpuCacheMgr.h +++ b/cpp/src/cache/CpuCacheMgr.h @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace cache { @@ -42,4 +41,3 @@ class CpuCacheMgr : public CacheMgr { } // namespace cache } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/cache/DataObj.h b/cpp/src/cache/DataObj.h index 80cc560e7c..eb58b70825 100644 --- a/cpp/src/cache/DataObj.h +++ b/cpp/src/cache/DataObj.h @@ -21,7 +21,6 @@ #include -namespace zilliz { namespace milvus { namespace cache { @@ -65,4 +64,3 @@ using DataObjPtr = std::shared_ptr; } // namespace cache } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/cache/GpuCacheMgr.cpp b/cpp/src/cache/GpuCacheMgr.cpp index 9c9e94eda9..a9eff6d3c3 100644 --- a/cpp/src/cache/GpuCacheMgr.cpp +++ b/cpp/src/cache/GpuCacheMgr.cpp @@ -22,7 +22,6 @@ #include #include -namespace zilliz { namespace milvus { namespace cache { @@ -84,4 +83,3 @@ GpuCacheMgr::GetIndex(const std::string& key) { } // namespace cache } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/cache/GpuCacheMgr.h b/cpp/src/cache/GpuCacheMgr.h index 15cdcae28f..8c0d4b9502 100644 --- a/cpp/src/cache/GpuCacheMgr.h +++ b/cpp/src/cache/GpuCacheMgr.h @@ -22,7 +22,6 @@ #include #include -namespace zilliz { namespace milvus { namespace cache { @@ -46,4 +45,3 @@ class GpuCacheMgr : public CacheMgr { } // namespace cache } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/cache/LRU.h b/cpp/src/cache/LRU.h index d6a5b9ace7..9b0eac0608 100644 --- a/cpp/src/cache/LRU.h +++ b/cpp/src/cache/LRU.h @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace cache { @@ -121,4 +120,3 @@ class LRU { } // namespace cache } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/config/ConfigMgr.cpp b/cpp/src/config/ConfigMgr.cpp index e006217fd2..5889f52fac 100644 --- a/cpp/src/config/ConfigMgr.cpp +++ b/cpp/src/config/ConfigMgr.cpp @@ -18,7 +18,6 @@ #include "config/ConfigMgr.h" #include "YamlConfigMgr.h" -namespace zilliz { namespace milvus { namespace server { @@ -30,4 +29,3 @@ ConfigMgr::GetInstance() { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/config/ConfigMgr.h b/cpp/src/config/ConfigMgr.h index e5336ee34d..40753beaa9 100644 --- a/cpp/src/config/ConfigMgr.h +++ b/cpp/src/config/ConfigMgr.h @@ -22,7 +22,6 @@ #include -namespace zilliz { namespace milvus { namespace server { @@ -60,4 +59,3 @@ class ConfigMgr { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/config/ConfigNode.cpp b/cpp/src/config/ConfigNode.cpp index ff27a0af75..cf148e4d29 100644 --- a/cpp/src/config/ConfigNode.cpp +++ b/cpp/src/config/ConfigNode.cpp @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -234,4 +233,3 @@ ConfigNode::DumpString(const std::string& prefix) const { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/config/ConfigNode.h b/cpp/src/config/ConfigNode.h index 937066dbf5..b7bf2c3af1 100644 --- a/cpp/src/config/ConfigNode.h +++ b/cpp/src/config/ConfigNode.h @@ -21,7 +21,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -94,4 +93,3 @@ class ConfigNode { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/config/YamlConfigMgr.cpp b/cpp/src/config/YamlConfigMgr.cpp index 02653d6fad..7153549544 100644 --- a/cpp/src/config/YamlConfigMgr.cpp +++ b/cpp/src/config/YamlConfigMgr.cpp @@ -20,7 +20,6 @@ #include -namespace zilliz { namespace milvus { namespace server { @@ -116,4 +115,3 @@ YamlConfigMgr::LoadConfigNode(const YAML::Node& node, ConfigNode& config) { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/config/YamlConfigMgr.h b/cpp/src/config/YamlConfigMgr.h index 743276b504..1c68bc883f 100644 --- a/cpp/src/config/YamlConfigMgr.h +++ b/cpp/src/config/YamlConfigMgr.h @@ -24,7 +24,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -62,4 +61,3 @@ class YamlConfigMgr : public ConfigMgr { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/core/build.sh b/cpp/src/core/build.sh old mode 100755 new mode 100644 diff --git a/cpp/src/core/knowhere/knowhere/adapter/ArrowAdapter.cpp b/cpp/src/core/knowhere/knowhere/adapter/ArrowAdapter.cpp index bc1dfbf13d..38227f43ab 100644 --- a/cpp/src/core/knowhere/knowhere/adapter/ArrowAdapter.cpp +++ b/cpp/src/core/knowhere/knowhere/adapter/ArrowAdapter.cpp @@ -17,7 +17,6 @@ #include "knowhere/adapter/ArrowAdapter.h" -namespace zilliz { namespace knowhere { ArrayPtr @@ -52,4 +51,3 @@ CopySchema(const SchemaPtr& origin) { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/adapter/ArrowAdapter.h b/cpp/src/core/knowhere/knowhere/adapter/ArrowAdapter.h index f4d0b348cf..75580cd163 100644 --- a/cpp/src/core/knowhere/knowhere/adapter/ArrowAdapter.h +++ b/cpp/src/core/knowhere/knowhere/adapter/ArrowAdapter.h @@ -23,7 +23,6 @@ #include "knowhere/common/Array.h" -namespace zilliz { namespace knowhere { ArrayPtr @@ -33,4 +32,3 @@ SchemaPtr CopySchema(const SchemaPtr& origin); } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/adapter/SptagAdapter.cpp b/cpp/src/core/knowhere/knowhere/adapter/SptagAdapter.cpp index 8a0ad69591..f4b1a7953f 100644 --- a/cpp/src/core/knowhere/knowhere/adapter/SptagAdapter.cpp +++ b/cpp/src/core/knowhere/knowhere/adapter/SptagAdapter.cpp @@ -19,7 +19,6 @@ #include "knowhere/adapter/Structure.h" #include "knowhere/index/vector_index/helpers/Definitions.h" -namespace zilliz { namespace knowhere { std::shared_ptr @@ -121,4 +120,3 @@ ConvertToDataset(std::vector query_results) { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/adapter/SptagAdapter.h b/cpp/src/core/knowhere/knowhere/adapter/SptagAdapter.h index 0889657cf9..9f92497562 100644 --- a/cpp/src/core/knowhere/knowhere/adapter/SptagAdapter.h +++ b/cpp/src/core/knowhere/knowhere/adapter/SptagAdapter.h @@ -23,7 +23,6 @@ #include "knowhere/common/Dataset.h" -namespace zilliz { namespace knowhere { std::shared_ptr @@ -39,4 +38,3 @@ DatasetPtr ConvertToDataset(std::vector query_results); } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/adapter/Structure.cpp b/cpp/src/core/knowhere/knowhere/adapter/Structure.cpp index 2cd69f3d10..44b068c792 100644 --- a/cpp/src/core/knowhere/knowhere/adapter/Structure.cpp +++ b/cpp/src/core/knowhere/knowhere/adapter/Structure.cpp @@ -20,7 +20,6 @@ #include #include -namespace zilliz { namespace knowhere { ArrayPtr @@ -86,4 +85,3 @@ ConstructFloatField(const std::string& name) { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/adapter/Structure.h b/cpp/src/core/knowhere/knowhere/adapter/Structure.h index 526dc91b73..6bde9ddfe6 100644 --- a/cpp/src/core/knowhere/knowhere/adapter/Structure.h +++ b/cpp/src/core/knowhere/knowhere/adapter/Structure.h @@ -23,7 +23,6 @@ #include "knowhere/common/Dataset.h" -namespace zilliz { namespace knowhere { extern ArrayPtr @@ -51,4 +50,3 @@ extern FieldPtr ConstructFloatField(const std::string& name); } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/adapter/VectorAdapter.h b/cpp/src/core/knowhere/knowhere/adapter/VectorAdapter.h index ae4ef998cd..2b16227bb3 100644 --- a/cpp/src/core/knowhere/knowhere/adapter/VectorAdapter.h +++ b/cpp/src/core/knowhere/knowhere/adapter/VectorAdapter.h @@ -17,7 +17,6 @@ #pragma once -namespace zilliz { namespace knowhere { #define GETTENSOR(dataset) \ @@ -27,4 +26,3 @@ namespace knowhere { auto rows = tensor->shape()[0]; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/Array.h b/cpp/src/core/knowhere/knowhere/common/Array.h index 89bbf6ccd7..71ad78b79b 100644 --- a/cpp/src/core/knowhere/knowhere/common/Array.h +++ b/cpp/src/core/knowhere/knowhere/common/Array.h @@ -22,7 +22,6 @@ #include "Schema.h" -namespace zilliz { namespace knowhere { using ArrayData = arrow::ArrayData; @@ -49,4 +48,3 @@ using Decimal128Array = arrow::Decimal128Array; using Decimal128ArrayPtr = std::shared_ptr; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/BinarySet.h b/cpp/src/core/knowhere/knowhere/common/BinarySet.h index 6d8580e071..6e6d53000e 100644 --- a/cpp/src/core/knowhere/knowhere/common/BinarySet.h +++ b/cpp/src/core/knowhere/knowhere/common/BinarySet.h @@ -25,7 +25,6 @@ #include "Id.h" -namespace zilliz { namespace knowhere { struct Binary { @@ -74,4 +73,3 @@ class BinarySet { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/Buffer.h b/cpp/src/core/knowhere/knowhere/common/Buffer.h index 42af87a09b..d95da18602 100644 --- a/cpp/src/core/knowhere/knowhere/common/Buffer.h +++ b/cpp/src/core/knowhere/knowhere/common/Buffer.h @@ -21,7 +21,6 @@ #include -namespace zilliz { namespace knowhere { using Buffer = arrow::Buffer; @@ -60,4 +59,3 @@ MakeMutableBuffer(uint8_t* data, const int64_t size) { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/Config.h b/cpp/src/core/knowhere/knowhere/common/Config.h index afb621d5e1..6191ecb771 100644 --- a/cpp/src/core/knowhere/knowhere/common/Config.h +++ b/cpp/src/core/knowhere/knowhere/common/Config.h @@ -19,7 +19,6 @@ #include -namespace zilliz { namespace knowhere { enum class METRICTYPE { @@ -55,4 +54,3 @@ struct Cfg { using Config = std::shared_ptr; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/Dataset.h b/cpp/src/core/knowhere/knowhere/common/Dataset.h index 4a4f4bdd80..1331239dd6 100644 --- a/cpp/src/core/knowhere/knowhere/common/Dataset.h +++ b/cpp/src/core/knowhere/knowhere/common/Dataset.h @@ -28,7 +28,6 @@ #include "Tensor.h" #include "knowhere/adapter/ArrowAdapter.h" -namespace zilliz { namespace knowhere { class Dataset; @@ -148,4 +147,3 @@ class Dataset { using DatasetPtr = std::shared_ptr; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/Exception.cpp b/cpp/src/core/knowhere/knowhere/common/Exception.cpp index 75d9ce39bb..4fef9529ac 100644 --- a/cpp/src/core/knowhere/knowhere/common/Exception.cpp +++ b/cpp/src/core/knowhere/knowhere/common/Exception.cpp @@ -20,7 +20,6 @@ #include "Log.h" #include "knowhere/common/Exception.h" -namespace zilliz { namespace knowhere { KnowhereException::KnowhereException(const std::string& msg) : msg(msg) { @@ -48,4 +47,3 @@ KnowhereException::what() const noexcept { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/Exception.h b/cpp/src/core/knowhere/knowhere/common/Exception.h index ec89c4d616..9ffc7838cf 100644 --- a/cpp/src/core/knowhere/knowhere/common/Exception.h +++ b/cpp/src/core/knowhere/knowhere/common/Exception.h @@ -20,7 +20,6 @@ #include #include -namespace zilliz { namespace knowhere { class KnowhereException : public std::exception { @@ -52,4 +51,3 @@ class KnowhereException : public std::exception { } while (false) } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/Id.h b/cpp/src/core/knowhere/knowhere/common/Id.h index 9686075874..1c82161684 100644 --- a/cpp/src/core/knowhere/knowhere/common/Id.h +++ b/cpp/src/core/knowhere/knowhere/common/Id.h @@ -17,13 +17,9 @@ #pragma once -//#include "zcommon/id/id.h" -// using ID = zilliz::common::ID; - #include #include -namespace zilliz { namespace knowhere { class ID { @@ -58,4 +54,3 @@ class ID { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/Log.h b/cpp/src/core/knowhere/knowhere/common/Log.h index 1ca78b155a..222d03d73e 100644 --- a/cpp/src/core/knowhere/knowhere/common/Log.h +++ b/cpp/src/core/knowhere/knowhere/common/Log.h @@ -19,7 +19,6 @@ #include "utils/easylogging++.h" -namespace zilliz { namespace knowhere { #define KNOWHERE_DOMAIN_NAME "[KNOWHERE] " @@ -33,4 +32,3 @@ namespace knowhere { #define KNOWHERE_LOG_FATAL LOG(FATAL) << KNOWHERE_DOMAIN_NAME } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/Schema.h b/cpp/src/core/knowhere/knowhere/common/Schema.h index 6dc4784e53..c90bac7572 100644 --- a/cpp/src/core/knowhere/knowhere/common/Schema.h +++ b/cpp/src/core/knowhere/knowhere/common/Schema.h @@ -21,7 +21,6 @@ #include -namespace zilliz { namespace knowhere { using DataType = arrow::DataType; @@ -32,4 +31,3 @@ using SchemaPtr = std::shared_ptr; using SchemaConstPtr = std::shared_ptr; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/Tensor.h b/cpp/src/core/knowhere/knowhere/common/Tensor.h index cd23933e96..ff957319e5 100644 --- a/cpp/src/core/knowhere/knowhere/common/Tensor.h +++ b/cpp/src/core/knowhere/knowhere/common/Tensor.h @@ -21,11 +21,9 @@ #include -namespace zilliz { namespace knowhere { using Tensor = arrow::Tensor; using TensorPtr = std::shared_ptr; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/Timer.cpp b/cpp/src/core/knowhere/knowhere/common/Timer.cpp index f4db63203c..fefe1e1705 100644 --- a/cpp/src/core/knowhere/knowhere/common/Timer.cpp +++ b/cpp/src/core/knowhere/knowhere/common/Timer.cpp @@ -19,7 +19,6 @@ #include "knowhere/common/Timer.h" -namespace zilliz { namespace knowhere { TimeRecorder::TimeRecorder(const std::string& header, int64_t log_level) : header_(header), log_level_(log_level) { @@ -99,4 +98,3 @@ TimeRecorder::ElapseFromBegin(const std::string& msg) { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/common/Timer.h b/cpp/src/core/knowhere/knowhere/common/Timer.h index b1557e4c20..7e01e88aa9 100644 --- a/cpp/src/core/knowhere/knowhere/common/Timer.h +++ b/cpp/src/core/knowhere/knowhere/common/Timer.h @@ -20,7 +20,6 @@ #include #include -namespace zilliz { namespace knowhere { class TimeRecorder { @@ -52,4 +51,3 @@ class TimeRecorder { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/Index.h b/cpp/src/core/knowhere/knowhere/index/Index.h index 613a8d049a..ffa685689b 100644 --- a/cpp/src/core/knowhere/knowhere/index/Index.h +++ b/cpp/src/core/knowhere/knowhere/index/Index.h @@ -25,7 +25,6 @@ #include "knowhere/common/Dataset.h" #include "knowhere/index/preprocessor/Preprocessor.h" -namespace zilliz { namespace knowhere { class Index { @@ -66,4 +65,3 @@ class Index { using IndexPtr = std::shared_ptr; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/IndexModel.h b/cpp/src/core/knowhere/knowhere/index/IndexModel.h index 64acc5ad22..1229e21f2c 100644 --- a/cpp/src/core/knowhere/knowhere/index/IndexModel.h +++ b/cpp/src/core/knowhere/knowhere/index/IndexModel.h @@ -20,7 +20,6 @@ #include #include "knowhere/common/BinarySet.h" -namespace zilliz { namespace knowhere { class IndexModel { @@ -35,4 +34,3 @@ class IndexModel { using IndexModelPtr = std::shared_ptr; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/IndexType.h b/cpp/src/core/knowhere/knowhere/index/IndexType.h index 64a2188790..e39b57bf44 100644 --- a/cpp/src/core/knowhere/knowhere/index/IndexType.h +++ b/cpp/src/core/knowhere/knowhere/index/IndexType.h @@ -17,7 +17,6 @@ #pragma once -namespace zilliz { namespace knowhere { enum class IndexType { @@ -28,4 +27,3 @@ enum class IndexType { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/preprocessor/Normalize.cpp b/cpp/src/core/knowhere/knowhere/index/preprocessor/Normalize.cpp index 2a31a22f16..f21c787abe 100644 --- a/cpp/src/core/knowhere/knowhere/index/preprocessor/Normalize.cpp +++ b/cpp/src/core/knowhere/knowhere/index/preprocessor/Normalize.cpp @@ -20,7 +20,7 @@ #include "knowhere/index/preprocessor/Normalize.h" // // -// namespace zilliz { +// // namespace knowhere { // // DatasetPtr @@ -54,4 +54,4 @@ //} // //} // namespace knowhere -//} // namespace zilliz +// diff --git a/cpp/src/core/knowhere/knowhere/index/preprocessor/Normalize.h b/cpp/src/core/knowhere/knowhere/index/preprocessor/Normalize.h index 9e918d56b8..572c447b27 100644 --- a/cpp/src/core/knowhere/knowhere/index/preprocessor/Normalize.h +++ b/cpp/src/core/knowhere/knowhere/index/preprocessor/Normalize.h @@ -21,7 +21,7 @@ //#include "preprocessor.h" // // -// namespace zilliz { +// // namespace knowhere { // // class NormalizePreprocessor : public Preprocessor { @@ -40,4 +40,4 @@ // // //} // namespace knowhere -//} // namespace zilliz +// diff --git a/cpp/src/core/knowhere/knowhere/index/preprocessor/Preprocessor.h b/cpp/src/core/knowhere/knowhere/index/preprocessor/Preprocessor.h index c04dbdf3dc..d1cb1817d6 100644 --- a/cpp/src/core/knowhere/knowhere/index/preprocessor/Preprocessor.h +++ b/cpp/src/core/knowhere/knowhere/index/preprocessor/Preprocessor.h @@ -21,7 +21,6 @@ #include "knowhere/common/Dataset.h" -namespace zilliz { namespace knowhere { class Preprocessor { @@ -33,4 +32,3 @@ class Preprocessor { using PreprocessorPtr = std::shared_ptr; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/FaissBaseIndex.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/FaissBaseIndex.cpp index 5e90da9d56..4fc9a82009 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/FaissBaseIndex.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/FaissBaseIndex.cpp @@ -23,7 +23,6 @@ #include "knowhere/index/vector_index/FaissBaseIndex.h" #include "knowhere/index/vector_index/helpers/FaissIO.h" -namespace zilliz { namespace knowhere { FaissBaseIndex::FaissBaseIndex(std::shared_ptr index) : index_(std::move(index)) { @@ -79,4 +78,3 @@ FaissBaseIndex::SealImpl() { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/FaissBaseIndex.h b/cpp/src/core/knowhere/knowhere/index/vector_index/FaissBaseIndex.h index bac4a2bf29..f3fceebb88 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/FaissBaseIndex.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/FaissBaseIndex.h @@ -23,7 +23,6 @@ #include "knowhere/common/BinarySet.h" -namespace zilliz { namespace knowhere { class FaissBaseIndex { @@ -44,4 +43,3 @@ class FaissBaseIndex { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVF.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVF.cpp index 332d31bce0..dc886b7383 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVF.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVF.cpp @@ -29,7 +29,6 @@ #include "knowhere/index/vector_index/helpers/Cloner.h" #include "knowhere/index/vector_index/helpers/FaissIO.h" -namespace zilliz { namespace knowhere { IndexModelPtr @@ -171,7 +170,7 @@ GPUIVF::CopyGpuToCpu(const Config& config) { VectorIndexPtr GPUIVF::Clone() { auto cpu_idx = CopyGpuToCpu(Config()); - return ::zilliz::knowhere::cloner::CopyCpuToGpu(cpu_idx, gpu_id_, Config()); + return knowhere::cloner::CopyCpuToGpu(cpu_idx, gpu_id_, Config()); } VectorIndexPtr @@ -201,4 +200,3 @@ GPUIndex::GetGpuDevice() { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVF.h b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVF.h index 347e255b87..8edd0fe30e 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVF.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVF.h @@ -23,7 +23,6 @@ #include "IndexIVF.h" #include "knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h" -namespace zilliz { namespace knowhere { class GPUIndex { @@ -95,4 +94,3 @@ class GPUIVF : public IVF, public GPUIndex { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFPQ.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFPQ.cpp index 7aa8f7db2a..077f0817da 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFPQ.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFPQ.cpp @@ -24,7 +24,6 @@ #include "knowhere/common/Exception.h" #include "knowhere/index/vector_index/IndexGPUIVFPQ.h" -namespace zilliz { namespace knowhere { IndexModelPtr @@ -68,4 +67,3 @@ GPUIVFPQ::CopyGpuToCpu(const Config& config) { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFPQ.h b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFPQ.h index 6d298e77e6..13ea1075ca 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFPQ.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFPQ.h @@ -21,7 +21,6 @@ #include "IndexGPUIVF.h" -namespace zilliz { namespace knowhere { class GPUIVFPQ : public GPUIVF { @@ -43,4 +42,3 @@ class GPUIVFPQ : public GPUIVF { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFSQ.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFSQ.cpp index bf2aa22474..1b4f4e9edb 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFSQ.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFSQ.cpp @@ -24,7 +24,6 @@ #include "knowhere/index/vector_index/IndexGPUIVFSQ.h" #include "knowhere/index/vector_index/IndexIVFSQ.h" -namespace zilliz { namespace knowhere { IndexModelPtr @@ -73,4 +72,3 @@ GPUIVFSQ::CopyGpuToCpu(const Config& config) { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFSQ.h b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFSQ.h index 5c6b4a038b..ed8013d77f 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFSQ.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexGPUIVFSQ.h @@ -22,7 +22,6 @@ #include "IndexGPUIVF.h" -namespace zilliz { namespace knowhere { class GPUIVFSQ : public GPUIVF { @@ -42,4 +41,3 @@ class GPUIVFSQ : public GPUIVF { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIDMAP.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIDMAP.cpp index 8d4ff16a1f..2371591b5c 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIDMAP.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIDMAP.cpp @@ -27,7 +27,6 @@ #include "knowhere/index/vector_index/IndexIDMAP.h" #include "knowhere/index/vector_index/helpers/FaissIO.h" -namespace zilliz { namespace knowhere { BinarySet @@ -269,4 +268,3 @@ GPUIDMAP::search_impl(int64_t n, const float* data, int64_t k, float* distances, } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIDMAP.h b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIDMAP.h index fd13b87e34..ec1cbb9e77 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIDMAP.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIDMAP.h @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace knowhere { class IDMAP : public VectorIndex, public FaissBaseIndex { @@ -97,4 +96,3 @@ class GPUIDMAP : public IDMAP, public GPUIndex { using GPUIDMAPPtr = std::shared_ptr; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVF.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVF.cpp index 13805ce14d..428710d355 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVF.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVF.cpp @@ -33,7 +33,6 @@ #include "knowhere/index/vector_index/IndexGPUIVF.h" #include "knowhere/index/vector_index/IndexIVF.h" -namespace zilliz { namespace knowhere { IndexModelPtr @@ -268,4 +267,3 @@ IVFIndexModel::SealImpl() { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVF.h b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVF.h index 088849c22a..ef9982fa30 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVF.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVF.h @@ -26,7 +26,6 @@ #include "VectorIndex.h" #include "faiss/IndexIVF.h" -namespace zilliz { namespace knowhere { using Graph = std::vector>; @@ -122,4 +121,3 @@ class IVFIndexModel : public IndexModel, public FaissBaseIndex { using IVFIndexModelPtr = std::shared_ptr; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFPQ.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFPQ.cpp index c0eda94310..03acbf31d7 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFPQ.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFPQ.cpp @@ -24,7 +24,6 @@ #include "knowhere/common/Exception.h" #include "knowhere/index/vector_index/IndexIVFPQ.h" -namespace zilliz { namespace knowhere { IndexModelPtr @@ -62,4 +61,3 @@ IVFPQ::Clone_impl(const std::shared_ptr& index) { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFPQ.h b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFPQ.h index f071c1e0fa..69aaa5090b 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFPQ.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFPQ.h @@ -22,7 +22,6 @@ #include "IndexIVF.h" -namespace zilliz { namespace knowhere { class IVFPQ : public IVF { @@ -44,4 +43,3 @@ class IVFPQ : public IVF { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFSQ.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFSQ.cpp index 5406211fa3..11e508549a 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFSQ.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFSQ.cpp @@ -24,7 +24,6 @@ #include "knowhere/index/vector_index/IndexIVFSQ.h" #include "knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h" -namespace zilliz { namespace knowhere { IndexModelPtr @@ -70,4 +69,3 @@ IVFSQ::CopyCpuToGpu(const int64_t& device_id, const Config& config) { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFSQ.h b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFSQ.h index 3a05ca9826..cac95faebf 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFSQ.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexIVFSQ.h @@ -22,7 +22,6 @@ #include "IndexIVF.h" -namespace zilliz { namespace knowhere { class IVFSQ : public IVF { @@ -44,4 +43,3 @@ class IVFSQ : public IVF { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexKDT.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexKDT.cpp index 6efb839384..c23a6ef61d 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexKDT.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexKDT.cpp @@ -30,7 +30,6 @@ #include "knowhere/common/Exception.h" #include "knowhere/index/vector_index/helpers/KDTParameterMgr.h" -namespace zilliz { namespace knowhere { BinarySet @@ -174,4 +173,3 @@ CPUKDTRNGIndexModel::Load(const BinarySet& binary) { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexKDT.h b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexKDT.h index 86737ac3dd..f6d436995b 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexKDT.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexKDT.h @@ -23,7 +23,6 @@ #include "VectorIndex.h" #include "knowhere/index/IndexModel.h" -namespace zilliz { namespace knowhere { class CPUKDTRNG : public VectorIndex { @@ -86,4 +85,3 @@ class CPUKDTRNGIndexModel : public IndexModel { using CPUKDTRNGIndexModelPtr = std::shared_ptr; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexNSG.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexNSG.cpp index b731f801b3..f5519b8240 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexNSG.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexNSG.cpp @@ -25,7 +25,6 @@ #include "knowhere/index/vector_index/nsg/NSG.h" #include "knowhere/index/vector_index/nsg/NSGIO.h" -namespace zilliz { namespace knowhere { BinarySet @@ -167,4 +166,3 @@ NSG::Seal() { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexNSG.h b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexNSG.h index 4371ddb65a..04a146d58a 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/IndexNSG.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/IndexNSG.h @@ -22,7 +22,6 @@ #include "VectorIndex.h" -namespace zilliz { namespace knowhere { namespace algo { @@ -63,4 +62,3 @@ class NSG : public VectorIndex { using NSGIndexPtr = std::shared_ptr(); } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/VectorIndex.h b/cpp/src/core/knowhere/knowhere/index/vector_index/VectorIndex.h index e96de885af..810c4d2ea4 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/VectorIndex.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/VectorIndex.h @@ -25,7 +25,6 @@ #include "knowhere/index/preprocessor/Preprocessor.h" #include "knowhere/index/vector_index/helpers/IndexParameter.h" -namespace zilliz { namespace knowhere { class VectorIndex; @@ -60,4 +59,3 @@ class VectorIndex : public Index { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/Cloner.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/Cloner.cpp index c6f3f81053..16191b8183 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/Cloner.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/Cloner.cpp @@ -23,7 +23,6 @@ #include "knowhere/index/vector_index/IndexIVFPQ.h" #include "knowhere/index/vector_index/IndexIVFSQ.h" -namespace zilliz { namespace knowhere { namespace cloner { @@ -57,4 +56,3 @@ CopyCpuToGpu(const VectorIndexPtr& index, const int64_t& device_id, const Config } // namespace cloner } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/Cloner.h b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/Cloner.h index fb5d00d7df..3134238ed8 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/Cloner.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/Cloner.h @@ -19,7 +19,6 @@ #include "knowhere/index/vector_index/VectorIndex.h" -namespace zilliz { namespace knowhere { namespace cloner { @@ -32,4 +31,3 @@ CopyGpuToCpu(const VectorIndexPtr& index, const Config& config); } // namespace cloner } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/Definitions.h b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/Definitions.h index d5959f7501..f39a28d20f 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/Definitions.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/Definitions.h @@ -17,7 +17,6 @@ #pragma once -namespace zilliz { namespace knowhere { namespace definition { @@ -27,4 +26,3 @@ namespace definition { } // namespace definition } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.cpp index 70c879d03a..d74c6bc562 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.cpp @@ -19,7 +19,6 @@ #include -namespace zilliz { namespace knowhere { FaissGpuResourceMgr& @@ -125,4 +124,3 @@ FaissGpuResourceMgr::Dump() { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h index 926b8b4e00..bf570ca4eb 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h @@ -26,7 +26,6 @@ #include "src/utils/BlockingQueue.h" -namespace zilliz { namespace knowhere { struct Resource { @@ -45,7 +44,7 @@ using ResWPtr = std::weak_ptr; class FaissGpuResourceMgr { public: friend class ResScope; - using ResBQ = zilliz::milvus::server::BlockingQueue; + using ResBQ = milvus::server::BlockingQueue; public: struct DeviceParams { @@ -127,4 +126,3 @@ class ResScope { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissIO.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissIO.cpp index 30a54b388d..99532137c0 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissIO.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissIO.cpp @@ -19,7 +19,6 @@ #include "knowhere/index/vector_index/helpers/FaissIO.h" -namespace zilliz { namespace knowhere { // TODO(linxj): Get From Config File @@ -66,4 +65,3 @@ MemoryIOReader::operator()(void* ptr, size_t size, size_t nitems) { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissIO.h b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissIO.h index c850e89d9f..7cce5bbbac 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissIO.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/FaissIO.h @@ -19,7 +19,6 @@ #include -namespace zilliz { namespace knowhere { struct MemoryIOWriter : public faiss::IOWriter { @@ -41,4 +40,3 @@ struct MemoryIOReader : public faiss::IOReader { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/IndexParameter.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/IndexParameter.cpp index c4a179bc6a..20f3388174 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/IndexParameter.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/IndexParameter.cpp @@ -20,7 +20,6 @@ #include -namespace zilliz { namespace knowhere { faiss::MetricType @@ -36,4 +35,3 @@ GetMetricType(METRICTYPE& type) { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/IndexParameter.h b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/IndexParameter.h index d5056d7ee6..b2854abef8 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/IndexParameter.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/IndexParameter.h @@ -22,7 +22,6 @@ #include "knowhere/common/Config.h" -namespace zilliz { namespace knowhere { extern faiss::MetricType @@ -132,4 +131,3 @@ struct KDTCfg : public Cfg { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/KDTParameterMgr.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/KDTParameterMgr.cpp index 015dc17fc5..19bf070dba 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/KDTParameterMgr.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/KDTParameterMgr.cpp @@ -19,7 +19,6 @@ #include "knowhere/index/vector_index/helpers/KDTParameterMgr.h" -namespace zilliz { namespace knowhere { const std::vector& @@ -54,4 +53,3 @@ KDTParameterMgr::KDTParameterMgr() { } } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/KDTParameterMgr.h b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/KDTParameterMgr.h index ec2d73eebb..fe90761e17 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/KDTParameterMgr.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/helpers/KDTParameterMgr.h @@ -22,7 +22,6 @@ #include #include -namespace zilliz { namespace knowhere { using KDTParameter = std::pair; @@ -51,4 +50,3 @@ class KDTParameterMgr { }; } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSG.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSG.cpp index 19bc825d81..375664fbf8 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSG.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSG.cpp @@ -32,7 +32,6 @@ // TODO: enable macro //#include -namespace zilliz { namespace knowhere { namespace algo { @@ -792,4 +791,3 @@ NsgIndex::SetKnnGraph(Graph& g) { } // namespace algo } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSG.h b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSG.h index e075260398..160c076e45 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSG.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSG.h @@ -24,7 +24,6 @@ #include #include "Neighbor.h" -namespace zilliz { namespace knowhere { namespace algo { @@ -143,4 +142,3 @@ class NsgIndex { } // namespace algo } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGHelper.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGHelper.cpp index 1dd306bf77..05e8d18787 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGHelper.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGHelper.cpp @@ -20,7 +20,6 @@ #include "knowhere/index/vector_index/nsg/NSGHelper.h" -namespace zilliz { namespace knowhere { namespace algo { @@ -180,4 +179,3 @@ calculate(const float* a, const float* b, unsigned size) { } // namespace algo } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGHelper.h b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGHelper.h index cb8007f2b1..5007cf019c 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGHelper.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGHelper.h @@ -25,7 +25,6 @@ #include "NSG.h" #include "knowhere/common/Config.h" -namespace zilliz { namespace knowhere { namespace algo { @@ -36,4 +35,3 @@ calculate(const float* a, const float* b, unsigned size); } // namespace algo } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGIO.cpp b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGIO.cpp index db3113da2f..cac3b5864f 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGIO.cpp +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGIO.cpp @@ -19,7 +19,6 @@ #include "knowhere/index/vector_index/nsg/NSGIO.h" -namespace zilliz { namespace knowhere { namespace algo { @@ -68,4 +67,3 @@ read_index(MemoryIOReader& reader) { } // namespace algo } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGIO.h b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGIO.h index fd740a991e..12913b69df 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGIO.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/NSGIO.h @@ -21,7 +21,6 @@ #include "knowhere/index/vector_index/IndexIVF.h" #include "knowhere/index/vector_index/helpers/FaissIO.h" -namespace zilliz { namespace knowhere { namespace algo { @@ -32,4 +31,3 @@ read_index(MemoryIOReader& reader); } // namespace algo } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/Neighbor.h b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/Neighbor.h index ee71a3f66e..c3a314164c 100644 --- a/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/Neighbor.h +++ b/cpp/src/core/knowhere/knowhere/index/vector_index/nsg/Neighbor.h @@ -19,7 +19,6 @@ #include -namespace zilliz { namespace knowhere { namespace algo { @@ -61,4 +60,3 @@ typedef std::lock_guard LockGuard; } // namespace algo } // namespace knowhere -} // namespace zilliz diff --git a/cpp/src/core/unittest/kdtree.cpp b/cpp/src/core/unittest/kdtree.cpp index 351a177d4b..9b1e428a80 100644 --- a/cpp/src/core/unittest/kdtree.cpp +++ b/cpp/src/core/unittest/kdtree.cpp @@ -24,7 +24,7 @@ // // namespace { // -// namespace kn = zilliz::knowhere; +// namespace kn = knowhere; // //} // namespace // diff --git a/cpp/src/core/unittest/test_idmap.cpp b/cpp/src/core/unittest/test_idmap.cpp index 9ee4ea732d..e907d309eb 100644 --- a/cpp/src/core/unittest/test_idmap.cpp +++ b/cpp/src/core/unittest/test_idmap.cpp @@ -27,7 +27,7 @@ namespace { -namespace kn = zilliz::knowhere; +namespace kn = knowhere; } // namespace @@ -179,9 +179,9 @@ TEST_F(IDMAPTest, copy_test) { auto clone_result = clone_index->Search(query_dataset, conf); AssertAnns(clone_result, nq, k); ASSERT_THROW({ std::static_pointer_cast(clone_index)->GetRawVectors(); }, - zilliz::knowhere::KnowhereException); + knowhere::KnowhereException); ASSERT_THROW({ std::static_pointer_cast(clone_index)->GetRawIds(); }, - zilliz::knowhere::KnowhereException); + knowhere::KnowhereException); auto binary = clone_index->Serialize(); clone_index->Load(binary); diff --git a/cpp/src/core/unittest/test_ivf.cpp b/cpp/src/core/unittest/test_ivf.cpp index 2aa6937dbe..a0da0eca8e 100644 --- a/cpp/src/core/unittest/test_ivf.cpp +++ b/cpp/src/core/unittest/test_ivf.cpp @@ -39,7 +39,7 @@ namespace { -namespace kn = zilliz::knowhere; +namespace kn = knowhere; } // namespace diff --git a/cpp/src/core/unittest/test_json.cpp b/cpp/src/core/unittest/test_json.cpp index acdddad30a..613e0deff5 100644 --- a/cpp/src/core/unittest/test_json.cpp +++ b/cpp/src/core/unittest/test_json.cpp @@ -19,7 +19,7 @@ namespace { -namespace kn = zilliz::knowhere; +namespace kn = knowhere; } // namespace diff --git a/cpp/src/core/unittest/test_kdt.cpp b/cpp/src/core/unittest/test_kdt.cpp index 85c8650d1b..6fa6ba33f3 100644 --- a/cpp/src/core/unittest/test_kdt.cpp +++ b/cpp/src/core/unittest/test_kdt.cpp @@ -30,7 +30,7 @@ namespace { -namespace kn = zilliz::knowhere; +namespace kn = knowhere; } // namespace @@ -132,7 +132,7 @@ TEST_F(KDTTest, kdt_serialize) { PrintResult(result, nq, k); ASSERT_EQ(new_index->Count(), nb); ASSERT_EQ(new_index->Dimension(), dim); - ASSERT_THROW({ new_index->Clone(); }, zilliz::knowhere::KnowhereException); + ASSERT_THROW({ new_index->Clone(); }, knowhere::KnowhereException); ASSERT_NO_THROW({ new_index->Seal(); }); { diff --git a/cpp/src/core/unittest/test_nsg/test_nsg.cpp b/cpp/src/core/unittest/test_nsg/test_nsg.cpp index b93a2ddc35..70261a63dc 100644 --- a/cpp/src/core/unittest/test_nsg/test_nsg.cpp +++ b/cpp/src/core/unittest/test_nsg/test_nsg.cpp @@ -28,7 +28,7 @@ namespace { -namespace kn = zilliz::knowhere; +namespace kn = knowhere; } // namespace @@ -98,7 +98,7 @@ TEST_F(NSGInterfaceTest, basic_test) { ASSERT_EQ(index_->Count(), nb); ASSERT_EQ(index_->Dimension(), dim); - ASSERT_THROW({ index_->Clone(); }, zilliz::knowhere::KnowhereException); + ASSERT_THROW({ index_->Clone(); }, knowhere::KnowhereException); ASSERT_NO_THROW({ index_->Add(base_dataset, kn::Config()); index_->Seal(); diff --git a/cpp/src/core/unittest/utils.cpp b/cpp/src/core/unittest/utils.cpp index e81ad8ea02..3c342738c1 100644 --- a/cpp/src/core/unittest/utils.cpp +++ b/cpp/src/core/unittest/utils.cpp @@ -25,7 +25,7 @@ INITIALIZE_EASYLOGGINGPP namespace { -namespace kn = zilliz::knowhere; +namespace kn = knowhere; } // namespace @@ -56,7 +56,7 @@ DataGen::Generate(const int& dim, const int& nb, const int& nq) { query_dataset = generate_query_dataset(nq, dim, xq.data()); } -zilliz::knowhere::DatasetPtr +knowhere::DatasetPtr DataGen::GenQuery(const int& nq) { xq.resize(nq * dim); for (int i = 0; i < nq * dim; ++i) { diff --git a/cpp/src/core/unittest/utils.h b/cpp/src/core/unittest/utils.h index 07a104ad4a..acc3e89183 100644 --- a/cpp/src/core/unittest/utils.h +++ b/cpp/src/core/unittest/utils.h @@ -34,7 +34,7 @@ class DataGen { void Generate(const int& dim, const int& nb, const int& nq); - zilliz::knowhere::DatasetPtr + knowhere::DatasetPtr GenQuery(const int& nq); protected: @@ -45,8 +45,8 @@ class DataGen { std::vector xb; std::vector xq; std::vector ids; - zilliz::knowhere::DatasetPtr base_dataset = nullptr; - zilliz::knowhere::DatasetPtr query_dataset = nullptr; + knowhere::DatasetPtr base_dataset = nullptr; + knowhere::DatasetPtr query_dataset = nullptr; }; extern void @@ -62,10 +62,10 @@ GenBase(const int64_t& dim, const int64_t& nb, float* xb, int64_t* ids); extern void InitLog(); -zilliz::knowhere::DatasetPtr +knowhere::DatasetPtr generate_dataset(int64_t nb, int64_t dim, float* xb, int64_t* ids); -zilliz::knowhere::DatasetPtr +knowhere::DatasetPtr generate_query_dataset(int64_t nb, int64_t dim, float* xb); struct FileIOWriter { diff --git a/cpp/src/db/Constants.h b/cpp/src/db/Constants.h index 0feffadaf4..a1e09bc196 100644 --- a/cpp/src/db/Constants.h +++ b/cpp/src/db/Constants.h @@ -19,7 +19,6 @@ #include -namespace zilliz { namespace milvus { namespace engine { @@ -38,4 +37,3 @@ static constexpr uint64_t ONE_GB = ONE_KB * ONE_MB; } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/DB.h b/cpp/src/db/DB.h index 9a6a2e74a6..a790fadb50 100644 --- a/cpp/src/db/DB.h +++ b/cpp/src/db/DB.h @@ -26,7 +26,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -96,4 +95,3 @@ using DBPtr = std::shared_ptr; } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/DBFactory.cpp b/cpp/src/db/DBFactory.cpp index 89d04b3632..fae3a180c0 100644 --- a/cpp/src/db/DBFactory.cpp +++ b/cpp/src/db/DBFactory.cpp @@ -28,7 +28,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -47,4 +46,3 @@ DBFactory::Build(const DBOptions& options) { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/DBFactory.h b/cpp/src/db/DBFactory.h index c5c73a0649..e787f7c883 100644 --- a/cpp/src/db/DBFactory.h +++ b/cpp/src/db/DBFactory.h @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -38,4 +37,3 @@ class DBFactory { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/DBImpl.cpp b/cpp/src/db/DBImpl.cpp index 10cdf60b5a..ece62284f7 100644 --- a/cpp/src/db/DBImpl.cpp +++ b/cpp/src/db/DBImpl.cpp @@ -39,7 +39,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -249,7 +248,7 @@ DBImpl::InsertVectors(const std::string& table_id, uint64_t n, const float* vect } Status status; - zilliz::milvus::server::CollectInsertMetrics metrics(n, status); + milvus::server::CollectInsertMetrics metrics(n, status); status = mem_mgr_->InsertVectors(table_id, n, vectors, vector_ids); // std::chrono::microseconds time_span = // std::chrono::duration_cast(end_time - start_time); @@ -914,4 +913,3 @@ DBImpl::BackgroundBuildIndex() { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/DBImpl.h b/cpp/src/db/DBImpl.h index 366408d8b0..865b3dfa53 100644 --- a/cpp/src/db/DBImpl.h +++ b/cpp/src/db/DBImpl.h @@ -32,7 +32,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -165,4 +164,3 @@ class DBImpl : public DB { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/IDGenerator.cpp b/cpp/src/db/IDGenerator.cpp index b80e1ce354..6b150a926a 100644 --- a/cpp/src/db/IDGenerator.cpp +++ b/cpp/src/db/IDGenerator.cpp @@ -21,7 +21,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -64,4 +63,3 @@ SimpleIDGenerator::GetNextIDNumbers(size_t n, IDNumbers& ids) { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/IDGenerator.h b/cpp/src/db/IDGenerator.h index f41f745864..cdd22efc1a 100644 --- a/cpp/src/db/IDGenerator.h +++ b/cpp/src/db/IDGenerator.h @@ -22,7 +22,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -56,4 +55,3 @@ class SimpleIDGenerator : public IDGenerator { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/Options.cpp b/cpp/src/db/Options.cpp index edaf69c9e6..9d6a7d0236 100644 --- a/cpp/src/db/Options.cpp +++ b/cpp/src/db/Options.cpp @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -91,4 +90,3 @@ ArchiveConf::ParseType(const std::string& type) { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/Options.h b/cpp/src/db/Options.h index d51a30f2b4..ebecb4de5a 100644 --- a/cpp/src/db/Options.h +++ b/cpp/src/db/Options.h @@ -24,7 +24,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -81,4 +80,3 @@ struct DBOptions { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/Types.h b/cpp/src/db/Types.h index c37434a405..94528a9a8a 100644 --- a/cpp/src/db/Types.h +++ b/cpp/src/db/Types.h @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -42,4 +41,3 @@ struct TableIndex { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/Utils.cpp b/cpp/src/db/Utils.cpp index d9e500f84a..0ddf03568a 100644 --- a/cpp/src/db/Utils.cpp +++ b/cpp/src/db/Utils.cpp @@ -25,7 +25,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { namespace utils { @@ -239,4 +238,3 @@ ParseMetaUri(const std::string& uri, MetaUriInfo& info) { } // namespace utils } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/Utils.h b/cpp/src/db/Utils.h index c161e32b95..0b157f6dfd 100644 --- a/cpp/src/db/Utils.h +++ b/cpp/src/db/Utils.h @@ -24,7 +24,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { namespace utils { @@ -69,4 +68,3 @@ ParseMetaUri(const std::string& uri, MetaUriInfo& info); } // namespace utils } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/engine/EngineFactory.cpp b/cpp/src/db/engine/EngineFactory.cpp index 338b7d72af..c3597d1020 100644 --- a/cpp/src/db/engine/EngineFactory.cpp +++ b/cpp/src/db/engine/EngineFactory.cpp @@ -21,7 +21,6 @@ #include -namespace zilliz { namespace milvus { namespace engine { @@ -43,4 +42,3 @@ EngineFactory::Build(uint16_t dimension, const std::string& location, EngineType } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/engine/EngineFactory.h b/cpp/src/db/engine/EngineFactory.h index 5d22fbb4d2..d98952ccd9 100644 --- a/cpp/src/db/engine/EngineFactory.h +++ b/cpp/src/db/engine/EngineFactory.h @@ -22,7 +22,6 @@ #include -namespace zilliz { namespace milvus { namespace engine { @@ -35,4 +34,3 @@ class EngineFactory { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/engine/ExecutionEngine.h b/cpp/src/db/engine/ExecutionEngine.h index 4ae3e872b3..1572b967d1 100644 --- a/cpp/src/db/engine/ExecutionEngine.h +++ b/cpp/src/db/engine/ExecutionEngine.h @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -105,4 +104,3 @@ using ExecutionEnginePtr = std::shared_ptr; } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/engine/ExecutionEngineImpl.cpp b/cpp/src/db/engine/ExecutionEngineImpl.cpp index 2a239ddbea..52365d0915 100644 --- a/cpp/src/db/engine/ExecutionEngineImpl.cpp +++ b/cpp/src/db/engine/ExecutionEngineImpl.cpp @@ -34,7 +34,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -324,7 +323,7 @@ ExecutionEngineImpl::Search(int64_t n, const float* data, int64_t k, int64_t npr Status ExecutionEngineImpl::Cache() { cache::DataObjPtr obj = std::make_shared(index_, PhysicalSize()); - zilliz::milvus::cache::CpuCacheMgr::GetInstance()->InsertItem(location_, obj); + milvus::cache::CpuCacheMgr::GetInstance()->InsertItem(location_, obj); return Status::OK(); } @@ -332,7 +331,7 @@ ExecutionEngineImpl::Cache() { Status ExecutionEngineImpl::GpuCache(uint64_t gpu_id) { cache::DataObjPtr obj = std::make_shared(index_, PhysicalSize()); - zilliz::milvus::cache::GpuCacheMgr::GetInstance(gpu_id)->InsertItem(location_, obj); + milvus::cache::GpuCacheMgr::GetInstance(gpu_id)->InsertItem(location_, obj); return Status::OK(); } @@ -351,4 +350,3 @@ ExecutionEngineImpl::Init() { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/engine/ExecutionEngineImpl.h b/cpp/src/db/engine/ExecutionEngineImpl.h index e8f9521460..62a7b29a63 100644 --- a/cpp/src/db/engine/ExecutionEngineImpl.h +++ b/cpp/src/db/engine/ExecutionEngineImpl.h @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -119,4 +118,3 @@ class ExecutionEngineImpl : public ExecutionEngine { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/insert/MemManager.h b/cpp/src/db/insert/MemManager.h index 920e6e9692..cc76604165 100644 --- a/cpp/src/db/insert/MemManager.h +++ b/cpp/src/db/insert/MemManager.h @@ -24,7 +24,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -53,4 +52,3 @@ using MemManagerPtr = std::shared_ptr; } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/insert/MemManagerImpl.cpp b/cpp/src/db/insert/MemManagerImpl.cpp index 1a59c8b892..69c3397eb9 100644 --- a/cpp/src/db/insert/MemManagerImpl.cpp +++ b/cpp/src/db/insert/MemManagerImpl.cpp @@ -22,7 +22,6 @@ #include -namespace zilliz { namespace milvus { namespace engine { @@ -140,4 +139,3 @@ MemManagerImpl::GetCurrentMem() { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/insert/MemManagerImpl.h b/cpp/src/db/insert/MemManagerImpl.h index 4de5626459..862b068d0f 100644 --- a/cpp/src/db/insert/MemManagerImpl.h +++ b/cpp/src/db/insert/MemManagerImpl.h @@ -30,7 +30,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -80,4 +79,3 @@ class MemManagerImpl : public MemManager { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/insert/MemMenagerFactory.cpp b/cpp/src/db/insert/MemMenagerFactory.cpp index 8f0d6704d7..033992501b 100644 --- a/cpp/src/db/insert/MemMenagerFactory.cpp +++ b/cpp/src/db/insert/MemMenagerFactory.cpp @@ -28,7 +28,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -39,4 +38,3 @@ MemManagerFactory::Build(const std::shared_ptr& meta, const DBOption } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/insert/MemMenagerFactory.h b/cpp/src/db/insert/MemMenagerFactory.h index d7996abe99..a489a3952b 100644 --- a/cpp/src/db/insert/MemMenagerFactory.h +++ b/cpp/src/db/insert/MemMenagerFactory.h @@ -22,7 +22,6 @@ #include -namespace zilliz { namespace milvus { namespace engine { @@ -34,4 +33,3 @@ class MemManagerFactory { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/insert/MemTable.cpp b/cpp/src/db/insert/MemTable.cpp index e189dbf15b..871eab8d7d 100644 --- a/cpp/src/db/insert/MemTable.cpp +++ b/cpp/src/db/insert/MemTable.cpp @@ -21,7 +21,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -104,4 +103,3 @@ MemTable::GetCurrentMem() { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/insert/MemTable.h b/cpp/src/db/insert/MemTable.h index b2b16cf472..cb22b6ed34 100644 --- a/cpp/src/db/insert/MemTable.h +++ b/cpp/src/db/insert/MemTable.h @@ -26,7 +26,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -73,4 +72,3 @@ using MemTablePtr = std::shared_ptr; } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/insert/MemTableFile.cpp b/cpp/src/db/insert/MemTableFile.cpp index 8395b0b62a..5827513297 100644 --- a/cpp/src/db/insert/MemTableFile.cpp +++ b/cpp/src/db/insert/MemTableFile.cpp @@ -24,7 +24,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -126,4 +125,3 @@ MemTableFile::Serialize() { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/insert/MemTableFile.h b/cpp/src/db/insert/MemTableFile.h index 72ae09c861..e11274b7de 100644 --- a/cpp/src/db/insert/MemTableFile.h +++ b/cpp/src/db/insert/MemTableFile.h @@ -25,7 +25,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -66,4 +65,3 @@ using MemTableFilePtr = std::shared_ptr; } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/insert/VectorSource.cpp b/cpp/src/db/insert/VectorSource.cpp index 7a9fdf5d0f..dbedf58029 100644 --- a/cpp/src/db/insert/VectorSource.cpp +++ b/cpp/src/db/insert/VectorSource.cpp @@ -21,7 +21,6 @@ #include "metrics/Metrics.h" #include "utils/Log.h" -namespace zilliz { namespace milvus { namespace engine { @@ -77,4 +76,3 @@ VectorSource::GetVectorIds() { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/insert/VectorSource.h b/cpp/src/db/insert/VectorSource.h index 4b8e9d21b9..1d936268f4 100644 --- a/cpp/src/db/insert/VectorSource.h +++ b/cpp/src/db/insert/VectorSource.h @@ -24,7 +24,6 @@ #include -namespace zilliz { namespace milvus { namespace engine { @@ -59,4 +58,3 @@ using VectorSourcePtr = std::shared_ptr; } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/meta/Meta.h b/cpp/src/db/meta/Meta.h index 3e3128366c..8167834568 100644 --- a/cpp/src/db/meta/Meta.h +++ b/cpp/src/db/meta/Meta.h @@ -27,7 +27,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { namespace meta { @@ -124,4 +123,3 @@ using MetaPtr = std::shared_ptr; } // namespace meta } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/meta/MetaConsts.h b/cpp/src/db/meta/MetaConsts.h index 64cfeab78a..e963a63f43 100644 --- a/cpp/src/db/meta/MetaConsts.h +++ b/cpp/src/db/meta/MetaConsts.h @@ -17,7 +17,6 @@ #pragma once -namespace zilliz { namespace milvus { namespace engine { namespace meta { @@ -41,4 +40,3 @@ const size_t W_SEC = 7 * D_SEC; } // namespace meta } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/meta/MetaFactory.cpp b/cpp/src/db/meta/MetaFactory.cpp index d8beecbd4e..8031038e37 100644 --- a/cpp/src/db/meta/MetaFactory.cpp +++ b/cpp/src/db/meta/MetaFactory.cpp @@ -30,7 +30,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -75,4 +74,3 @@ MetaFactory::Build(const DBMetaOptions& metaOptions, const int& mode) { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/meta/MetaFactory.h b/cpp/src/db/meta/MetaFactory.h index 0792515ac1..f16584426e 100644 --- a/cpp/src/db/meta/MetaFactory.h +++ b/cpp/src/db/meta/MetaFactory.h @@ -22,7 +22,6 @@ #include -namespace zilliz { namespace milvus { namespace engine { @@ -37,4 +36,3 @@ class MetaFactory { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/meta/MetaTypes.h b/cpp/src/db/meta/MetaTypes.h index aad8b61c87..c973f3fdea 100644 --- a/cpp/src/db/meta/MetaTypes.h +++ b/cpp/src/db/meta/MetaTypes.h @@ -25,7 +25,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { namespace meta { @@ -96,4 +95,3 @@ using DatePartionedTableFilesSchema = std::map; } // namespace meta } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/meta/MySQLConnectionPool.cpp b/cpp/src/db/meta/MySQLConnectionPool.cpp index 6c93120107..ef013dce95 100644 --- a/cpp/src/db/meta/MySQLConnectionPool.cpp +++ b/cpp/src/db/meta/MySQLConnectionPool.cpp @@ -17,7 +17,6 @@ #include "db/meta/MySQLConnectionPool.h" -namespace zilliz { namespace milvus { namespace engine { namespace meta { @@ -95,4 +94,3 @@ MySQLConnectionPool::max_idle_time() { } // namespace meta } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/meta/MySQLConnectionPool.h b/cpp/src/db/meta/MySQLConnectionPool.h index 9c6b751d1e..60e353c3c4 100644 --- a/cpp/src/db/meta/MySQLConnectionPool.h +++ b/cpp/src/db/meta/MySQLConnectionPool.h @@ -23,7 +23,6 @@ #include "utils/Log.h" -namespace zilliz { namespace milvus { namespace engine { namespace meta { @@ -90,4 +89,3 @@ class MySQLConnectionPool : public mysqlpp::ConnectionPool { } // namespace meta } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/meta/MySQLMetaImpl.cpp b/cpp/src/db/meta/MySQLMetaImpl.cpp index db93ce9ec6..872c1ced2e 100644 --- a/cpp/src/db/meta/MySQLMetaImpl.cpp +++ b/cpp/src/db/meta/MySQLMetaImpl.cpp @@ -38,7 +38,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { namespace meta { @@ -1994,4 +1993,3 @@ MySQLMetaImpl::DropAll() { } // namespace meta } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/meta/MySQLMetaImpl.h b/cpp/src/db/meta/MySQLMetaImpl.h index 48bdf5b9ab..7ca66bc992 100644 --- a/cpp/src/db/meta/MySQLMetaImpl.h +++ b/cpp/src/db/meta/MySQLMetaImpl.h @@ -27,7 +27,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { namespace meta { @@ -143,4 +142,3 @@ class MySQLMetaImpl : public Meta { } // namespace meta } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/db/meta/SqliteMetaImpl.cpp b/cpp/src/db/meta/SqliteMetaImpl.cpp index accad0be70..dd9bb6fd30 100644 --- a/cpp/src/db/meta/SqliteMetaImpl.cpp +++ b/cpp/src/db/meta/SqliteMetaImpl.cpp @@ -34,7 +34,7 @@ #include #include -namespace zilliz { + namespace milvus { namespace engine { namespace meta { @@ -1298,4 +1298,4 @@ SqliteMetaImpl::DropAll() { } // namespace meta } // namespace engine } // namespace milvus -} // namespace zilliz + diff --git a/cpp/src/db/meta/SqliteMetaImpl.h b/cpp/src/db/meta/SqliteMetaImpl.h index 70f22db281..dc132c41ec 100644 --- a/cpp/src/db/meta/SqliteMetaImpl.h +++ b/cpp/src/db/meta/SqliteMetaImpl.h @@ -24,7 +24,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { namespace meta { @@ -138,4 +137,3 @@ class SqliteMetaImpl : public Meta { } // namespace meta } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/grpc/cpp_gen.sh b/cpp/src/grpc/cpp_gen.sh old mode 100755 new mode 100644 diff --git a/cpp/src/main.cpp b/cpp/src/main.cpp index 5d808a7e4c..b50eedeaba 100644 --- a/cpp/src/main.cpp +++ b/cpp/src/main.cpp @@ -99,14 +99,14 @@ main(int argc, char* argv[]) { } /* Handle Signal */ - signal(SIGHUP, zilliz::milvus::server::SignalUtil::HandleSignal); - signal(SIGINT, zilliz::milvus::server::SignalUtil::HandleSignal); - signal(SIGUSR1, zilliz::milvus::server::SignalUtil::HandleSignal); - signal(SIGSEGV, zilliz::milvus::server::SignalUtil::HandleSignal); - signal(SIGUSR2, zilliz::milvus::server::SignalUtil::HandleSignal); - signal(SIGTERM, zilliz::milvus::server::SignalUtil::HandleSignal); + signal(SIGHUP, milvus::server::SignalUtil::HandleSignal); + signal(SIGINT, milvus::server::SignalUtil::HandleSignal); + signal(SIGUSR1, milvus::server::SignalUtil::HandleSignal); + signal(SIGSEGV, milvus::server::SignalUtil::HandleSignal); + signal(SIGUSR2, milvus::server::SignalUtil::HandleSignal); + signal(SIGTERM, milvus::server::SignalUtil::HandleSignal); - zilliz::milvus::server::Server& server = zilliz::milvus::server::Server::GetInstance(); + milvus::server::Server& server = milvus::server::Server::GetInstance(); server.Init(start_daemonized, pid_filename, config_filename, log_config_file); server.Start(); diff --git a/cpp/src/metrics/MetricBase.h b/cpp/src/metrics/MetricBase.h index 5442b9b714..eeca45e789 100644 --- a/cpp/src/metrics/MetricBase.h +++ b/cpp/src/metrics/MetricBase.h @@ -22,7 +22,6 @@ #include -namespace zilliz { namespace milvus { namespace server { class MetricsBase { @@ -208,4 +207,3 @@ class MetricsBase { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/metrics/Metrics.cpp b/cpp/src/metrics/Metrics.cpp index 9a182ce571..51db5555b8 100644 --- a/cpp/src/metrics/Metrics.cpp +++ b/cpp/src/metrics/Metrics.cpp @@ -21,7 +21,6 @@ #include -namespace zilliz { namespace milvus { namespace server { @@ -47,4 +46,3 @@ Metrics::CreateMetricsCollector() { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/metrics/Metrics.h b/cpp/src/metrics/Metrics.h index f644004f14..c207a50d9e 100644 --- a/cpp/src/metrics/Metrics.h +++ b/cpp/src/metrics/Metrics.h @@ -20,7 +20,6 @@ #include "MetricBase.h" #include "db/meta/MetaTypes.h" -namespace zilliz { namespace milvus { namespace server { @@ -255,4 +254,3 @@ class MetricCollector : CollectMetricsBase { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/metrics/PrometheusMetrics.cpp b/cpp/src/metrics/PrometheusMetrics.cpp index 72b26eb63d..bc1860389f 100644 --- a/cpp/src/metrics/PrometheusMetrics.cpp +++ b/cpp/src/metrics/PrometheusMetrics.cpp @@ -24,7 +24,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -242,4 +241,3 @@ PrometheusMetrics::GpuCacheUsageGaugeSet() { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/metrics/PrometheusMetrics.h b/cpp/src/metrics/PrometheusMetrics.h index 9e009186d2..ef60f9a231 100644 --- a/cpp/src/metrics/PrometheusMetrics.h +++ b/cpp/src/metrics/PrometheusMetrics.h @@ -31,7 +31,6 @@ //#define server::Metrics::GetInstance() server::GetInstance() #define METRICS_MICROSECONDS(a, b) (std::chrono::duration_cast(b - a)).count(); -namespace zilliz { namespace milvus { namespace server { @@ -654,4 +653,3 @@ class PrometheusMetrics : public MetricsBase { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/metrics/SystemInfo.cpp b/cpp/src/metrics/SystemInfo.cpp index 98822945ca..1414d94eae 100644 --- a/cpp/src/metrics/SystemInfo.cpp +++ b/cpp/src/metrics/SystemInfo.cpp @@ -25,7 +25,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -306,4 +305,3 @@ SystemInfo::Octets() { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/metrics/SystemInfo.h b/cpp/src/metrics/SystemInfo.h index 7fda0730e6..0176475232 100644 --- a/cpp/src/metrics/SystemInfo.h +++ b/cpp/src/metrics/SystemInfo.h @@ -29,7 +29,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -132,4 +131,3 @@ class SystemInfo { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/Algorithm.cpp b/cpp/src/scheduler/Algorithm.cpp index 48fee94d9c..44f83742c2 100644 --- a/cpp/src/scheduler/Algorithm.cpp +++ b/cpp/src/scheduler/Algorithm.cpp @@ -21,7 +21,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -106,4 +105,3 @@ ShortestPath(const ResourcePtr& src, const ResourcePtr& dest, const ResourceMgrP } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/Algorithm.h b/cpp/src/scheduler/Algorithm.h index ed0f17d762..69ff8f3a70 100644 --- a/cpp/src/scheduler/Algorithm.h +++ b/cpp/src/scheduler/Algorithm.h @@ -21,7 +21,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -31,4 +30,3 @@ ShortestPath(const ResourcePtr& src, const ResourcePtr& dest, const ResourceMgrP } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/Definition.h b/cpp/src/scheduler/Definition.h index c886aafdac..162988e90a 100644 --- a/cpp/src/scheduler/Definition.h +++ b/cpp/src/scheduler/Definition.h @@ -30,7 +30,6 @@ #include "db/engine/ExecutionEngine.h" #include "db/meta/MetaTypes.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -44,4 +43,3 @@ using MetricType = engine::MetricType; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/JobMgr.cpp b/cpp/src/scheduler/JobMgr.cpp index 92cf1189fd..25a4932f03 100644 --- a/cpp/src/scheduler/JobMgr.cpp +++ b/cpp/src/scheduler/JobMgr.cpp @@ -21,7 +21,6 @@ #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -85,4 +84,3 @@ JobMgr::build_task(const JobPtr& job) { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/JobMgr.h b/cpp/src/scheduler/JobMgr.h index 66adff18d2..4340c9e616 100644 --- a/cpp/src/scheduler/JobMgr.h +++ b/cpp/src/scheduler/JobMgr.h @@ -31,7 +31,6 @@ #include "job/Job.h" #include "task/Task.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -72,4 +71,3 @@ using JobMgrPtr = std::shared_ptr; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/ResourceFactory.cpp b/cpp/src/scheduler/ResourceFactory.cpp index f89e8207e4..fad8571b61 100644 --- a/cpp/src/scheduler/ResourceFactory.cpp +++ b/cpp/src/scheduler/ResourceFactory.cpp @@ -17,7 +17,6 @@ #include "scheduler/ResourceFactory.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -37,4 +36,3 @@ ResourceFactory::Create(const std::string& name, const std::string& type, uint64 } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/ResourceFactory.h b/cpp/src/scheduler/ResourceFactory.h index bf663a7db8..3290cb023c 100644 --- a/cpp/src/scheduler/ResourceFactory.h +++ b/cpp/src/scheduler/ResourceFactory.h @@ -25,7 +25,6 @@ #include "resource/GpuResource.h" #include "resource/Resource.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -38,4 +37,3 @@ class ResourceFactory { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/ResourceMgr.cpp b/cpp/src/scheduler/ResourceMgr.cpp index ce9fcc9fb9..9906c71bbe 100644 --- a/cpp/src/scheduler/ResourceMgr.cpp +++ b/cpp/src/scheduler/ResourceMgr.cpp @@ -19,7 +19,6 @@ #include "scheduler/ResourceMgr.h" #include "utils/Log.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -201,4 +200,3 @@ ResourceMgr::event_process() { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/ResourceMgr.h b/cpp/src/scheduler/ResourceMgr.h index 531491066f..a81e6c239f 100644 --- a/cpp/src/scheduler/ResourceMgr.h +++ b/cpp/src/scheduler/ResourceMgr.h @@ -28,7 +28,6 @@ #include "resource/Resource.h" #include "utils/Log.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -127,4 +126,3 @@ using ResourceMgrWPtr = std::weak_ptr; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/SchedInst.cpp b/cpp/src/scheduler/SchedInst.cpp index cdeb834f57..f17aceb596 100644 --- a/cpp/src/scheduler/SchedInst.cpp +++ b/cpp/src/scheduler/SchedInst.cpp @@ -26,7 +26,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -171,4 +170,3 @@ StopSchedulerService() { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/SchedInst.h b/cpp/src/scheduler/SchedInst.h index 9947e9f62b..dc8e4ed478 100644 --- a/cpp/src/scheduler/SchedInst.h +++ b/cpp/src/scheduler/SchedInst.h @@ -24,7 +24,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -90,4 +89,3 @@ StopSchedulerService(); } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/Scheduler.cpp b/cpp/src/scheduler/Scheduler.cpp index 8272bf6219..6963ed3c5f 100644 --- a/cpp/src/scheduler/Scheduler.cpp +++ b/cpp/src/scheduler/Scheduler.cpp @@ -23,7 +23,6 @@ #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -139,4 +138,3 @@ Scheduler::OnTaskTableUpdated(const EventPtr& event) { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/Scheduler.h b/cpp/src/scheduler/Scheduler.h index 58cb4cbce8..1d8af9f4d4 100644 --- a/cpp/src/scheduler/Scheduler.h +++ b/cpp/src/scheduler/Scheduler.h @@ -28,7 +28,6 @@ #include "resource/Resource.h" #include "utils/Log.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -133,4 +132,3 @@ using SchedulerPtr = std::shared_ptr; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/TaskCreator.cpp b/cpp/src/scheduler/TaskCreator.cpp index cfcb0eb448..a82328a9bf 100644 --- a/cpp/src/scheduler/TaskCreator.cpp +++ b/cpp/src/scheduler/TaskCreator.cpp @@ -19,7 +19,6 @@ #include "scheduler/tasklabel/BroadcastLabel.h" #include "tasklabel/DefaultLabel.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -65,4 +64,3 @@ TaskCreator::Create(const DeleteJobPtr& job) { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/TaskCreator.h b/cpp/src/scheduler/TaskCreator.h index 5ae6a0763a..1c1e98a615 100644 --- a/cpp/src/scheduler/TaskCreator.h +++ b/cpp/src/scheduler/TaskCreator.h @@ -34,7 +34,6 @@ #include "task/SearchTask.h" #include "task/Task.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -53,4 +52,3 @@ class TaskCreator { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/TaskTable.cpp b/cpp/src/scheduler/TaskTable.cpp index db06abd966..0d6742c649 100644 --- a/cpp/src/scheduler/TaskTable.cpp +++ b/cpp/src/scheduler/TaskTable.cpp @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -244,4 +243,3 @@ TaskTable::Dump() { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/TaskTable.h b/cpp/src/scheduler/TaskTable.h index 80c8438eb1..35becbe5f8 100644 --- a/cpp/src/scheduler/TaskTable.h +++ b/cpp/src/scheduler/TaskTable.h @@ -28,7 +28,6 @@ #include "event/Event.h" #include "task/SearchTask.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -257,4 +256,3 @@ class TaskTable { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/Utils.cpp b/cpp/src/scheduler/Utils.cpp index b50fe4adb9..071f152227 100644 --- a/cpp/src/scheduler/Utils.cpp +++ b/cpp/src/scheduler/Utils.cpp @@ -20,7 +20,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -41,4 +40,3 @@ get_num_gpu() { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/Utils.h b/cpp/src/scheduler/Utils.h index eec5f8ba68..e999e0fda3 100644 --- a/cpp/src/scheduler/Utils.h +++ b/cpp/src/scheduler/Utils.h @@ -17,7 +17,6 @@ #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -29,4 +28,3 @@ get_num_gpu(); } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/action/Action.h b/cpp/src/scheduler/action/Action.h index b75dc4515f..51c788f82f 100644 --- a/cpp/src/scheduler/action/Action.h +++ b/cpp/src/scheduler/action/Action.h @@ -22,7 +22,6 @@ #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -47,4 +46,3 @@ class Action { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/action/PushTaskToNeighbour.cpp b/cpp/src/scheduler/action/PushTaskToNeighbour.cpp index 6fb861c8f3..22b82864b6 100644 --- a/cpp/src/scheduler/action/PushTaskToNeighbour.cpp +++ b/cpp/src/scheduler/action/PushTaskToNeighbour.cpp @@ -21,7 +21,6 @@ #include "Action.h" #include "src/cache/GpuCacheMgr.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -113,7 +112,7 @@ Action::DefaultLabelTaskScheduler(ResourceMgrWPtr res_mgr, ResourcePtr resource, auto location = index_engine->GetLocation(); for (auto i = 0; i < res_mgr.lock()->GetNumGpuResource(); ++i) { - auto index = zilliz::milvus::cache::GpuCacheMgr::GetInstance(i)->GetIndex(location); + auto index = milvus::cache::GpuCacheMgr::GetInstance(i)->GetIndex(location); if (index != nullptr) { moved = true; auto dest_resource = res_mgr.lock()->GetResource(ResourceType::GPU, i); @@ -178,4 +177,3 @@ Action::SpecifiedResourceLabelTaskScheduler(ResourceMgrWPtr res_mgr, ResourcePtr } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/event/Event.h b/cpp/src/scheduler/event/Event.h index 6d55820248..5b1f37fb99 100644 --- a/cpp/src/scheduler/event/Event.h +++ b/cpp/src/scheduler/event/Event.h @@ -21,7 +21,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -54,4 +53,3 @@ using EventPtr = std::shared_ptr; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/event/EventDump.cpp b/cpp/src/scheduler/event/EventDump.cpp index 6cc40ea28c..91e2da369a 100644 --- a/cpp/src/scheduler/event/EventDump.cpp +++ b/cpp/src/scheduler/event/EventDump.cpp @@ -21,7 +21,6 @@ #include "StartUpEvent.h" #include "TaskTableUpdatedEvent.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -57,4 +56,3 @@ operator<<(std::ostream& out, const TaskTableUpdatedEvent& event) { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/event/FinishTaskEvent.h b/cpp/src/scheduler/event/FinishTaskEvent.h index b593abfe31..1b2d8f9818 100644 --- a/cpp/src/scheduler/event/FinishTaskEvent.h +++ b/cpp/src/scheduler/event/FinishTaskEvent.h @@ -24,7 +24,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -48,4 +47,3 @@ class FinishTaskEvent : public Event { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/event/LoadCompletedEvent.h b/cpp/src/scheduler/event/LoadCompletedEvent.h index fa1f34b8c1..5a701e0dfc 100644 --- a/cpp/src/scheduler/event/LoadCompletedEvent.h +++ b/cpp/src/scheduler/event/LoadCompletedEvent.h @@ -24,7 +24,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -48,4 +47,3 @@ class LoadCompletedEvent : public Event { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/event/StartUpEvent.h b/cpp/src/scheduler/event/StartUpEvent.h index 037bf0f4d0..c4abb4e27c 100644 --- a/cpp/src/scheduler/event/StartUpEvent.h +++ b/cpp/src/scheduler/event/StartUpEvent.h @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -43,4 +42,3 @@ class StartUpEvent : public Event { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/event/TaskTableUpdatedEvent.h b/cpp/src/scheduler/event/TaskTableUpdatedEvent.h index 814b25f056..ed64a42d89 100644 --- a/cpp/src/scheduler/event/TaskTableUpdatedEvent.h +++ b/cpp/src/scheduler/event/TaskTableUpdatedEvent.h @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -44,4 +43,3 @@ class TaskTableUpdatedEvent : public Event { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/job/DeleteJob.cpp b/cpp/src/scheduler/job/DeleteJob.cpp index 5fcbb40513..96a6bb1817 100644 --- a/cpp/src/scheduler/job/DeleteJob.cpp +++ b/cpp/src/scheduler/job/DeleteJob.cpp @@ -19,7 +19,6 @@ #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -48,4 +47,3 @@ DeleteJob::ResourceDone() { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/job/DeleteJob.h b/cpp/src/scheduler/job/DeleteJob.h index 6c2f1e40c7..4ac48f6913 100644 --- a/cpp/src/scheduler/job/DeleteJob.h +++ b/cpp/src/scheduler/job/DeleteJob.h @@ -30,7 +30,6 @@ #include "Job.h" #include "db/meta/Meta.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -70,4 +69,3 @@ using DeleteJobPtr = std::shared_ptr; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/job/Job.h b/cpp/src/scheduler/job/Job.h index ccfa3518f9..5fe645363f 100644 --- a/cpp/src/scheduler/job/Job.h +++ b/cpp/src/scheduler/job/Job.h @@ -27,7 +27,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -66,4 +65,3 @@ using JobWPtr = std::weak_ptr; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/job/SearchJob.cpp b/cpp/src/scheduler/job/SearchJob.cpp index b4d3ef84c2..518e3111c0 100644 --- a/cpp/src/scheduler/job/SearchJob.cpp +++ b/cpp/src/scheduler/job/SearchJob.cpp @@ -18,12 +18,10 @@ #include "scheduler/job/SearchJob.h" #include "utils/Log.h" -namespace zilliz { namespace milvus { namespace scheduler { -SearchJob::SearchJob(zilliz::milvus::scheduler::JobId id, uint64_t topk, uint64_t nq, uint64_t nprobe, - const float* vectors) +SearchJob::SearchJob(milvus::scheduler::JobId id, uint64_t topk, uint64_t nq, uint64_t nprobe, const float* vectors) : Job(id, JobType::SEARCH), topk_(topk), nq_(nq), nprobe_(nprobe), vectors_(vectors) { } @@ -67,4 +65,3 @@ SearchJob::GetStatus() { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/job/SearchJob.h b/cpp/src/scheduler/job/SearchJob.h index 7ffb0cd201..aed40cd942 100644 --- a/cpp/src/scheduler/job/SearchJob.h +++ b/cpp/src/scheduler/job/SearchJob.h @@ -31,7 +31,6 @@ #include "Job.h" #include "db/meta/MetaTypes.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -107,4 +106,3 @@ using SearchJobPtr = std::shared_ptr; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/Connection.h b/cpp/src/scheduler/resource/Connection.h index ac2ac81bf5..421d32f768 100644 --- a/cpp/src/scheduler/resource/Connection.h +++ b/cpp/src/scheduler/resource/Connection.h @@ -21,7 +21,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -61,4 +60,3 @@ class Connection { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/CpuResource.cpp b/cpp/src/scheduler/resource/CpuResource.cpp index d1b0e2b8c3..500737a829 100644 --- a/cpp/src/scheduler/resource/CpuResource.cpp +++ b/cpp/src/scheduler/resource/CpuResource.cpp @@ -19,7 +19,6 @@ #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -45,4 +44,3 @@ CpuResource::Process(TaskPtr task) { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/CpuResource.h b/cpp/src/scheduler/resource/CpuResource.h index 562a306373..e3e4fc383f 100644 --- a/cpp/src/scheduler/resource/CpuResource.h +++ b/cpp/src/scheduler/resource/CpuResource.h @@ -21,7 +21,6 @@ #include "Resource.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -47,4 +46,3 @@ class CpuResource : public Resource { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/DiskResource.cpp b/cpp/src/scheduler/resource/DiskResource.cpp index 08c03d2ef2..fe1fc9c8d9 100644 --- a/cpp/src/scheduler/resource/DiskResource.cpp +++ b/cpp/src/scheduler/resource/DiskResource.cpp @@ -20,7 +20,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -44,4 +43,3 @@ DiskResource::Process(TaskPtr task) { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/DiskResource.h b/cpp/src/scheduler/resource/DiskResource.h index d86de49934..2346cd115a 100644 --- a/cpp/src/scheduler/resource/DiskResource.h +++ b/cpp/src/scheduler/resource/DiskResource.h @@ -21,7 +21,6 @@ #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -47,4 +46,3 @@ class DiskResource : public Resource { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/GpuResource.cpp b/cpp/src/scheduler/resource/GpuResource.cpp index a28b00bbe5..20ed73e38c 100644 --- a/cpp/src/scheduler/resource/GpuResource.cpp +++ b/cpp/src/scheduler/resource/GpuResource.cpp @@ -17,7 +17,6 @@ #include "scheduler/resource/GpuResource.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -43,4 +42,3 @@ GpuResource::Process(TaskPtr task) { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/GpuResource.h b/cpp/src/scheduler/resource/GpuResource.h index 33a197aed0..e0df03d5a7 100644 --- a/cpp/src/scheduler/resource/GpuResource.h +++ b/cpp/src/scheduler/resource/GpuResource.h @@ -22,7 +22,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -48,4 +47,3 @@ class GpuResource : public Resource { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/Node.cpp b/cpp/src/scheduler/resource/Node.cpp index 39333cc072..5401c36441 100644 --- a/cpp/src/scheduler/resource/Node.cpp +++ b/cpp/src/scheduler/resource/Node.cpp @@ -20,7 +20,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -61,4 +60,3 @@ Node::AddNeighbour(const NeighbourNodePtr& neighbour_node, Connection& connectio } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/Node.h b/cpp/src/scheduler/resource/Node.h index 588eef5f2e..071ee9bab8 100644 --- a/cpp/src/scheduler/resource/Node.h +++ b/cpp/src/scheduler/resource/Node.h @@ -25,7 +25,6 @@ #include "Connection.h" #include "scheduler/TaskTable.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -67,4 +66,3 @@ using NodeWPtr = std::weak_ptr; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/Resource.cpp b/cpp/src/scheduler/resource/Resource.cpp index 48208a07a5..8fea475d70 100644 --- a/cpp/src/scheduler/resource/Resource.cpp +++ b/cpp/src/scheduler/resource/Resource.cpp @@ -21,7 +21,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -178,4 +177,3 @@ Resource::executor_function() { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/Resource.h b/cpp/src/scheduler/resource/Resource.h index 2bffaae5cf..e8b50fe9af 100644 --- a/cpp/src/scheduler/resource/Resource.h +++ b/cpp/src/scheduler/resource/Resource.h @@ -35,7 +35,6 @@ #include "Connection.h" #include "Node.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -211,4 +210,3 @@ using ResourceWPtr = std::weak_ptr; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/TestResource.cpp b/cpp/src/scheduler/resource/TestResource.cpp index dd16117236..c8c2fb7537 100644 --- a/cpp/src/scheduler/resource/TestResource.cpp +++ b/cpp/src/scheduler/resource/TestResource.cpp @@ -19,7 +19,6 @@ #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -45,4 +44,3 @@ TestResource::Process(TaskPtr task) { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/resource/TestResource.h b/cpp/src/scheduler/resource/TestResource.h index 45dbe67500..9bbc5a54d0 100644 --- a/cpp/src/scheduler/resource/TestResource.h +++ b/cpp/src/scheduler/resource/TestResource.h @@ -22,7 +22,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -48,4 +47,3 @@ class TestResource : public Resource { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/task/DeleteTask.cpp b/cpp/src/scheduler/task/DeleteTask.cpp index c6cc33ac88..480fb86056 100644 --- a/cpp/src/scheduler/task/DeleteTask.cpp +++ b/cpp/src/scheduler/task/DeleteTask.cpp @@ -17,7 +17,6 @@ #include "scheduler/task/DeleteTask.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -36,4 +35,3 @@ XDeleteTask::Execute() { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/task/DeleteTask.h b/cpp/src/scheduler/task/DeleteTask.h index 473fee2681..75f0969bff 100644 --- a/cpp/src/scheduler/task/DeleteTask.h +++ b/cpp/src/scheduler/task/DeleteTask.h @@ -20,7 +20,6 @@ #include "Task.h" #include "scheduler/job/DeleteJob.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -40,4 +39,3 @@ class XDeleteTask : public Task { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/task/Path.h b/cpp/src/scheduler/task/Path.h index 2be2a7fc0d..c23db9bb09 100644 --- a/cpp/src/scheduler/task/Path.h +++ b/cpp/src/scheduler/task/Path.h @@ -20,7 +20,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -82,4 +81,3 @@ class Path { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/task/SearchTask.cpp b/cpp/src/scheduler/task/SearchTask.cpp index 0255699915..cf247ca421 100644 --- a/cpp/src/scheduler/task/SearchTask.cpp +++ b/cpp/src/scheduler/task/SearchTask.cpp @@ -26,7 +26,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -374,4 +373,3 @@ XSearchTask::TopkResult(scheduler::ResultSet& result_src, uint64_t topk, bool as } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/task/SearchTask.h b/cpp/src/scheduler/task/SearchTask.h index a89df4637b..3143799715 100644 --- a/cpp/src/scheduler/task/SearchTask.h +++ b/cpp/src/scheduler/task/SearchTask.h @@ -23,7 +23,6 @@ #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -63,4 +62,3 @@ class XSearchTask : public Task { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/task/Task.h b/cpp/src/scheduler/task/Task.h index da5fb3b3af..c4b118e0c8 100644 --- a/cpp/src/scheduler/task/Task.h +++ b/cpp/src/scheduler/task/Task.h @@ -25,7 +25,6 @@ #include #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -93,4 +92,3 @@ class Task { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/task/TestTask.cpp b/cpp/src/scheduler/task/TestTask.cpp index aba7343467..76e814a628 100644 --- a/cpp/src/scheduler/task/TestTask.cpp +++ b/cpp/src/scheduler/task/TestTask.cpp @@ -18,7 +18,6 @@ #include "scheduler/task/TestTask.h" #include "cache/GpuCacheMgr.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -48,4 +47,3 @@ TestTask::Wait() { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/task/TestTask.h b/cpp/src/scheduler/task/TestTask.h index 5d96b888aa..3ad9cb16e1 100644 --- a/cpp/src/scheduler/task/TestTask.h +++ b/cpp/src/scheduler/task/TestTask.h @@ -19,7 +19,6 @@ #include "SearchTask.h" -namespace zilliz { namespace milvus { namespace scheduler { @@ -48,4 +47,3 @@ class TestTask : public XSearchTask { } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/tasklabel/BroadcastLabel.h b/cpp/src/scheduler/tasklabel/BroadcastLabel.h index ed68d3ccc1..f0b48afb23 100644 --- a/cpp/src/scheduler/tasklabel/BroadcastLabel.h +++ b/cpp/src/scheduler/tasklabel/BroadcastLabel.h @@ -21,7 +21,6 @@ #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -35,4 +34,3 @@ using BroadcastLabelPtr = std::shared_ptr; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/tasklabel/DefaultLabel.h b/cpp/src/scheduler/tasklabel/DefaultLabel.h index fe7019f655..c215743575 100644 --- a/cpp/src/scheduler/tasklabel/DefaultLabel.h +++ b/cpp/src/scheduler/tasklabel/DefaultLabel.h @@ -21,7 +21,6 @@ #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -35,4 +34,3 @@ using DefaultLabelPtr = std::shared_ptr; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/tasklabel/SpecResLabel.h b/cpp/src/scheduler/tasklabel/SpecResLabel.h index b5bea81b39..2e42e6c2e9 100644 --- a/cpp/src/scheduler/tasklabel/SpecResLabel.h +++ b/cpp/src/scheduler/tasklabel/SpecResLabel.h @@ -26,7 +26,6 @@ class Resource; using ResourceWPtr = std::weak_ptr; -namespace zilliz { namespace milvus { namespace scheduler { @@ -55,4 +54,3 @@ using SpecResLabelPtr = std::shared_ptr(); } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/scheduler/tasklabel/TaskLabel.h b/cpp/src/scheduler/tasklabel/TaskLabel.h index 57f486ea89..d35ce409ff 100644 --- a/cpp/src/scheduler/tasklabel/TaskLabel.h +++ b/cpp/src/scheduler/tasklabel/TaskLabel.h @@ -19,7 +19,6 @@ #include -namespace zilliz { namespace milvus { namespace scheduler { @@ -48,4 +47,3 @@ using TaskLabelPtr = std::shared_ptr; } // namespace scheduler } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/Config.cpp b/cpp/src/server/Config.cpp index 76ac246c24..5d6a237c1d 100644 --- a/cpp/src/server/Config.cpp +++ b/cpp/src/server/Config.cpp @@ -30,7 +30,6 @@ #include "utils/CommonUtil.h" #include "utils/ValidationUtil.h" -namespace zilliz { namespace milvus { namespace server { @@ -1363,4 +1362,3 @@ Config::SetResourceConfigMode(const std::string& value) { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/Config.h b/cpp/src/server/Config.h index 4e3d563901..9f6932d267 100644 --- a/cpp/src/server/Config.h +++ b/cpp/src/server/Config.h @@ -26,7 +26,6 @@ #include "config/ConfigNode.h" #include "utils/Status.h" -namespace zilliz { namespace milvus { namespace server { @@ -359,4 +358,3 @@ class Config { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/DBWrapper.cpp b/cpp/src/server/DBWrapper.cpp index 713714cadc..401c494575 100644 --- a/cpp/src/server/DBWrapper.cpp +++ b/cpp/src/server/DBWrapper.cpp @@ -26,7 +26,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -170,4 +169,3 @@ DBWrapper::StopService() { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/DBWrapper.h b/cpp/src/server/DBWrapper.h index 6adc68dcb3..08e07c09f6 100644 --- a/cpp/src/server/DBWrapper.h +++ b/cpp/src/server/DBWrapper.h @@ -22,7 +22,6 @@ #include -namespace zilliz { namespace milvus { namespace server { @@ -59,4 +58,3 @@ class DBWrapper { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/Server.cpp b/cpp/src/server/Server.cpp index 2e06cccf8a..d9aabfc179 100644 --- a/cpp/src/server/Server.cpp +++ b/cpp/src/server/Server.cpp @@ -37,7 +37,6 @@ #include "utils/TimeRecorder.h" #include "wrapper/KnowhereResource.h" -namespace zilliz { namespace milvus { namespace server { @@ -264,4 +263,3 @@ Server::StopService() { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/Server.h b/cpp/src/server/Server.h index b86945cef9..658dbf7c30 100644 --- a/cpp/src/server/Server.h +++ b/cpp/src/server/Server.h @@ -22,7 +22,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -65,4 +64,3 @@ class Server { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/grpc_impl/GrpcRequestHandler.cpp b/cpp/src/server/grpc_impl/GrpcRequestHandler.cpp index 6089df6f8e..a9ee3d77d0 100644 --- a/cpp/src/server/grpc_impl/GrpcRequestHandler.cpp +++ b/cpp/src/server/grpc_impl/GrpcRequestHandler.cpp @@ -21,7 +21,6 @@ #include -namespace zilliz { namespace milvus { namespace server { namespace grpc { @@ -197,4 +196,3 @@ GrpcRequestHandler::DropIndex(::grpc::ServerContext* context, const ::milvus::gr } // namespace grpc } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/grpc_impl/GrpcRequestHandler.h b/cpp/src/server/grpc_impl/GrpcRequestHandler.h index 66ec126371..0decf61500 100644 --- a/cpp/src/server/grpc_impl/GrpcRequestHandler.h +++ b/cpp/src/server/grpc_impl/GrpcRequestHandler.h @@ -23,7 +23,6 @@ #include "grpc/gen-milvus/milvus.grpc.pb.h" #include "grpc/gen-status/status.pb.h" -namespace zilliz { namespace milvus { namespace server { namespace grpc { @@ -324,4 +323,3 @@ class GrpcRequestHandler final : public ::milvus::grpc::MilvusService::Service { } // namespace grpc } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/grpc_impl/GrpcRequestScheduler.cpp b/cpp/src/server/grpc_impl/GrpcRequestScheduler.cpp index 9135cd6f6c..b2aefe4f65 100644 --- a/cpp/src/server/grpc_impl/GrpcRequestScheduler.cpp +++ b/cpp/src/server/grpc_impl/GrpcRequestScheduler.cpp @@ -22,7 +22,6 @@ #include -namespace zilliz { namespace milvus { namespace server { namespace grpc { @@ -239,4 +238,3 @@ GrpcRequestScheduler::PutTaskToQueue(const BaseTaskPtr& task_ptr) { } // namespace grpc } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/grpc_impl/GrpcRequestScheduler.h b/cpp/src/server/grpc_impl/GrpcRequestScheduler.h index d38f4c67ac..802d247fb5 100644 --- a/cpp/src/server/grpc_impl/GrpcRequestScheduler.h +++ b/cpp/src/server/grpc_impl/GrpcRequestScheduler.h @@ -28,7 +28,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { namespace grpc { @@ -130,4 +129,3 @@ class GrpcRequestScheduler { } // namespace grpc } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/grpc_impl/GrpcRequestTask.cpp b/cpp/src/server/grpc_impl/GrpcRequestTask.cpp index 241e24e8f6..9f0b8fd95d 100644 --- a/cpp/src/server/grpc_impl/GrpcRequestTask.cpp +++ b/cpp/src/server/grpc_impl/GrpcRequestTask.cpp @@ -34,7 +34,6 @@ #include "utils/TimeRecorder.h" #include "utils/ValidationUtil.h" -namespace zilliz { namespace milvus { namespace server { namespace grpc { @@ -43,8 +42,8 @@ static const char* DQL_TASK_GROUP = "dql"; static const char* DDL_DML_TASK_GROUP = "ddl_dml"; static const char* PING_TASK_GROUP = "ping"; -using DB_META = zilliz::milvus::engine::meta::Meta; -using DB_DATE = zilliz::milvus::engine::meta::DateT; +using DB_META = milvus::engine::meta::Meta; +using DB_DATE = milvus::engine::meta::DateT; namespace { engine::EngineType @@ -934,4 +933,3 @@ DropIndexTask::OnExecute() { } // namespace grpc } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/grpc_impl/GrpcRequestTask.h b/cpp/src/server/grpc_impl/GrpcRequestTask.h index af5ed2bc80..ad2828ebf3 100644 --- a/cpp/src/server/grpc_impl/GrpcRequestTask.h +++ b/cpp/src/server/grpc_impl/GrpcRequestTask.h @@ -29,7 +29,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { namespace grpc { @@ -271,4 +270,3 @@ class DropIndexTask : public GrpcBaseTask { } // namespace grpc } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/grpc_impl/GrpcServer.cpp b/cpp/src/server/grpc_impl/GrpcServer.cpp index dd7895c679..5e0c5f3169 100644 --- a/cpp/src/server/grpc_impl/GrpcServer.cpp +++ b/cpp/src/server/grpc_impl/GrpcServer.cpp @@ -36,7 +36,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { namespace grpc { @@ -119,4 +118,3 @@ GrpcServer::StopService() { } // namespace grpc } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/server/grpc_impl/GrpcServer.h b/cpp/src/server/grpc_impl/GrpcServer.h index 9f3f827936..aeaf9f0dca 100644 --- a/cpp/src/server/grpc_impl/GrpcServer.h +++ b/cpp/src/server/grpc_impl/GrpcServer.h @@ -25,7 +25,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { namespace grpc { @@ -60,4 +59,3 @@ class GrpcServer { } // namespace grpc } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/BlockingQueue.h b/cpp/src/utils/BlockingQueue.h index 422f170cd6..dc7968fcb6 100644 --- a/cpp/src/utils/BlockingQueue.h +++ b/cpp/src/utils/BlockingQueue.h @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -69,6 +68,5 @@ class BlockingQueue { } // namespace server } // namespace milvus -} // namespace zilliz #include "./BlockingQueue.inl" diff --git a/cpp/src/utils/BlockingQueue.inl b/cpp/src/utils/BlockingQueue.inl index ed15aac77a..c4318c5fc6 100644 --- a/cpp/src/utils/BlockingQueue.inl +++ b/cpp/src/utils/BlockingQueue.inl @@ -18,7 +18,7 @@ #pragma once -namespace zilliz { + namespace milvus { namespace server { @@ -94,5 +94,5 @@ BlockingQueue::SetCapacity(const size_t capacity) { } // namespace server } // namespace milvus -} // namespace zilliz + diff --git a/cpp/src/utils/CommonUtil.cpp b/cpp/src/utils/CommonUtil.cpp index 14ed34481f..fbf3112aeb 100644 --- a/cpp/src/utils/CommonUtil.cpp +++ b/cpp/src/utils/CommonUtil.cpp @@ -38,7 +38,6 @@ #define THREAD_MULTIPLY_CPU 1 #endif -namespace zilliz { namespace milvus { namespace server { @@ -225,4 +224,3 @@ CommonUtil::ConvertTime(tm time_struct, time_t& time_integer) { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/CommonUtil.h b/cpp/src/utils/CommonUtil.h index 58ac41ecb1..939bdd6d31 100644 --- a/cpp/src/utils/CommonUtil.h +++ b/cpp/src/utils/CommonUtil.h @@ -22,7 +22,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -61,4 +60,3 @@ class CommonUtil { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/Error.h b/cpp/src/utils/Error.h index 59e9015afb..81403947c8 100644 --- a/cpp/src/utils/Error.h +++ b/cpp/src/utils/Error.h @@ -21,7 +21,6 @@ #include #include -namespace zilliz { namespace milvus { using ErrorCode = int32_t; @@ -123,4 +122,3 @@ class ServerException : public std::exception { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/Exception.h b/cpp/src/utils/Exception.h index 2ca61c4884..a2d8473fa3 100644 --- a/cpp/src/utils/Exception.h +++ b/cpp/src/utils/Exception.h @@ -22,7 +22,6 @@ #include #include -namespace zilliz { namespace milvus { class Exception : public std::exception { @@ -62,4 +61,3 @@ class InvalidArgumentException : public Exception { }; } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/Log.h b/cpp/src/utils/Log.h index 64a8622b73..1dd116367a 100644 --- a/cpp/src/utils/Log.h +++ b/cpp/src/utils/Log.h @@ -19,7 +19,6 @@ #include "utils/easylogging++.h" -namespace zilliz { namespace milvus { ///////////////////////////////////////////////////////////////////////////////////////////////// @@ -53,4 +52,3 @@ namespace milvus { #define WRAPPER_LOG_FATAL LOG(FATAL) << WRAPPER_DOMAIN_NAME } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/LogUtil.cpp b/cpp/src/utils/LogUtil.cpp index 32e942bca3..ed2e1a446b 100644 --- a/cpp/src/utils/LogUtil.cpp +++ b/cpp/src/utils/LogUtil.cpp @@ -21,7 +21,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -95,4 +94,3 @@ InitLog(const std::string& log_config_file) { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/LogUtil.h b/cpp/src/utils/LogUtil.h index eb396f266e..9926939442 100644 --- a/cpp/src/utils/LogUtil.h +++ b/cpp/src/utils/LogUtil.h @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -35,11 +34,10 @@ RolloutHandler(const char* filename, std::size_t size, el::Level level); #define SHOW_LOCATION #ifdef SHOW_LOCATION -#define LOCATION_INFO "[" << zilliz::sql::server::GetFileName(__FILE__) << ":" << __LINE__ << "] " +#define LOCATION_INFO "[" << sql::server::GetFileName(__FILE__) << ":" << __LINE__ << "] " #else #define LOCATION_INFO "" #endif } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/SignalUtil.cpp b/cpp/src/utils/SignalUtil.cpp index a01e7573c7..5531aaed27 100644 --- a/cpp/src/utils/SignalUtil.cpp +++ b/cpp/src/utils/SignalUtil.cpp @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -68,4 +67,3 @@ SignalUtil::PrintStacktrace() { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/SignalUtil.h b/cpp/src/utils/SignalUtil.h index 414b320321..2ecfdecfba 100644 --- a/cpp/src/utils/SignalUtil.h +++ b/cpp/src/utils/SignalUtil.h @@ -17,7 +17,6 @@ #pragma once -namespace zilliz { namespace milvus { namespace server { @@ -31,4 +30,3 @@ class SignalUtil { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/Status.cpp b/cpp/src/utils/Status.cpp index 95132d3a2a..ad97717cf7 100644 --- a/cpp/src/utils/Status.cpp +++ b/cpp/src/utils/Status.cpp @@ -19,7 +19,6 @@ #include -namespace zilliz { namespace milvus { constexpr int CODE_WIDTH = sizeof(StatusCode); @@ -138,4 +137,3 @@ Status::ToString() const { } } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/Status.h b/cpp/src/utils/Status.h index cb6c134781..07a12261bb 100644 --- a/cpp/src/utils/Status.h +++ b/cpp/src/utils/Status.h @@ -21,7 +21,6 @@ #include -namespace zilliz { namespace milvus { using StatusCode = ErrorCode; @@ -75,4 +74,3 @@ class Status { }; // Status } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/StringHelpFunctions.cpp b/cpp/src/utils/StringHelpFunctions.cpp index 444467845f..230cc1a0ff 100644 --- a/cpp/src/utils/StringHelpFunctions.cpp +++ b/cpp/src/utils/StringHelpFunctions.cpp @@ -19,7 +19,6 @@ #include -namespace zilliz { namespace milvus { namespace server { @@ -125,4 +124,3 @@ StringHelpFunctions::SplitStringByQuote(const std::string& str, const std::strin } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/StringHelpFunctions.h b/cpp/src/utils/StringHelpFunctions.h index 06615fc740..cb355332f1 100644 --- a/cpp/src/utils/StringHelpFunctions.h +++ b/cpp/src/utils/StringHelpFunctions.h @@ -22,7 +22,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -61,4 +60,3 @@ class StringHelpFunctions { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/ThreadPool.h b/cpp/src/utils/ThreadPool.h index db4c9d11ad..d605d70018 100644 --- a/cpp/src/utils/ThreadPool.h +++ b/cpp/src/utils/ThreadPool.h @@ -30,7 +30,6 @@ #define MAX_THREADS_NUM 32 -namespace zilliz { namespace milvus { class ThreadPool { @@ -118,4 +117,3 @@ inline ThreadPool::~ThreadPool() { } } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/TimeRecorder.cpp b/cpp/src/utils/TimeRecorder.cpp index cffcbc98ef..f3061d9d2b 100644 --- a/cpp/src/utils/TimeRecorder.cpp +++ b/cpp/src/utils/TimeRecorder.cpp @@ -18,7 +18,6 @@ #include "utils/TimeRecorder.h" #include "utils/Log.h" -namespace zilliz { namespace milvus { TimeRecorder::TimeRecorder(const std::string& header, int64_t log_level) : header_(header), log_level_(log_level) { @@ -98,4 +97,3 @@ TimeRecorder::ElapseFromBegin(const std::string& msg) { } } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/TimeRecorder.h b/cpp/src/utils/TimeRecorder.h index 8f795f01c3..cc0a86fbe0 100644 --- a/cpp/src/utils/TimeRecorder.h +++ b/cpp/src/utils/TimeRecorder.h @@ -20,7 +20,6 @@ #include #include -namespace zilliz { namespace milvus { class TimeRecorder { @@ -52,4 +51,3 @@ class TimeRecorder { }; } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/ValidationUtil.cpp b/cpp/src/utils/ValidationUtil.cpp index a39427ef15..248be51088 100644 --- a/cpp/src/utils/ValidationUtil.cpp +++ b/cpp/src/utils/ValidationUtil.cpp @@ -25,7 +25,6 @@ #include #include -namespace zilliz { namespace milvus { namespace server { @@ -290,4 +289,3 @@ ValidationUtil::ValidateDbURI(const std::string& uri) { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/utils/ValidationUtil.h b/cpp/src/utils/ValidationUtil.h index 415347cec5..7b24c93fb5 100644 --- a/cpp/src/utils/ValidationUtil.h +++ b/cpp/src/utils/ValidationUtil.h @@ -22,7 +22,6 @@ #include -namespace zilliz { namespace milvus { namespace server { @@ -79,4 +78,3 @@ class ValidationUtil { } // namespace server } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/wrapper/ConfAdapter.cpp b/cpp/src/wrapper/ConfAdapter.cpp index 09d219b999..2dcf6bab7e 100644 --- a/cpp/src/wrapper/ConfAdapter.cpp +++ b/cpp/src/wrapper/ConfAdapter.cpp @@ -24,7 +24,6 @@ // TODO(lxj): add conf checker -namespace zilliz { namespace milvus { namespace engine { @@ -162,4 +161,3 @@ NSGConfAdapter::MatchSearch(const TempMetaConf& metaconf, const IndexType& type) } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/wrapper/ConfAdapter.h b/cpp/src/wrapper/ConfAdapter.h index e02d76e441..4c8e528a2d 100644 --- a/cpp/src/wrapper/ConfAdapter.h +++ b/cpp/src/wrapper/ConfAdapter.h @@ -22,7 +22,6 @@ #include -namespace zilliz { namespace milvus { namespace engine { @@ -93,4 +92,3 @@ class NSGConfAdapter : public IVFConfAdapter { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/wrapper/ConfAdapterMgr.cpp b/cpp/src/wrapper/ConfAdapterMgr.cpp index 4ed80b22b7..05c23c4238 100644 --- a/cpp/src/wrapper/ConfAdapterMgr.cpp +++ b/cpp/src/wrapper/ConfAdapterMgr.cpp @@ -18,7 +18,6 @@ #include "wrapper/ConfAdapterMgr.h" #include "utils/Exception.h" -namespace zilliz { namespace milvus { namespace engine { @@ -59,4 +58,3 @@ AdapterMgr::RegisterAdapter() { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/wrapper/ConfAdapterMgr.h b/cpp/src/wrapper/ConfAdapterMgr.h index 1ac0647c16..a88e090760 100644 --- a/cpp/src/wrapper/ConfAdapterMgr.h +++ b/cpp/src/wrapper/ConfAdapterMgr.h @@ -23,7 +23,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -55,4 +54,3 @@ class AdapterMgr { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/wrapper/DataTransfer.cpp b/cpp/src/wrapper/DataTransfer.cpp index ac771c1895..5eb83290d1 100644 --- a/cpp/src/wrapper/DataTransfer.cpp +++ b/cpp/src/wrapper/DataTransfer.cpp @@ -21,7 +21,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -57,4 +56,3 @@ GenDataset(const int64_t& nb, const int64_t& dim, const float* xb) { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/wrapper/DataTransfer.h b/cpp/src/wrapper/DataTransfer.h index ad5361c4f5..e945eaa6db 100644 --- a/cpp/src/wrapper/DataTransfer.h +++ b/cpp/src/wrapper/DataTransfer.h @@ -19,16 +19,14 @@ #include "knowhere/adapter/Structure.h" -namespace zilliz { namespace milvus { namespace engine { -extern zilliz::knowhere::DatasetPtr +extern knowhere::DatasetPtr GenDatasetWithIds(const int64_t& nb, const int64_t& dim, const float* xb, const int64_t* ids); -extern zilliz::knowhere::DatasetPtr +extern knowhere::DatasetPtr GenDataset(const int64_t& nb, const int64_t& dim, const float* xb); } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/wrapper/KnowhereResource.cpp b/cpp/src/wrapper/KnowhereResource.cpp index 7194ba2374..d291bb9299 100644 --- a/cpp/src/wrapper/KnowhereResource.cpp +++ b/cpp/src/wrapper/KnowhereResource.cpp @@ -25,7 +25,6 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { @@ -85,4 +84,3 @@ KnowhereResource::Finalize() { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/wrapper/KnowhereResource.h b/cpp/src/wrapper/KnowhereResource.h index 144d632c07..dff8b32c0b 100644 --- a/cpp/src/wrapper/KnowhereResource.h +++ b/cpp/src/wrapper/KnowhereResource.h @@ -19,7 +19,6 @@ #include "utils/Status.h" -namespace zilliz { namespace milvus { namespace engine { @@ -34,4 +33,3 @@ class KnowhereResource { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/wrapper/VecImpl.cpp b/cpp/src/wrapper/VecImpl.cpp index 0e90ab135e..a6023052db 100644 --- a/cpp/src/wrapper/VecImpl.cpp +++ b/cpp/src/wrapper/VecImpl.cpp @@ -28,7 +28,6 @@ * only responible for index combination */ -namespace zilliz { namespace milvus { namespace engine { @@ -115,14 +114,14 @@ VecIndexImpl::Search(const int64_t& nq, const float* xq, float* dist, int64_t* i return Status::OK(); } -zilliz::knowhere::BinarySet +knowhere::BinarySet VecIndexImpl::Serialize() { type = ConvertToCpuIndexType(type); return index_->Serialize(); } Status -VecIndexImpl::Load(const zilliz::knowhere::BinarySet& index_binary) { +VecIndexImpl::Load(const knowhere::BinarySet& index_binary) { index_->Load(index_binary); dim = Dimension(); return Status::OK(); @@ -146,7 +145,7 @@ VecIndexImpl::GetType() { VecIndexPtr VecIndexImpl::CopyToGpu(const int64_t& device_id, const Config& cfg) { // TODO(linxj): exception handle - auto gpu_index = zilliz::knowhere::cloner::CopyCpuToGpu(index_, device_id, cfg); + auto gpu_index = knowhere::cloner::CopyCpuToGpu(index_, device_id, cfg); auto new_index = std::make_shared(gpu_index, ConvertToGpuIndexType(type)); new_index->dim = dim; return new_index; @@ -155,7 +154,7 @@ VecIndexImpl::CopyToGpu(const int64_t& device_id, const Config& cfg) { VecIndexPtr VecIndexImpl::CopyToCpu(const Config& cfg) { // TODO(linxj): exception handle - auto cpu_index = zilliz::knowhere::cloner::CopyGpuToCpu(index_, cfg); + auto cpu_index = knowhere::cloner::CopyGpuToCpu(index_, cfg); auto new_index = std::make_shared(cpu_index, ConvertToCpuIndexType(type)); new_index->dim = dim; return new_index; @@ -259,7 +258,7 @@ IVFMixIndex::BuildAll(const int64_t& nb, const float* xb, const int64_t* ids, co } Status -IVFMixIndex::Load(const zilliz::knowhere::BinarySet& index_binary) { +IVFMixIndex::Load(const knowhere::BinarySet& index_binary) { index_->Load(index_binary); dim = Dimension(); return Status::OK(); @@ -267,4 +266,3 @@ IVFMixIndex::Load(const zilliz::knowhere::BinarySet& index_binary) { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/wrapper/VecImpl.h b/cpp/src/wrapper/VecImpl.h index fe015424f6..2be822084f 100644 --- a/cpp/src/wrapper/VecImpl.h +++ b/cpp/src/wrapper/VecImpl.h @@ -23,13 +23,12 @@ #include #include -namespace zilliz { namespace milvus { namespace engine { class VecIndexImpl : public VecIndex { public: - explicit VecIndexImpl(std::shared_ptr index, const IndexType& type) + explicit VecIndexImpl(std::shared_ptr index, const IndexType& type) : index_(std::move(index)), type(type) { } @@ -55,11 +54,11 @@ class VecIndexImpl : public VecIndex { Status Add(const int64_t& nb, const float* xb, const int64_t* ids, const Config& cfg) override; - zilliz::knowhere::BinarySet + knowhere::BinarySet Serialize() override; Status - Load(const zilliz::knowhere::BinarySet& index_binary) override; + Load(const knowhere::BinarySet& index_binary) override; VecIndexPtr Clone() override; @@ -75,12 +74,12 @@ class VecIndexImpl : public VecIndex { IndexType type = IndexType::INVALID; - std::shared_ptr index_ = nullptr; + std::shared_ptr index_ = nullptr; }; class IVFMixIndex : public VecIndexImpl { public: - explicit IVFMixIndex(std::shared_ptr index, const IndexType& type) + explicit IVFMixIndex(std::shared_ptr index, const IndexType& type) : VecIndexImpl(std::move(index), type) { } @@ -89,12 +88,12 @@ class IVFMixIndex : public VecIndexImpl { const float* xt) override; Status - Load(const zilliz::knowhere::BinarySet& index_binary) override; + Load(const knowhere::BinarySet& index_binary) override; }; class BFIndex : public VecIndexImpl { public: - explicit BFIndex(std::shared_ptr index) + explicit BFIndex(std::shared_ptr index) : VecIndexImpl(std::move(index), IndexType::FAISS_IDMAP) { } @@ -114,4 +113,3 @@ class BFIndex : public VecIndexImpl { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/wrapper/VecIndex.cpp b/cpp/src/wrapper/VecIndex.cpp index c5ebd684fa..627f3515e4 100644 --- a/cpp/src/wrapper/VecIndex.cpp +++ b/cpp/src/wrapper/VecIndex.cpp @@ -31,7 +31,6 @@ #include -namespace zilliz { namespace milvus { namespace engine { @@ -95,51 +94,51 @@ FileIOWriter::operator()(void* ptr, size_t size) { VecIndexPtr GetVecIndexFactory(const IndexType& type, const Config& cfg) { - std::shared_ptr index; + std::shared_ptr index; auto gpu_device = -1; // TODO(linxj): remove hardcode here switch (type) { case IndexType::FAISS_IDMAP: { - index = std::make_shared(); + index = std::make_shared(); return std::make_shared(index); } case IndexType::FAISS_IVFFLAT_CPU: { - index = std::make_shared(); + index = std::make_shared(); break; } case IndexType::FAISS_IVFFLAT_GPU: { - index = std::make_shared(gpu_device); + index = std::make_shared(gpu_device); break; } case IndexType::FAISS_IVFFLAT_MIX: { - index = std::make_shared(gpu_device); + index = std::make_shared(gpu_device); return std::make_shared(index, IndexType::FAISS_IVFFLAT_MIX); } case IndexType::FAISS_IVFPQ_CPU: { - index = std::make_shared(); + index = std::make_shared(); break; } case IndexType::FAISS_IVFPQ_GPU: { - index = std::make_shared(gpu_device); + index = std::make_shared(gpu_device); break; } case IndexType::SPTAG_KDT_RNT_CPU: { - index = std::make_shared(); + index = std::make_shared(); break; } case IndexType::FAISS_IVFSQ8_MIX: { - index = std::make_shared(gpu_device); + index = std::make_shared(gpu_device); return std::make_shared(index, IndexType::FAISS_IVFSQ8_MIX); } case IndexType::FAISS_IVFSQ8_CPU: { - index = std::make_shared(); + index = std::make_shared(); break; } case IndexType::FAISS_IVFSQ8_GPU: { - index = std::make_shared(gpu_device); + index = std::make_shared(gpu_device); break; } case IndexType::NSG_MIX: { - index = std::make_shared(gpu_device); + index = std::make_shared(gpu_device); break; } default: { return nullptr; } @@ -148,7 +147,7 @@ GetVecIndexFactory(const IndexType& type, const Config& cfg) { } VecIndexPtr -LoadVecIndex(const IndexType& index_type, const zilliz::knowhere::BinarySet& index_binary) { +LoadVecIndex(const IndexType& index_type, const knowhere::BinarySet& index_binary) { auto index = GetVecIndexFactory(index_type); index->Load(index_binary); return index; @@ -267,4 +266,3 @@ ConvertToGpuIndexType(const IndexType& type) { } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/src/wrapper/VecIndex.h b/cpp/src/wrapper/VecIndex.h index 4bc51021ce..d2088b64ef 100644 --- a/cpp/src/wrapper/VecIndex.h +++ b/cpp/src/wrapper/VecIndex.h @@ -24,11 +24,10 @@ #include "knowhere/common/Config.h" #include "utils/Status.h" -namespace zilliz { namespace milvus { namespace engine { -using Config = zilliz::knowhere::Config; +using Config = knowhere::Config; enum class IndexType { INVALID = 0, @@ -82,11 +81,11 @@ class VecIndex { virtual int64_t Count() = 0; - virtual zilliz::knowhere::BinarySet + virtual knowhere::BinarySet Serialize() = 0; virtual Status - Load(const zilliz::knowhere::BinarySet& index_binary) = 0; + Load(const knowhere::BinarySet& index_binary) = 0; }; extern Status @@ -99,7 +98,7 @@ extern VecIndexPtr GetVecIndexFactory(const IndexType& type, const Config& cfg = Config()); extern VecIndexPtr -LoadVecIndex(const IndexType& index_type, const zilliz::knowhere::BinarySet& index_binary); +LoadVecIndex(const IndexType& index_type, const knowhere::BinarySet& index_binary); extern IndexType ConvertToCpuIndexType(const IndexType& type); @@ -109,4 +108,3 @@ ConvertToGpuIndexType(const IndexType& type); } // namespace engine } // namespace milvus -} // namespace zilliz diff --git a/cpp/unittest/db/test_db.cpp b/cpp/unittest/db/test_db.cpp index 0bb74437b0..413e192335 100644 --- a/cpp/unittest/db/test_db.cpp +++ b/cpp/unittest/db/test_db.cpp @@ -30,7 +30,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; static const char *TABLE_NAME = "test_group"; static constexpr int64_t TABLE_DIM = 256; @@ -81,11 +81,11 @@ ConvertTimeRangeToDBDates(const std::string &start_value, time_t tt_start, tt_end; tm tm_start, tm_end; - if (!zilliz::milvus::server::CommonUtil::TimeStrToTime(start_value, tt_start, tm_start)) { + if (!milvus::server::CommonUtil::TimeStrToTime(start_value, tt_start, tm_start)) { return; } - if (!zilliz::milvus::server::CommonUtil::TimeStrToTime(end_value, tt_end, tm_end)) { + if (!milvus::server::CommonUtil::TimeStrToTime(end_value, tt_end, tm_end)) { return; } @@ -98,7 +98,7 @@ ConvertTimeRangeToDBDates(const std::string &start_value, for (int64_t i = 0; i < days; i++) { time_t tt_day = tt_start + DAY_SECONDS * i; tm tm_day; - zilliz::milvus::server::CommonUtil::ConvertTime(tt_day, tm_day); + milvus::server::CommonUtil::ConvertTime(tt_day, tm_day); int64_t date = tm_day.tm_year * 10000 + tm_day.tm_mon * 100 + tm_day.tm_mday;//according to db logic diff --git a/cpp/unittest/db/test_db_mysql.cpp b/cpp/unittest/db/test_db_mysql.cpp index 2a7456785e..89d92c1e06 100644 --- a/cpp/unittest/db/test_db_mysql.cpp +++ b/cpp/unittest/db/test_db_mysql.cpp @@ -28,7 +28,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; static const char *TABLE_NAME = "test_group"; static constexpr int64_t TABLE_DIM = 256; diff --git a/cpp/unittest/db/test_engine.cpp b/cpp/unittest/db/test_engine.cpp index 517b2fd506..40afbb38f9 100644 --- a/cpp/unittest/db/test_engine.cpp +++ b/cpp/unittest/db/test_engine.cpp @@ -25,7 +25,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; } diff --git a/cpp/unittest/db/test_mem.cpp b/cpp/unittest/db/test_mem.cpp index 93500acce7..a99631155e 100644 --- a/cpp/unittest/db/test_mem.cpp +++ b/cpp/unittest/db/test_mem.cpp @@ -37,7 +37,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; static constexpr int64_t TABLE_DIM = 256; diff --git a/cpp/unittest/db/test_meta.cpp b/cpp/unittest/db/test_meta.cpp index 39217ea298..b8eb690462 100644 --- a/cpp/unittest/db/test_meta.cpp +++ b/cpp/unittest/db/test_meta.cpp @@ -27,7 +27,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; } // namespace diff --git a/cpp/unittest/db/test_meta_mysql.cpp b/cpp/unittest/db/test_meta_mysql.cpp index 5605b9eb14..c1d33a17a4 100644 --- a/cpp/unittest/db/test_meta_mysql.cpp +++ b/cpp/unittest/db/test_meta_mysql.cpp @@ -29,7 +29,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; } diff --git a/cpp/unittest/db/test_misc.cpp b/cpp/unittest/db/test_misc.cpp index d6b024930f..18cca45b4b 100644 --- a/cpp/unittest/db/test_misc.cpp +++ b/cpp/unittest/db/test_misc.cpp @@ -29,7 +29,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; } // namespace diff --git a/cpp/unittest/db/test_search.cpp b/cpp/unittest/db/test_search.cpp index d0d55a11c6..12fc8e277a 100644 --- a/cpp/unittest/db/test_search.cpp +++ b/cpp/unittest/db/test_search.cpp @@ -24,7 +24,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; static constexpr uint64_t NQ = 15; static constexpr uint64_t TOP_K = 64; diff --git a/cpp/unittest/db/utils.cpp b/cpp/unittest/db/utils.cpp index 2ad7c4f743..61c75a0933 100644 --- a/cpp/unittest/db/utils.cpp +++ b/cpp/unittest/db/utils.cpp @@ -33,7 +33,7 @@ INITIALIZE_EASYLOGGINGPP namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; class DBTestEnvironment : public ::testing::Environment { public: @@ -73,14 +73,14 @@ void BaseTest::SetUp() { InitLog(); - zilliz::knowhere::FaissGpuResourceMgr::GetInstance().InitDevice(0, 1024 * 1024 * 200, 1024 * 1024 * 300, 2); + knowhere::FaissGpuResourceMgr::GetInstance().InitDevice(0, 1024 * 1024 * 200, 1024 * 1024 * 300, 2); } void BaseTest::TearDown() { - zilliz::milvus::cache::CpuCacheMgr::GetInstance()->ClearCache(); - zilliz::milvus::cache::GpuCacheMgr::GetInstance(0)->ClearCache(); - zilliz::knowhere::FaissGpuResourceMgr::GetInstance().Free(); + milvus::cache::CpuCacheMgr::GetInstance()->ClearCache(); + milvus::cache::GpuCacheMgr::GetInstance(0)->ClearCache(); + knowhere::FaissGpuResourceMgr::GetInstance().Free(); } ms::engine::DBOptions diff --git a/cpp/unittest/db/utils.h b/cpp/unittest/db/utils.h index dee9dcf843..8da160dc92 100644 --- a/cpp/unittest/db/utils.h +++ b/cpp/unittest/db/utils.h @@ -48,13 +48,13 @@ class BaseTest : public ::testing::Test { void SetUp() override; void TearDown() override; - virtual zilliz::milvus::engine::DBOptions GetOptions(); + virtual milvus::engine::DBOptions GetOptions(); }; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// class DBTest : public BaseTest { protected: - zilliz::milvus::engine::DBPtr db_; + milvus::engine::DBPtr db_; void SetUp() override; void TearDown() override; @@ -63,7 +63,7 @@ class DBTest : public BaseTest { ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// class DBTest2 : public DBTest { protected: - zilliz::milvus::engine::DBOptions GetOptions() override; + milvus::engine::DBOptions GetOptions() override; }; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -73,7 +73,7 @@ class EngineTest : public DBTest { ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// class MetaTest : public BaseTest { protected: - std::shared_ptr impl_; + std::shared_ptr impl_; void SetUp() override; void TearDown() override; @@ -82,17 +82,17 @@ class MetaTest : public BaseTest { ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// class MySqlDBTest : public DBTest { protected: - zilliz::milvus::engine::DBOptions GetOptions() override; + milvus::engine::DBOptions GetOptions() override; }; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// class MySqlMetaTest : public BaseTest { protected: - std::shared_ptr impl_; + std::shared_ptr impl_; void SetUp() override; void TearDown() override; - zilliz::milvus::engine::DBOptions GetOptions() override; + milvus::engine::DBOptions GetOptions() override; }; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/cpp/unittest/metrics/test_metricbase.cpp b/cpp/unittest/metrics/test_metricbase.cpp index 7f77312480..4edb3b8151 100644 --- a/cpp/unittest/metrics/test_metricbase.cpp +++ b/cpp/unittest/metrics/test_metricbase.cpp @@ -23,7 +23,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; } // namespace diff --git a/cpp/unittest/metrics/test_metrics.cpp b/cpp/unittest/metrics/test_metrics.cpp index ec950fedcc..ba0b51af00 100644 --- a/cpp/unittest/metrics/test_metrics.cpp +++ b/cpp/unittest/metrics/test_metrics.cpp @@ -31,7 +31,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; } // namespace @@ -47,8 +47,8 @@ TEST_F(MetricTest, METRIC_TEST) { ms::server::Metrics::GetInstance().Init(); // server::PrometheusMetrics::GetInstance().exposer_ptr()->RegisterCollectable(server::PrometheusMetrics::GetInstance().registry_ptr()); - zilliz::milvus::cache::CpuCacheMgr::GetInstance()->SetCapacity(1UL * 1024 * 1024 * 1024); - std::cout << zilliz::milvus::cache::CpuCacheMgr::GetInstance()->CacheCapacity() << std::endl; + milvus::cache::CpuCacheMgr::GetInstance()->SetCapacity(1UL * 1024 * 1024 * 1024); + std::cout << milvus::cache::CpuCacheMgr::GetInstance()->CacheCapacity() << std::endl; static const char *group_name = "test_group"; static const int group_dim = 256; diff --git a/cpp/unittest/metrics/test_prometheus.cpp b/cpp/unittest/metrics/test_prometheus.cpp index 4847e61627..14982d058d 100644 --- a/cpp/unittest/metrics/test_prometheus.cpp +++ b/cpp/unittest/metrics/test_prometheus.cpp @@ -24,7 +24,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; } // namespace diff --git a/cpp/unittest/metrics/utils.cpp b/cpp/unittest/metrics/utils.cpp index 8275222766..c2a53babc3 100644 --- a/cpp/unittest/metrics/utils.cpp +++ b/cpp/unittest/metrics/utils.cpp @@ -28,7 +28,7 @@ INITIALIZE_EASYLOGGINGPP namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; class DBTestEnvironment : public ::testing::Environment { public: diff --git a/cpp/unittest/metrics/utils.h b/cpp/unittest/metrics/utils.h index 3daeeb8fa6..996dec89f5 100644 --- a/cpp/unittest/metrics/utils.h +++ b/cpp/unittest/metrics/utils.h @@ -41,7 +41,7 @@ #endif void -ASSERT_STATS(zilliz::milvus::Status &stat); +ASSERT_STATS(milvus::Status &stat); //class TestEnv : public ::testing::Environment { //public: @@ -66,10 +66,10 @@ ASSERT_STATS(zilliz::milvus::Status &stat); class MetricTest : public ::testing::Test { protected: - zilliz::milvus::engine::DBPtr db_; + milvus::engine::DBPtr db_; void InitLog(); void SetUp() override; void TearDown() override; - virtual zilliz::milvus::engine::DBOptions GetOptions(); + virtual milvus::engine::DBOptions GetOptions(); }; diff --git a/cpp/unittest/scheduler/task_test.cpp b/cpp/unittest/scheduler/task_test.cpp index d4bb0318da..ce91a62a52 100644 --- a/cpp/unittest/scheduler/task_test.cpp +++ b/cpp/unittest/scheduler/task_test.cpp @@ -19,7 +19,7 @@ #include "scheduler/task/SearchTask.h" #include -namespace zilliz { + namespace milvus { namespace scheduler { @@ -30,5 +30,5 @@ TEST(TaskTest, INVALID_INDEX) { } // namespace scheduler } // namespace milvus -} // namespace zilliz + diff --git a/cpp/unittest/scheduler/test_algorithm.cpp b/cpp/unittest/scheduler/test_algorithm.cpp index 56574a7463..bcb9087373 100644 --- a/cpp/unittest/scheduler/test_algorithm.cpp +++ b/cpp/unittest/scheduler/test_algorithm.cpp @@ -24,7 +24,7 @@ #include "scheduler/ResourceFactory.h" #include "scheduler/Algorithm.h" -namespace zilliz { + namespace milvus { namespace scheduler { @@ -105,4 +105,4 @@ TEST_F(AlgorithmTest, SHORTESTPATH_TEST) { } // namespace scheduler } // namespace milvus -} // namespace zilliz + diff --git a/cpp/unittest/scheduler/test_event.cpp b/cpp/unittest/scheduler/test_event.cpp index 73fffc8f6e..07d51e8557 100644 --- a/cpp/unittest/scheduler/test_event.cpp +++ b/cpp/unittest/scheduler/test_event.cpp @@ -23,7 +23,7 @@ #include "scheduler/event/StartUpEvent.h" -namespace zilliz { + namespace milvus { namespace scheduler { @@ -62,5 +62,5 @@ TEST(EventTest, TASKTABLE_UPDATED_EVENT) { } // namespace scheduler } // namespace milvus -} // namespace zilliz + diff --git a/cpp/unittest/scheduler/test_node.cpp b/cpp/unittest/scheduler/test_node.cpp index 3323453f0b..9b34b73191 100644 --- a/cpp/unittest/scheduler/test_node.cpp +++ b/cpp/unittest/scheduler/test_node.cpp @@ -21,7 +21,7 @@ namespace { -namespace ms = zilliz::milvus::scheduler; +namespace ms = milvus::scheduler; } // namespace diff --git a/cpp/unittest/scheduler/test_normal.cpp b/cpp/unittest/scheduler/test_normal.cpp index e24b43c6f8..fb59b04214 100644 --- a/cpp/unittest/scheduler/test_normal.cpp +++ b/cpp/unittest/scheduler/test_normal.cpp @@ -27,7 +27,7 @@ namespace { -namespace ms = zilliz::milvus::scheduler; +namespace ms = milvus::scheduler; } // namespace diff --git a/cpp/unittest/scheduler/test_resource.cpp b/cpp/unittest/scheduler/test_resource.cpp index b6c522b8b5..7245761393 100644 --- a/cpp/unittest/scheduler/test_resource.cpp +++ b/cpp/unittest/scheduler/test_resource.cpp @@ -26,7 +26,7 @@ #include "scheduler/ResourceFactory.h" #include -namespace zilliz { + namespace milvus { namespace scheduler { @@ -282,4 +282,4 @@ TEST_F(ResourceAdvanceTest, TEST_RESOURCE_TEST) { } // namespace scheduler } // namespace milvus -} // namespace zilliz + diff --git a/cpp/unittest/scheduler/test_resource_factory.cpp b/cpp/unittest/scheduler/test_resource_factory.cpp index 679edc6e3f..aaad3aa2c9 100644 --- a/cpp/unittest/scheduler/test_resource_factory.cpp +++ b/cpp/unittest/scheduler/test_resource_factory.cpp @@ -21,7 +21,7 @@ namespace { -namespace ms = zilliz::milvus::scheduler; +namespace ms = milvus::scheduler; } // namespace diff --git a/cpp/unittest/scheduler/test_resource_mgr.cpp b/cpp/unittest/scheduler/test_resource_mgr.cpp index bf8ade9f64..40633baa54 100644 --- a/cpp/unittest/scheduler/test_resource_mgr.cpp +++ b/cpp/unittest/scheduler/test_resource_mgr.cpp @@ -24,7 +24,7 @@ #include "scheduler/ResourceMgr.h" #include -namespace zilliz { + namespace milvus { namespace scheduler { @@ -191,4 +191,4 @@ TEST_F(ResourceMgrAdvanceTest, REGISTER_SUBSCRIBER) { } // namespace scheduler } // namespace milvus -} // namespace zilliz + diff --git a/cpp/unittest/scheduler/test_schedinst.cpp b/cpp/unittest/scheduler/test_schedinst.cpp index 4f3364c8fb..e63a9615bc 100644 --- a/cpp/unittest/scheduler/test_schedinst.cpp +++ b/cpp/unittest/scheduler/test_schedinst.cpp @@ -21,7 +21,7 @@ #include "server/Config.h" #include "scheduler/SchedInst.h" -namespace zilliz { + namespace milvus { namespace scheduler { @@ -83,6 +83,6 @@ TEST_F(SchedInstTest, SIMPLE_GPU) { } // namespace scheduler } // namespace milvus -} // namespace zilliz + diff --git a/cpp/unittest/scheduler/test_scheduler.cpp b/cpp/unittest/scheduler/test_scheduler.cpp index 4acfda315a..9666cc9812 100644 --- a/cpp/unittest/scheduler/test_scheduler.cpp +++ b/cpp/unittest/scheduler/test_scheduler.cpp @@ -28,7 +28,7 @@ #include "utils/Error.h" #include "wrapper/VecIndex.h" -namespace zilliz { + namespace milvus { namespace scheduler { @@ -43,7 +43,7 @@ class MockVecIndex : public engine::VecIndex { } engine::VecIndexPtr Clone() override { - return zilliz::milvus::engine::VecIndexPtr(); + return milvus::engine::VecIndexPtr(); } int64_t GetDeviceId() override { @@ -81,12 +81,12 @@ class MockVecIndex : public engine::VecIndex { return ntotal_; } - virtual zilliz::knowhere::BinarySet Serialize() { - zilliz::knowhere::BinarySet binset; + virtual knowhere::BinarySet Serialize() { + knowhere::BinarySet binset; return binset; } - virtual Status Load(const zilliz::knowhere::BinarySet &index_binary) { + virtual Status Load(const knowhere::BinarySet &index_binary) { } public: @@ -253,4 +253,4 @@ TEST_F(SchedulerTest2, SPECIFIED_RESOURCE_TEST) { } // namespace scheduler } // namespace milvus -} // namespace zilliz + diff --git a/cpp/unittest/scheduler/test_tasktable.cpp b/cpp/unittest/scheduler/test_tasktable.cpp index 0cb7018023..3cfbb5a27f 100644 --- a/cpp/unittest/scheduler/test_tasktable.cpp +++ b/cpp/unittest/scheduler/test_tasktable.cpp @@ -22,7 +22,7 @@ namespace { -namespace ms = zilliz::milvus::scheduler; +namespace ms = milvus::scheduler; } // namespace diff --git a/cpp/unittest/server/test_cache.cpp b/cpp/unittest/server/test_cache.cpp index 8fea11fa62..754f23f51b 100644 --- a/cpp/unittest/server/test_cache.cpp +++ b/cpp/unittest/server/test_cache.cpp @@ -23,7 +23,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; class InvalidCacheMgr : public ms::cache::CacheMgr { public: @@ -55,7 +55,7 @@ class MockVecIndex : public ms::engine::VecIndex { } ms::engine::VecIndexPtr Clone() override { - return zilliz::milvus::engine::VecIndexPtr(); + return milvus::engine::VecIndexPtr(); } int64_t GetDeviceId() override { @@ -98,12 +98,12 @@ class MockVecIndex : public ms::engine::VecIndex { return ntotal_; } - virtual zilliz::knowhere::BinarySet Serialize() { - zilliz::knowhere::BinarySet binset; + virtual knowhere::BinarySet Serialize() { + knowhere::BinarySet binset; return binset; } - virtual ms::Status Load(const zilliz::knowhere::BinarySet &index_binary) { + virtual ms::Status Load(const knowhere::BinarySet &index_binary) { return ms::Status(); } @@ -127,7 +127,7 @@ TEST(CacheTest, DUMMY_TEST) { mock_index.CopyToGpu(1, cfg); mock_index.GetDeviceId(); mock_index.GetType(); - zilliz::knowhere::BinarySet index_binary; + knowhere::BinarySet index_binary; mock_index.Load(index_binary); mock_index.Serialize(); } diff --git a/cpp/unittest/server/test_config.cpp b/cpp/unittest/server/test_config.cpp index 0c613d8954..ef708a8382 100644 --- a/cpp/unittest/server/test_config.cpp +++ b/cpp/unittest/server/test_config.cpp @@ -25,7 +25,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; static const char *CONFIG_FILE_PATH = "./milvus/conf/server_config.yaml"; static const char *LOG_FILE_PATH = "./milvus/conf/log_config.conf"; diff --git a/cpp/unittest/server/test_rpc.cpp b/cpp/unittest/server/test_rpc.cpp index 3a36e3ee50..5baaed3152 100644 --- a/cpp/unittest/server/test_rpc.cpp +++ b/cpp/unittest/server/test_rpc.cpp @@ -36,7 +36,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; static const char *TABLE_NAME = "test_grpc"; static constexpr int64_t TABLE_DIM = 256; diff --git a/cpp/unittest/server/util_test.cpp b/cpp/unittest/server/util_test.cpp index 89095193fb..0ee214a7e7 100644 --- a/cpp/unittest/server/util_test.cpp +++ b/cpp/unittest/server/util_test.cpp @@ -33,7 +33,7 @@ namespace { -namespace ms = zilliz::milvus; +namespace ms = milvus; static const char *LOG_FILE_PATH = "./milvus/conf/log_config.conf"; diff --git a/cpp/unittest/wrapper/test_wrapper.cpp b/cpp/unittest/wrapper/test_wrapper.cpp index b97b96d205..4dd2e33bd5 100644 --- a/cpp/unittest/wrapper/test_wrapper.cpp +++ b/cpp/unittest/wrapper/test_wrapper.cpp @@ -27,8 +27,8 @@ INITIALIZE_EASYLOGGINGPP namespace { -namespace ms = zilliz::milvus::engine; -namespace kw = zilliz::knowhere; +namespace ms = milvus::engine; +namespace kw = knowhere; } // namespace @@ -50,41 +50,41 @@ class ParamGenerator { kw::Config Gen(const ms::IndexType &type) { switch (type) { case ms::IndexType::FAISS_IDMAP: { - auto tempconf = std::make_shared(); - tempconf->metric_type = zilliz::knowhere::METRICTYPE::L2; + auto tempconf = std::make_shared(); + tempconf->metric_type = knowhere::METRICTYPE::L2; return tempconf; } case ms::IndexType::FAISS_IVFFLAT_CPU: case ms::IndexType::FAISS_IVFFLAT_GPU: case ms::IndexType::FAISS_IVFFLAT_MIX: { - auto tempconf = std::make_shared(); + auto tempconf = std::make_shared(); tempconf->nlist = 100; tempconf->nprobe = 16; - tempconf->metric_type = zilliz::knowhere::METRICTYPE::L2; + tempconf->metric_type = knowhere::METRICTYPE::L2; return tempconf; } case ms::IndexType::FAISS_IVFSQ8_CPU: case ms::IndexType::FAISS_IVFSQ8_GPU: case ms::IndexType::FAISS_IVFSQ8_MIX: { - auto tempconf = std::make_shared(); + auto tempconf = std::make_shared(); tempconf->nlist = 100; tempconf->nprobe = 16; tempconf->nbits = 8; - tempconf->metric_type = zilliz::knowhere::METRICTYPE::L2; + tempconf->metric_type = knowhere::METRICTYPE::L2; return tempconf; } case ms::IndexType::FAISS_IVFPQ_CPU: case ms::IndexType::FAISS_IVFPQ_GPU: { - auto tempconf = std::make_shared(); + auto tempconf = std::make_shared(); tempconf->nlist = 100; tempconf->nprobe = 16; tempconf->nbits = 8; tempconf->m = 8; - tempconf->metric_type = zilliz::knowhere::METRICTYPE::L2; + tempconf->metric_type = knowhere::METRICTYPE::L2; return tempconf; } case ms::IndexType::NSG_MIX: { - auto tempconf = std::make_shared(); + auto tempconf = std::make_shared(); tempconf->nlist = 100; tempconf->nprobe = 16; tempconf->search_length = 8; @@ -92,7 +92,7 @@ class ParamGenerator { tempconf->search_length = 40; // TODO(linxj): be 20 when search tempconf->out_degree = 60; tempconf->candidate_pool_size = 200; - tempconf->metric_type = zilliz::knowhere::METRICTYPE::L2; + tempconf->metric_type = knowhere::METRICTYPE::L2; return tempconf; } } @@ -103,7 +103,7 @@ class KnowhereWrapperTest : public TestWithParam<::std::tuple> { protected: void SetUp() override { - zilliz::knowhere::FaissGpuResourceMgr::GetInstance().InitDevice(DEVICE_ID, + knowhere::FaissGpuResourceMgr::GetInstance().InitDevice(DEVICE_ID, 1024 * 1024 * 200, 1024 * 1024 * 300, 2); @@ -123,7 +123,7 @@ class KnowhereWrapperTest } void TearDown() override { - zilliz::knowhere::FaissGpuResourceMgr::GetInstance().Free(); + knowhere::FaissGpuResourceMgr::GetInstance().Free(); } void AssertResult(const std::vector &ids, const std::vector &dis) {