|
4 | 4 | #include <Disks/ObjectStorages/MetadataStorageFromPlainObjectStorageOperations.h> |
5 | 5 | #include <Disks/ObjectStorages/StaticDirectoryIterator.h> |
6 | 6 | #include <Disks/ObjectStorages/StoredObject.h> |
| 7 | +#include <Storages/PartitionCommands.h> |
7 | 8 | #include <Common/ObjectStorageKey.h> |
8 | 9 | #include <Common/SipHash.h> |
9 | 10 | #include <Common/logger_useful.h> |
@@ -109,6 +110,11 @@ std::optional<Poco::Timestamp> MetadataStorageFromPlainObjectStorage::getLastMod |
109 | 110 | return std::nullopt; |
110 | 111 | } |
111 | 112 |
|
| 113 | +bool MetadataStorageFromPlainObjectStorage::supportsPartitionCommand(const PartitionCommand & /*command*/) const |
| 114 | +{ |
| 115 | + return false; |
| 116 | +} |
| 117 | + |
112 | 118 | std::vector<std::string> MetadataStorageFromPlainObjectStorage::listDirectory(const std::string & path) const |
113 | 119 | { |
114 | 120 | auto key_prefix = object_storage->generateObjectKeyForPath(path, std::nullopt /* key_prefix */).serialize(); |
@@ -215,6 +221,26 @@ void MetadataStorageFromPlainObjectStorageTransaction::removeDirectory(const std |
215 | 221 | } |
216 | 222 | } |
217 | 223 |
|
| 224 | +void MetadataStorageFromPlainObjectStorageTransaction::createHardLink(const std::string & path_from, const std::string & path_to) |
| 225 | +{ |
| 226 | + if (metadata_storage.object_storage->isWriteOnce()) |
| 227 | + throwNotImplemented(); |
| 228 | + |
| 229 | + addOperation(std::make_unique<MetadataStorageFromPlainObjectStorageCopyFileOperation>( |
| 230 | + path_from, path_to, *metadata_storage.getPathMap(), object_storage)); |
| 231 | +} |
| 232 | + |
| 233 | +void MetadataStorageFromPlainObjectStorageTransaction::moveFile(const std::string & path_from, const std::string & path_to) |
| 234 | +{ |
| 235 | + if (metadata_storage.object_storage->isWriteOnce()) |
| 236 | + throwNotImplemented(); |
| 237 | + |
| 238 | + if (metadata_storage.existsDirectory(path_from)) |
| 239 | + moveDirectory(path_from, path_to); |
| 240 | + else |
| 241 | + throwNotImplemented(); |
| 242 | +} |
| 243 | + |
218 | 244 | void MetadataStorageFromPlainObjectStorageTransaction::createEmptyMetadataFile(const std::string & path) |
219 | 245 | { |
220 | 246 | if (metadata_storage.object_storage->isWriteOnce()) |
|
0 commit comments