6 #include "absl/container/flat_hash_map.h" 7 #include "absl/strings/string_view.h" 9 #include "mr/mr_types.h" 16 using ShardFileMap = absl::flat_hash_map<ShardId, std::string>;
24 virtual void Init() = 0;
26 virtual void Shutdown() = 0;
29 virtual void OperatorStart(
const pb::Operator* op) = 0;
34 virtual void OperatorEnd(ShardFileMap* out_files) = 0;
36 using ExpandCb = std::function<void(
size_t file_size,
const std::string&)>;
38 virtual void ExpandGlob(
const std::string& glob, ExpandCb cb) = 0;
42 virtual size_t ProcessInputFile(
const std::string& filename, pb::WireFormat::Type type,
45 virtual void SaveFile(absl::string_view fn, absl::string_view data) = 0;