MCPcopy Create free account
hub / github.com/apache/impala / InitializeJavaWeigher

Function InitializeJavaWeigher

be/src/common/init.cc:444–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444static Status InitializeJavaWeigher() {
445 // This is set up so the default if things go wrong is to continue using ehcache.sizeof.
446 int version = GetJavaMajorVersion();
447 if (FLAGS_java_weigher == "auto") {
448 // Update for backend-gflag-util.cc setting use_jamm_weigher.
449 FLAGS_java_weigher = (version >= 15) ? "jamm" : "sizeof";
450 }
451 LOG(INFO) << "Using Java weigher " << FLAGS_java_weigher;
452
453 if (FLAGS_java_weigher == "jamm") {
454 RETURN_IF_ERROR(JavaAddJammAgent());
455 }
456 if (version >= 9) {
457 // add-opens is only supported in Java 9+.
458 RETURN_IF_ERROR(JavaAddOpens(FLAGS_java_weigher != "jamm"));
459 }
460 return Status::OK();
461}
462
463static Status JavaSetProcessName(const string& name) {
464 string current_val;

Callers 1

InitCommonRuntimeMethod · 0.85

Calls 4

GetJavaMajorVersionFunction · 0.85
JavaAddJammAgentFunction · 0.85
JavaAddOpensFunction · 0.85
OKFunction · 0.85

Tested by

no test coverage detected