-
Notifications
You must be signed in to change notification settings - Fork 71
/
atlas_start.py.patch
55 lines (48 loc) · 1.93 KB
/
atlas_start.py.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--- atlas_start.py.orig 2020-01-22 15:10:15.000000000 +0000
+++ atlas_start.py 2022-12-15 19:26:33.306245271 +0000
@@ -18,6 +18,7 @@
import os
import sys
import traceback
+from time import sleep
import atlas_config as mc
@@ -117,6 +118,9 @@
mc.run_hbase_action(mc.hbaseBinDir(atlas_home), "start", hbase_conf_dir, logdir)
print("Local HBase started!")
+ if is_setup:
+ print ("Sleeping 60s due too setup (init run)...")
+ sleep(60)
#solr setup
if mc.is_solr_local(confdir):
@@ -135,6 +139,9 @@
mc.run_solr(mc.solrBinDir(atlas_home), "start", mc.get_solr_zk_url(confdir), mc.solrPort(), logdir, True, mc.solrHomeDir(atlas_home))
print("Local Solr started!")
+ if is_setup:
+ print ("Sleeping 60s due too setup (init run)...")
+ sleep(60)
print("\nCreating Solr collections for Atlas using config: " + mc.solrConfDir(atlas_home))
@@ -155,8 +162,22 @@
web_app_path = mc.convertCygwinPath(web_app_path)
if not is_setup:
start_atlas_server(atlas_classpath, atlas_pid_file, jvm_logdir, jvm_opts_list, web_app_path)
- mc.wait_for_startup(confdir, 300)
- print("Apache Atlas Server started!!!\n")
+
+ mc.wait_for_startup(confdir, 600)
+ print ("Apache Atlas Server process started!\n")
+
+ atlas_pid_file = mc.pidFile(atlas_home)
+ try:
+ pf = file(atlas_pid_file, 'r')
+ pid = int(pf.read().strip())
+ pf.close()
+ print("Running Apache Atlas with PID " + str(pid) + "...\n")
+ except:
+ pid = None
+ if not pid:
+ sys.stderr.write("No PID file found! Server is not running?\nCheck logs: /apache-atlas/logs/application.log\n\n")
+ return
+
else:
process = mc.java("org.apache.atlas.web.setup.AtlasSetup", [], atlas_classpath, jvm_opts_list, jvm_logdir)
return process.wait()