Add UserFunctionCache to cache UDF's library (#453)

* Add UserFunctionCache to cache UDF's library

This patch replace LibCache with UserFunctionCache. LibCache use HDFS
URL to identify a UDF's Library, and when BE process restart all of
downloaded library should be loaded another time. We use function id
corresponding to a library, and when process restart, all downloaded
libraries can be loaded without another downloading.

* update
This commit is contained in:
ZHAO Chun
2018-12-21 22:07:21 +08:00
committed by chenhao
parent 0341ffde67
commit 90d71508ff
38 changed files with 858 additions and 699 deletions

View File

@ -46,6 +46,30 @@
namespace doris {
RuntimeState::RuntimeState(
const TUniqueId& fragment_instance_id,
const TQueryOptions& query_options,
const std::string& now, ExecEnv* exec_env) :
_obj_pool(new ObjectPool()),
_data_stream_recvrs_pool(new ObjectPool()),
_unreported_error_idx(0),
_profile(_obj_pool.get(), "Fragment " + print_id(fragment_instance_id)),
_fragment_mem_tracker(NULL),
_is_cancelled(false),
_per_fragment_instance_idx(0),
_root_node_id(-1),
_num_rows_load_success(0),
_num_rows_load_filtered(0),
_num_print_error_rows(0),
_normal_row_number(0),
_error_row_number(0),
_error_log_file(nullptr),
_is_running(true),
_instance_buffer_reservation(new ReservationTracker) {
Status status = init(fragment_instance_id, query_options, now, exec_env);
DCHECK(status.ok());
}
RuntimeState::RuntimeState(
const TExecPlanFragmentParams& fragment_params,
const TQueryOptions& query_options,