mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 21:09:06 +08:00
#1536 move Config.cpp to config directory
Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
This commit is contained in:
parent
a08b51c2b6
commit
6b81dd55df
2
core/src/cache/CpuCacheMgr.cpp
vendored
2
core/src/cache/CpuCacheMgr.cpp
vendored
@ -10,7 +10,7 @@
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#include "cache/CpuCacheMgr.h"
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
#include <fiu-local.h>
|
||||
|
2
core/src/cache/GpuCacheMgr.cpp
vendored
2
core/src/cache/GpuCacheMgr.cpp
vendored
@ -10,7 +10,7 @@
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#include "cache/GpuCacheMgr.h"
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
#include <fiu-local.h>
|
||||
|
@ -25,8 +25,8 @@
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include "config/Config.h"
|
||||
#include "config/YamlConfigMgr.h"
|
||||
#include "server/Config.h"
|
||||
#include "server/DBWrapper.h"
|
||||
#include "thirdparty/nlohmann/json.hpp"
|
||||
#include "utils/CommonUtil.h"
|
@ -10,8 +10,7 @@
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#include "config/handler/CacheConfigHandler.h"
|
||||
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
|
||||
namespace milvus {
|
||||
namespace server {
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
namespace milvus {
|
||||
|
@ -15,8 +15,8 @@
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
#include "config/Config.h"
|
||||
#include "config/handler/ConfigHandler.h"
|
||||
#include "server/Config.h"
|
||||
|
||||
namespace milvus {
|
||||
namespace server {
|
||||
|
@ -9,12 +9,12 @@
|
||||
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
#include "config/handler/GpuSearchConfigHandler.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "config/handler/GpuSearchConfigHandler.h"
|
||||
|
||||
namespace milvus {
|
||||
namespace server {
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <regex>
|
||||
#include <vector>
|
||||
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "storage/s3/S3ClientWrapper.h"
|
||||
#include "utils/CommonUtil.h"
|
||||
#include "utils/Log.h"
|
||||
|
@ -20,11 +20,11 @@
|
||||
|
||||
#include "cache/CpuCacheMgr.h"
|
||||
#include "cache/GpuCacheMgr.h"
|
||||
#include "config/Config.h"
|
||||
#include "db/Utils.h"
|
||||
#include "knowhere/common/Config.h"
|
||||
#include "metrics/Metrics.h"
|
||||
#include "scheduler/Utils.h"
|
||||
#include "server/Config.h"
|
||||
#include "utils/CommonUtil.h"
|
||||
#include "utils/Exception.h"
|
||||
#include "utils/Log.h"
|
||||
|
@ -19,11 +19,11 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "config/Config.h"
|
||||
#include "config/handler/CacheConfigHandler.h"
|
||||
#include "db/insert/MemManager.h"
|
||||
#include "db/insert/MemTable.h"
|
||||
#include "db/meta/Meta.h"
|
||||
#include "server/Config.h"
|
||||
#include "utils/Status.h"
|
||||
|
||||
namespace milvus {
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "utils/CommonUtil.h"
|
||||
#include "utils/Exception.h"
|
||||
#include "utils/Log.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include <faiss/gpu/StandardGpuResources.h>
|
||||
|
||||
#include "src/utils/BlockingQueue.h"
|
||||
#include "utils/BlockingQueue.h"
|
||||
|
||||
namespace knowhere {
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#include "metrics/Metrics.h"
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#ifdef MILVUS_WITH_PROMETHEUS
|
||||
#include "metrics/prometheus/PrometheusMetrics.h"
|
||||
#endif
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
#include "metrics/prometheus/PrometheusMetrics.h"
|
||||
#include "cache/GpuCacheMgr.h"
|
||||
#include "config/Config.h"
|
||||
#include "metrics/SystemInfo.h"
|
||||
#include "server/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
#include <string>
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "scheduler/SchedInst.h"
|
||||
#include "ResourceFactory.h"
|
||||
#include "Utils.h"
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
|
||||
#include <fiu-local.h>
|
||||
#include <set>
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "optimizer/FaissIVFSQ8Pass.h"
|
||||
#include "optimizer/FallbackPass.h"
|
||||
#include "optimizer/Optimizer.h"
|
||||
#include "server/Config.h"
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
@ -11,11 +11,10 @@
|
||||
|
||||
#include <list>
|
||||
#include <random>
|
||||
#include "../Algorithm.h"
|
||||
#include "Action.h"
|
||||
#include "cache/GpuCacheMgr.h"
|
||||
#include "scheduler/Algorithm.h"
|
||||
#include "scheduler/action/Action.h"
|
||||
#include "scheduler/tasklabel/SpecResLabel.h"
|
||||
#include "src/cache/GpuCacheMgr.h"
|
||||
#include "src/server/Config.h"
|
||||
|
||||
namespace milvus {
|
||||
namespace scheduler {
|
||||
|
@ -11,11 +11,11 @@
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
#include "scheduler/optimizer/FaissFlatPass.h"
|
||||
#include "cache/GpuCacheMgr.h"
|
||||
#include "config/Config.h"
|
||||
#include "scheduler/SchedInst.h"
|
||||
#include "scheduler/Utils.h"
|
||||
#include "scheduler/task/SearchTask.h"
|
||||
#include "scheduler/tasklabel/SpecResLabel.h"
|
||||
#include "server/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
#include <fiu-local.h>
|
||||
|
@ -11,11 +11,11 @@
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
#include "scheduler/optimizer/FaissIVFFlatPass.h"
|
||||
#include "cache/GpuCacheMgr.h"
|
||||
#include "config/Config.h"
|
||||
#include "scheduler/SchedInst.h"
|
||||
#include "scheduler/Utils.h"
|
||||
#include "scheduler/task/SearchTask.h"
|
||||
#include "scheduler/tasklabel/SpecResLabel.h"
|
||||
#include "server/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
namespace milvus {
|
||||
|
@ -11,11 +11,11 @@
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
#include "scheduler/optimizer/FaissIVFPQPass.h"
|
||||
#include "cache/GpuCacheMgr.h"
|
||||
#include "config/Config.h"
|
||||
#include "scheduler/SchedInst.h"
|
||||
#include "scheduler/Utils.h"
|
||||
#include "scheduler/task/SearchTask.h"
|
||||
#include "scheduler/tasklabel/SpecResLabel.h"
|
||||
#include "server/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
#include <fiu-local.h>
|
||||
|
@ -11,11 +11,11 @@
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
#include "scheduler/optimizer/FaissIVFSQ8HPass.h"
|
||||
#include "cache/GpuCacheMgr.h"
|
||||
#include "config/Config.h"
|
||||
#include "scheduler/SchedInst.h"
|
||||
#include "scheduler/Utils.h"
|
||||
#include "scheduler/task/SearchTask.h"
|
||||
#include "scheduler/tasklabel/SpecResLabel.h"
|
||||
#include "server/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
namespace milvus {
|
||||
|
@ -11,11 +11,11 @@
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
#include "scheduler/optimizer/FaissIVFSQ8Pass.h"
|
||||
#include "cache/GpuCacheMgr.h"
|
||||
#include "config/Config.h"
|
||||
#include "scheduler/SchedInst.h"
|
||||
#include "scheduler/Utils.h"
|
||||
#include "scheduler/task/SearchTask.h"
|
||||
#include "scheduler/tasklabel/SpecResLabel.h"
|
||||
#include "server/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
namespace milvus {
|
||||
|
@ -15,8 +15,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "config/Config.h"
|
||||
#include "db/DBFactory.h"
|
||||
#include "server/Config.h"
|
||||
#include "server/DBWrapper.h"
|
||||
#include "utils/CommonUtil.h"
|
||||
#include "utils/Log.h"
|
||||
|
@ -15,9 +15,9 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "config/Config.h"
|
||||
#include "metrics/Metrics.h"
|
||||
#include "scheduler/SchedInst.h"
|
||||
#include "server/Config.h"
|
||||
#include "server/DBWrapper.h"
|
||||
#include "server/grpc_impl/GrpcServer.h"
|
||||
#include "server/web_impl/WebServer.h"
|
||||
|
@ -10,6 +10,7 @@
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#include "server/delivery/request/CmdRequest.h"
|
||||
#include "config/Config.h"
|
||||
#include "metrics/SystemInfo.h"
|
||||
#include "scheduler/SchedInst.h"
|
||||
#include "utils/Log.h"
|
||||
|
@ -10,7 +10,7 @@
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#include "server/delivery/request/CreateIndexRequest.h"
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "server/DBWrapper.h"
|
||||
#include "utils/Log.h"
|
||||
#include "utils/TimeRecorder.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "server/DBWrapper.h"
|
||||
#include "utils/CommonUtil.h"
|
||||
#include "utils/Log.h"
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "server/Config.h"
|
||||
#include "tracing/TextMapCarrier.h"
|
||||
#include "tracing/TracerUtil.h"
|
||||
#include "utils/Log.h"
|
||||
|
@ -31,8 +31,8 @@
|
||||
#include <vector>
|
||||
|
||||
#include "GrpcRequestHandler.h"
|
||||
#include "config/Config.h"
|
||||
#include "grpc/gen-milvus/milvus.grpc.pb.h"
|
||||
#include "server/Config.h"
|
||||
#include "server/DBWrapper.h"
|
||||
#include "server/grpc_impl/interceptor/SpanInterceptor.h"
|
||||
#include "utils/Log.h"
|
||||
@ -75,16 +75,9 @@ Status
|
||||
GrpcServer::StartService() {
|
||||
Config& config = Config::GetInstance();
|
||||
std::string address, port;
|
||||
Status s;
|
||||
|
||||
s = config.GetServerConfigAddress(address);
|
||||
if (!s.ok()) {
|
||||
return s;
|
||||
}
|
||||
s = config.GetServerConfigPort(port);
|
||||
if (!s.ok()) {
|
||||
return s;
|
||||
}
|
||||
CONFIG_CHECK(config.GetServerConfigAddress(address));
|
||||
CONFIG_CHECK(config.GetServerConfigPort(port));
|
||||
|
||||
std::string server_address(address + ":" + port);
|
||||
|
||||
|
@ -10,14 +10,12 @@
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#include <chrono>
|
||||
|
||||
#include <oatpp/network/server/Server.hpp>
|
||||
|
||||
#include "config/Config.h"
|
||||
#include "server/web_impl/WebServer.h"
|
||||
#include "server/web_impl/controller/WebController.hpp"
|
||||
|
||||
#include "server/Config.h"
|
||||
|
||||
namespace milvus {
|
||||
namespace server {
|
||||
namespace web {
|
||||
@ -45,9 +43,8 @@ WebServer::StartService() {
|
||||
|
||||
Config& config = Config::GetInstance();
|
||||
std::string port;
|
||||
Status status;
|
||||
|
||||
status = config.GetServerConfigWebPort(port);
|
||||
CONFIG_CHECK(config.GetServerConfigWebPort(port));
|
||||
|
||||
{
|
||||
AppComponent components = AppComponent(std::stoi(port));
|
||||
|
@ -17,8 +17,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "config/Config.h"
|
||||
#include "metrics/SystemInfo.h"
|
||||
#include "server/Config.h"
|
||||
#include "server/delivery/request/BaseRequest.h"
|
||||
#include "server/web_impl/Constants.h"
|
||||
#include "server/web_impl/Types.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "storage/s3/S3ClientMock.h"
|
||||
#include "storage/s3/S3ClientWrapper.h"
|
||||
#include "utils/Error.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "utils/CommonUtil.h"
|
||||
#include "cache/CpuCacheMgr.h"
|
||||
#include "cache/GpuCacheMgr.h"
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
#include <dirent.h>
|
||||
|
@ -8,18 +8,18 @@
|
||||
// Unless required by applicable law or agreed to in writing, software distributed under the License
|
||||
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#include "wrapper/ConfAdapter.h"
|
||||
|
||||
#include <fiu-local.h>
|
||||
|
||||
#include <cmath>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "WrapperException.h"
|
||||
#include "config/Config.h"
|
||||
#include "knowhere/index/vector_index/helpers/IndexParameter.h"
|
||||
#include "server/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
namespace milvus {
|
||||
|
@ -14,9 +14,9 @@
|
||||
#include "knowhere/index/vector_index/helpers/FaissGpuResourceMgr.h"
|
||||
#endif
|
||||
|
||||
#include "config/Config.h"
|
||||
#include "faiss/FaissHook.h"
|
||||
#include "scheduler/Utils.h"
|
||||
#include "server/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
#include <fiu-local.h>
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#include "wrapper/VecIndex.h"
|
||||
|
||||
#include "VecImpl.h"
|
||||
#include "config/Config.h"
|
||||
#include "knowhere/common/Exception.h"
|
||||
#include "knowhere/index/vector_index/IndexBinaryIDMAP.h"
|
||||
#include "knowhere/index/vector_index/IndexBinaryIVF.h"
|
||||
@ -22,7 +22,6 @@
|
||||
#include "knowhere/index/vector_index/IndexIVFSQ.h"
|
||||
#include "knowhere/index/vector_index/IndexNSG.h"
|
||||
#include "knowhere/index/vector_index/IndexSPTAG.h"
|
||||
#include "server/Config.h"
|
||||
#include "storage/file/FileIOReader.h"
|
||||
#include "storage/file/FileIOWriter.h"
|
||||
#include "storage/s3/S3IOReader.h"
|
||||
@ -31,6 +30,7 @@
|
||||
#include "utils/Log.h"
|
||||
#include "utils/TimeRecorder.h"
|
||||
#include "wrapper/BinVecImpl.h"
|
||||
#include "wrapper/VecImpl.h"
|
||||
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
#include <cuda.h>
|
||||
|
@ -117,7 +117,7 @@ set(entry_file
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
|
||||
|
||||
set(helper_files
|
||||
${MILVUS_ENGINE_SRC}/server/Config.cpp
|
||||
${MILVUS_ENGINE_SRC}/config/Config.cpp
|
||||
${MILVUS_ENGINE_SRC}/utils/CommonUtil.cpp
|
||||
${MILVUS_ENGINE_SRC}/utils/TimeRecorder.cpp
|
||||
${MILVUS_ENGINE_SRC}/utils/Status.cpp
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <thread>
|
||||
|
||||
#include "cache/CpuCacheMgr.h"
|
||||
#include "config/Config.h"
|
||||
#include "db/Constants.h"
|
||||
#include "db/DB.h"
|
||||
#include "db/DBFactory.h"
|
||||
@ -25,7 +26,6 @@
|
||||
#include "db/IDGenerator.h"
|
||||
#include "db/meta/MetaConsts.h"
|
||||
#include "db/utils.h"
|
||||
#include "server/Config.h"
|
||||
#include "utils/CommonUtil.h"
|
||||
|
||||
namespace {
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define private public
|
||||
|
||||
#include "cache/CpuCacheMgr.h"
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "metrics/utils.h"
|
||||
#include "db/DB.h"
|
||||
#include "db/meta/SqliteMetaImpl.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "metrics/prometheus/PrometheusMetrics.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
@ -17,8 +17,8 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "config/Config.h"
|
||||
#include "config/YamlConfigMgr.h"
|
||||
#include "server/Config.h"
|
||||
#include "server/utils.h"
|
||||
#include "utils/CommonUtil.h"
|
||||
#include "utils/StringHelpFunctions.h"
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <thread>
|
||||
|
||||
#include "config/Config.h"
|
||||
#include "server/Server.h"
|
||||
#include "server/grpc_impl/GrpcRequestHandler.h"
|
||||
#include "server/delivery/RequestScheduler.h"
|
||||
@ -26,7 +27,6 @@
|
||||
#include "grpc/gen-status/status.pb.h"
|
||||
#include "scheduler/ResourceFactory.h"
|
||||
#include "scheduler/SchedInst.h"
|
||||
#include "server/Config.h"
|
||||
#include "server/DBWrapper.h"
|
||||
#include "utils/CommonUtil.h"
|
||||
#include "server/grpc_impl/GrpcServer.h"
|
||||
|
@ -21,9 +21,9 @@
|
||||
#include <oatpp/web/client/ApiClient.hpp>
|
||||
#include <oatpp/web/client/HttpRequestExecutor.hpp>
|
||||
|
||||
#include "config/Config.h"
|
||||
#include "scheduler/ResourceFactory.h"
|
||||
#include "scheduler/SchedInst.h"
|
||||
#include "server/Config.h"
|
||||
#include "server/DBWrapper.h"
|
||||
#include "server/delivery/RequestHandler.h"
|
||||
#include "server/delivery/RequestScheduler.h"
|
||||
|
@ -16,8 +16,8 @@
|
||||
#include <fiu-local.h>
|
||||
#include <fiu-control.h>
|
||||
|
||||
#include "config/Config.h"
|
||||
#include "easyloggingpp/easylogging++.h"
|
||||
#include "server/Config.h"
|
||||
#include "storage/s3/S3ClientWrapper.h"
|
||||
#include "storage/s3/S3IOReader.h"
|
||||
#include "storage/s3/S3IOWriter.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "storage/utils.h"
|
||||
#include "utils/CommonUtil.h"
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
// or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
|
||||
#include "server/Config.h"
|
||||
#include "config/Config.h"
|
||||
#include "wrapper/KnowhereResource.h"
|
||||
#include "wrapper/utils.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user