23 , stream_handle(handle)
33 , stream_handle(handle)
37 , content_hash(content_hash)
41 RegisterPlugin<LocalUploader>();
42 RegisterPlugin<S3Uploader>();
43 RegisterPlugin<GatewayUploader>();
73 const std::string tmp_path =
75 if (tmp_path.empty()) {
77 "Failed to create temp file in %s for upload of file chunk"
83 const int tmp_fd = open(tmp_path.c_str(), O_WRONLY);
86 "Failed to open temp file '%s' for upload of file chunk "
88 tmp_path.c_str(), errno);
89 unlink(tmp_path.c_str());
147 switch (upload_job->
type) {
virtual void WaitForUpload() const
void Dec(class Counter *counter)
void InitCounters(perf::StatisticsTemplate *statistics)
int64_t Xadd(class Counter *counter, const int64_t delta)
UniquePtr< UploadCounters > counters_
SynchronizingCounter< int32_t > jobs_in_flight_
int CreateAndOpenTemporaryChunkFile(std::string *path) const
std::string CreateTempPath(const std::string &path_prefix, const int mode)
unsigned num_upload_tasks_
void DecUploadedChunks() const
const SpoolerDefinition & spooler_definition() const
void CountUploadedChunks() const
virtual unsigned GetNumTasks() const
UploadStreamHandle * stream_handle
virtual bool FinalizeSession(bool commit, const std::string &old_root_hash, const std::string &new_root_hash, const RepositoryTag &tag)
virtual bool Initialize()
std::string temporary_path
scratch space for the IngestionPipeline
virtual void FinalizeStreamedUpload(UploadStreamHandle *handle, const shash::Any &content_hash)=0
static atomic_int64 g_upload_stream_tag
void CountUploadedBytes(int64_t bytes_written) const
virtual void StreamedUpload(UploadStreamHandle *handle, UploadBuffer buffer, const CallbackTN *callback)=0
AbstractUploader(const SpoolerDefinition &spooler_definition)
void Inc(class Counter *counter)
void CountDuplicates() const
void CountUploadedCatalogBytes(int64_t bytes_written) const
void CountUploadedCatalogs() const
TubeGroup< UploadJob > tubes_upload_
static void RegisterPlugins()
const SpoolerDefinition spooler_definition_
const CallbackTN * callback
TubeConsumerGroup< UploadJob > tasks_upload_
virtual void Process(AbstractUploader::UploadJob *upload_job)
AbstractUploader * uploader_
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)