[FEAT MERGE] Support external table

Co-authored-by: jingtaoye35 <1255153887@qq.com>
This commit is contained in:
wjhh2008
2023-04-29 15:11:49 +00:00
committed by ob-robot
parent ecb74a122c
commit 09ed904b58
164 changed files with 8074 additions and 667 deletions

View File

@ -0,0 +1,79 @@
/**
* Copyright (c) 2021 OceanBase
* OceanBase CE is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
* You may obtain a copy of Mulan PubL v2 at:
* http://license.coscl.org.cn/MulanPubL-2.0
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PubL v2 for more details.
*/
#ifndef OBDEV_SRC_EXTERNAL_TABLE_FILE_TASK_H_
#define OBDEV_SRC_EXTERNAL_TABLE_FILE_TASK_H_
#include "rpc/obrpc/ob_rpc_result_code.h"
#include "deps/oblib/src/lib/lock/ob_thread_cond.h"
namespace oceanbase
{
namespace share
{
class ObFlushExternalTableFileCacheReq
{
OB_UNIS_VERSION(1);
public:
ObFlushExternalTableFileCacheReq() :
tenant_id_(common::OB_INVALID_ID), table_id_(common::OB_INVALID_ID), partition_id_(common::OB_INVALID_ID) {}
public:
uint64_t tenant_id_;
int64_t table_id_;
int64_t partition_id_;
TO_STRING_KV(K_(tenant_id), K_(table_id), K_(partition_id));
};
class ObFlushExternalTableFileCacheRes
{
OB_UNIS_VERSION(1);
public:
ObFlushExternalTableFileCacheRes() : rcode_() {}
TO_STRING_KV(K_(rcode));
public:
obrpc::ObRpcResultCode rcode_;
};
class ObLoadExternalFileListReq
{
OB_UNIS_VERSION(1);
public:
ObLoadExternalFileListReq() :
location_() {}
public:
ObString location_;
TO_STRING_KV(K_(location));
};
class ObLoadExternalFileListRes
{
OB_UNIS_VERSION(1);
public:
ObLoadExternalFileListRes() : rcode_(), file_urls_(), file_sizes_(), allocator_() {}
ObIAllocator &get_alloc() { return allocator_; }
int assign(const ObLoadExternalFileListRes &other);
TO_STRING_KV(K_(rcode));
public:
obrpc::ObRpcResultCode rcode_; //返回的错误信息
ObSEArray<ObString, 8> file_urls_;
ObSEArray<int64_t, 8> file_sizes_;
private:
ObArenaAllocator allocator_;
};
} // namespace share
} // namespace oceanbase
#endif /* OBDEV_SRC_EXTERNAL_TABLE_FILE_TASK_H_ */