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

Function main

be/src/service/internal-server-test.cc:569–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

567} // namespace impala
568
569int main(int argc, char** argv) {
570 FLAGS_jni_frontend_class = "org/apache/impala/service/JniFrontend";
571
572 FLAGS_hostname = "localhost";
573 FLAGS_state_store_host = FLAGS_hostname;
574 FLAGS_catalog_service_host = FLAGS_hostname;
575 FLAGS_enable_webserver = true;
576
577 FLAGS_hs2_port = 21055;
578 FLAGS_hs2_http_port = 28005;
579 FLAGS_krpc_port = 27005;
580 FLAGS_state_store_subscriber_port = 23005;
581 FLAGS_webserver_port = 25005;
582
583 // Provides information about the current thread in a minidump if one is generated.
584 ThreadDebugInfo debugInfo;
585
586 testing::InitGoogleTest(&argc, argv);
587 InitCommonRuntime(argc, argv, true, TestInfo::BE_CLUSTER_TEST);
588 ABORT_IF_ERROR(LlvmCodeGen::InitializeLlvm(argv[0]));
589 JniUtil::InitLibhdfs();
590 ABORT_IF_ERROR(JniCatalogCacheUpdateIterator::InitJNI());
591 InitFeSupport();
592
593 ExecEnv exec_env;
594 ABORT_IF_ERROR(exec_env.Init());
595
596 impala_server_ = make_shared<ImpalaServer>(&exec_env);
597 ABORT_IF_ERROR(impala_server_->Start(FLAGS_beeswax_port, FLAGS_hs2_port,
598 FLAGS_hs2_http_port, 0));
599
600 EXPECT_TRUE(impala_server_->IsCoordinator());
601 EXPECT_TRUE(impala_server_->IsExecutor());
602 exec_env.frontend()->WaitForCatalog();
603
604 ABORT_IF_ERROR(WaitForServer(FLAGS_hostname, FLAGS_hs2_port, 10, 100));
605
606 int test_ret_val = RUN_ALL_TESTS();
607
608 ShutdownStatusPB shutdown_status;
609 ABORT_IF_ERROR(impala_server_->StartShutdown(5, &shutdown_status));
610 impala_server_->Join();
611
612 return test_ret_val;
613}

Callers

nothing calls this directly

Calls 10

InitFeSupportFunction · 0.85
WaitForServerFunction · 0.85
IsCoordinatorMethod · 0.80
IsExecutorMethod · 0.80
WaitForCatalogMethod · 0.80
StartShutdownMethod · 0.80
InitMethod · 0.45
StartMethod · 0.45
frontendMethod · 0.45
JoinMethod · 0.45

Tested by

no test coverage detected