26 using namespace impala;
29 "If true, loads catalog metadata in the background. If false, metadata is loaded "
30 "lazily (on access).");
32 "(Advanced) The number of metadata loading threads (degree of parallelism) to use "
33 "when loading catalog metadata.");
34 DEFINE_string(sentry_config,
"",
"Local path to a sentry-site.xml configuration "
35 "file. If set, authorization will be enabled.");
56 catalog_class_ = jni_env->FindClass(
"com/cloudera/impala/service/JniCatalog");
59 uint32_t num_methods =
sizeof(methods) /
sizeof(methods[0]);
60 for (
int i = 0; i < num_methods; ++i) {
64 jboolean load_in_background = FLAGS_load_catalog_in_background;
65 jint num_metadata_loading_threads = FLAGS_num_metadata_loading_threads;
66 jstring sentry_config = jni_env->NewStringUTF(FLAGS_sentry_config.c_str());
68 load_in_background, num_metadata_loading_threads, sentry_config,
75 TCatalogObject* resp) {
88 TGetAllCatalogObjectsResponse* resp) {
92 jvalue requested_from_version;
93 requested_from_version.j = from_version;
94 jbyteArray result_bytes =
static_cast<jbyteArray
>(
96 requested_from_version));
107 TResetMetadataResponse* resp) {
112 TUpdateCatalogResponse* resp) {
117 TGetDbsParams params;
118 if (pattern != NULL) params.__set_pattern(*pattern);
123 TGetTablesResult* table_names) {
124 TGetTablesParams params;
126 if (pattern != NULL) params.__set_pattern(*pattern);
131 TGetFunctionsResponse *response) {
jmethodID get_catalog_object_id_
jmethodID get_functions_id_
jmethodID get_table_names_id_
DEFINE_bool(load_catalog_in_background, false,"If true, loads catalog metadata in the background. If false, metadata is loaded ""lazily (on access).")
Status ExecDdl(const TDdlExecRequest &req, TDdlExecResponse *resp)
Status PrioritizeLoad(const TPrioritizeLoadRequest &req)
TLogLevel::type FlagToTLogLevel(int flag)
jmethodID sentry_admin_check_id_
jmethodID update_metastore_id_
#define RETURN_IF_ERROR(stmt)
some generally useful macros
static Status LoadJniMethod(JNIEnv *jni_env, const jclass &jni_class, JniMethodDescriptor *descriptor)
Status GetDbNames(const std::string *pattern, TGetDbsResult *table_names)
Status GetAllCatalogObjects(long from_version, TGetAllCatalogObjectsResponse *resp)
DECLARE_int32(non_impala_java_vlog)
Status SentryAdminCheck(const TSentryAdminCheckRequest &req)
Status UpdateCatalog(const TUpdateCatalogRequest &req, TUpdateCatalogResponse *resp)
static Status LocalToGlobalRef(JNIEnv *env, jobject local_ref, jobject *global_ref)
jmethodID get_catalog_version_id_
Status GetCatalogObject(const TCatalogObject &request, TCatalogObject *response)
jmethodID reset_metadata_id_
#define EXIT_IF_ERROR(stmt)
jmethodID prioritize_load_id_
Status push(JNIEnv *env, int max_local_ref=10)
Describes one method to look up in a Java object.
#define RETURN_ERROR_IF_EXC(env)
Status GetFunctions(const TGetFunctionsRequest &request, TGetFunctionsResponse *response)
Status GetTableNames(const std::string &db, const std::string *pattern, TGetTablesResult *table_names)
jclass catalog_class_
Descriptor of Java Catalog class itself, used to create a new instance.
jmethodID get_catalog_objects_id_
Status ResetMetadata(const TResetMetadataRequest &req, TResetMetadataResponse *resp)
Status DeserializeThriftMsg(JNIEnv *env, jbyteArray serialized_msg, T *deserialized_msg)
DEFINE_int32(periodic_counter_update_period_ms, 500,"Period to update rate counters and"" sampling counters in ms")
static Status CallJniMethod(const jobject &obj, const jmethodID &method, const T &arg)
DEFINE_string(sentry_config,"","Local path to a sentry-site.xml configuration ""file. If set, authorization will be enabled.")
jmethodID get_db_names_id_
Status GetCatalogVersion(long *version)
JNIEnv * getJNIEnv(void)
C linkage for helper functions in hdfsJniHelper.h.