提交 4948e47b 编写于 作者: X xj.lin

MS-240 add Log


Former-commit-id: 0f779db21c49adb3d09b1868ac2ee8de00d35bd0
上级 d332dadf
......@@ -388,6 +388,7 @@ Status DBMetaImpl::CreateTableFile(TableFileSchema &file_schema) {
file_schema.created_on_ = utils::GetMicroSecTimeStamp();
file_schema.updated_time_ = file_schema.created_on_;
file_schema.engine_type_ = table_schema.engine_type_;
ENGINE_LOG_DEBUG << "CreateTableFile EngineTypee: " << table_schema.engine_type_;
GetTableFilePath(file_schema);
auto id = ConnectorPtr->insert(file_schema);
......
......@@ -53,6 +53,7 @@ EngineFactory::Build(uint16_t dimension,
return nullptr;
}
ENGINE_LOG_DEBUG << "EngineFactory EngineTypee: " << int(type);
ExecutionEnginePtr execution_engine_ptr =
std::make_shared<ExecutionEngineImpl>(dimension, location, type);
......
......@@ -37,17 +37,14 @@ VecIndexPtr ExecutionEngineImpl::CreatetVecIndex(EngineType type) {
std::shared_ptr<VecIndex> index;
switch (type) {
case EngineType::FAISS_IDMAP: {
ENGINE_LOG_DEBUG << "Build Index: IDMAP";
index = GetVecIndexFactory(IndexType::FAISS_IDMAP);
break;
}
case EngineType::FAISS_IVFFLAT_GPU: {
ENGINE_LOG_DEBUG << "Build Index: IVFMIX";
index = GetVecIndexFactory(IndexType::FAISS_IVFFLAT_MIX);
break;
}
case EngineType::FAISS_IVFFLAT_CPU: {
ENGINE_LOG_DEBUG << "Build Index: IVFCPU";
index = GetVecIndexFactory(IndexType::FAISS_IVFFLAT_CPU);
break;
}
......@@ -137,6 +134,7 @@ ExecutionEngineImpl::BuildIndex(const std::string &location) {
ENGINE_LOG_DEBUG << "Build index file: " << location << " from: " << location_;
auto from_index = std::dynamic_pointer_cast<BFIndex>(index_);
ENGINE_LOG_DEBUG << "BuildIndex EngineTypee: " << int(build_type);
auto to_index = CreatetVecIndex(build_type);
ENGINE_LOG_DEBUG << "Build Params: [gpu_id] " << gpu_num;
to_index->BuildAll(Count(),
......
......@@ -155,6 +155,7 @@ ServerError CreateTableTask::OnExecute() {
}
res = ValidateTableIndexType(schema_.index_type);
SERVER_LOG_DEBUG << "Createtbale EngineTypee: " << schema_.index_type;
if(res != SERVER_SUCCESS) {
return res;
}
......
......@@ -10,6 +10,7 @@
#include "vec_impl.h"
#include "data_transfer.h"
#include "wrapper_log.h"
namespace zilliz {
......@@ -138,6 +139,8 @@ void IVFMixIndex::BuildAll(const long &nb,
const Config &cfg,
const long &nt,
const float *xt) {
WRAPPER_LOG_DEBUG << "Get Into Build IVFMIX";
dim = cfg["dim"].as<int>();
auto dataset = GenDatasetWithIds(nb, dim, xb, ids);
......@@ -153,7 +156,7 @@ void IVFMixIndex::BuildAll(const long &nb,
auto host_index = device_index->Copy_index_gpu_to_cpu();
index_ = host_index;
} else {
// TODO(linxj): LOG ERROR
WRAPPER_LOG_ERROR << "Build IVFMIXIndex Failed";
}
}
......
////////////////////////////////////////////////////////////////////////////////
// Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
// Unauthorized copying of this file, via any medium is strictly prohibited.
// Proprietary and confidential.
////////////////////////////////////////////////////////////////////////////////
#pragma once
#include <easylogging++.h>
namespace zilliz {
namespace milvus {
namespace engine {
#define WRAPPER_DOMAIN_NAME "[WRAPPER] "
#define WRAPPER_ERROR_TEXT "WRAPPER Error:"
#define WRAPPER_LOG_TRACE LOG(TRACE) << WRAPPER_DOMAIN_NAME
#define WRAPPER_LOG_DEBUG LOG(DEBUG) << WRAPPER_DOMAIN_NAME
#define WRAPPER_LOG_INFO LOG(INFO) << WRAPPER_DOMAIN_NAME
#define WRAPPER_LOG_WARNING LOG(WARNING) << WRAPPER_DOMAIN_NAME
#define WRAPPER_LOG_ERROR LOG(ERROR) << WRAPPER_DOMAIN_NAME
#define WRAPPER_LOG_FATAL LOG(FATAL) << WRAPPER_DOMAIN_NAME
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册