18 #include "scanner/api/op.h" 19 #include "scanner/util/memory.h" 20 #include "storehouse/storage_backend.h" 22 #include <grpc++/server.h> 23 #include "scanner/engine/rpc.grpc.pb.h" 54 Database(storehouse::StorageConfig* storage_config,
55 const std::string& db_path,
const std::string& master_address);
60 const std::string& python_dir,
62 i64 no_workers_timeout = 30,
63 i32 new_job_retries_limit = 5);
66 const std::string& python_dir,
67 bool watchdog =
true);
69 Result ingest_videos(
const std::vector<std::string>& table_names,
70 const std::vector<std::string>& paths,
72 std::vector<FailedVideo>& failed_videos);
74 Result delete_table(
const std::string& table_name);
76 Result shutdown_master();
78 Result shutdown_worker();
80 Result wait_for_server_shutdown();
82 Result destroy_database();
85 bool database_exists();
88 std::unique_ptr<grpc::Server> server;
89 std::shared_ptr<grpc::Service> service;
93 storehouse::StorageConfig* storage_config_;
94 std::unique_ptr<storehouse::StorageBackend> storage_;
96 std::string master_address_;
98 std::unique_ptr<internal::MasterServerImpl> master_server_;
99 std::thread master_thread_;
100 std::vector<std::unique_ptr<ServerState>> worker_states_;
Info about a video that fails to ingest.
Definition: database.h:46
Definition: database.h:87
Definition: database.cpp:36
Description of resources for a given machine.
Definition: database.h:34
Main entry point into Scanner.
Definition: database.h:52
std::vector< i32 > gpu_ids
List of CUDA device IDs that Scanner should use.
Definition: database.h:39