ClickHouse/programs/copier/ShardPartitionPiece.h

42 lines
870 B
C++
Raw Normal View History

2020-02-13 10:52:46 +00:00
#pragma once
2022-10-20 14:37:27 +00:00
#include <base/types.h>
2020-02-13 10:52:46 +00:00
2020-03-17 18:07:54 +00:00
namespace DB
{
2020-02-13 10:52:46 +00:00
2022-10-20 14:37:27 +00:00
struct ShardPartition;
2020-03-17 18:07:54 +00:00
struct ShardPartitionPiece
{
2022-10-20 14:37:27 +00:00
ShardPartitionPiece(ShardPartition & parent, size_t current_piece_number_, bool is_present_piece_);
2020-02-13 10:52:46 +00:00
2020-03-17 18:07:54 +00:00
String getPartitionPiecePath() const;
2020-02-13 10:52:46 +00:00
2020-03-17 18:07:54 +00:00
String getPartitionPieceCleanStartPath() const;
2020-02-13 10:52:46 +00:00
2020-03-17 18:07:54 +00:00
String getPartitionPieceIsDirtyPath() const;
2020-02-13 10:52:46 +00:00
2020-03-17 18:07:54 +00:00
String getPartitionPieceIsCleanedPath() const;
2020-02-13 10:52:46 +00:00
2020-03-17 18:07:54 +00:00
String getPartitionPieceActiveWorkersPath() const;
2020-02-13 10:52:46 +00:00
2020-03-17 18:07:54 +00:00
String getActiveWorkerPath() const ;
2020-02-13 10:52:46 +00:00
/// On what shards do we have current partition.
2020-03-17 18:07:54 +00:00
String getPartitionPieceShardsPath() const;
2020-02-13 10:52:46 +00:00
2020-03-17 18:07:54 +00:00
String getShardStatusPath() const;
2020-02-13 10:52:46 +00:00
2020-02-20 18:58:00 +00:00
String getPartitionPieceCleanerPath() const;
2020-02-13 10:52:46 +00:00
bool is_absent_piece;
const size_t current_piece_number;
ShardPartition & shard_partition;
};
2022-10-20 14:37:27 +00:00
using PartitionPieces = std::vector<ShardPartitionPiece>;
2020-02-13 10:52:46 +00:00
}