#1536 move Config.cpp to config directory

Signed-off-by: yudong.cai <yudong.cai@zilliz.com>
This commit is contained in:
yudong.cai 2020-03-07 17:02:21 +08:00
parent a08b51c2b6
commit 6b81dd55df
47 changed files with 52 additions and 65 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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"

View File

@ -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 {

View File

@ -13,7 +13,7 @@
#include <string>
#include "server/Config.h"
#include "config/Config.h"
#include "utils/Log.h"
namespace milvus {

View File

@ -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 {

View File

@ -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 {

View File

@ -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"

View File

@ -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"

View File

@ -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 {

View File

@ -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"

View File

@ -18,7 +18,7 @@
#include <faiss/gpu/StandardGpuResources.h>
#include "src/utils/BlockingQueue.h"
#include "utils/BlockingQueue.h"
namespace knowhere {

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -24,7 +24,6 @@
#include "optimizer/FaissIVFSQ8Pass.h"
#include "optimizer/FallbackPass.h"
#include "optimizer/Optimizer.h"
#include "server/Config.h"
#include <memory>
#include <mutex>

View File

@ -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 {

View File

@ -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>

View File

@ -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 {

View File

@ -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>

View File

@ -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 {

View File

@ -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 {

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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);

View File

@ -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));

View File

@ -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"

View File

@ -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"

View File

@ -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>

View File

@ -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 {

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -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 {

View File

@ -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"

View File

@ -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>

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -12,7 +12,7 @@
#include <fstream>
#include <string>
#include "server/Config.h"
#include "config/Config.h"
#include "storage/utils.h"
#include "utils/CommonUtil.h"

View File

@ -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"