Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
6b503eeb
Commit
6b503eeb
authored
5 years ago
by
mgorsk1
Committed by
kevalbhatt
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multiple_stdout_stderr_handlers_including_console
parent
62458388
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
92 additions
and
28 deletions
+92
-28
pom.xml
distro/pom.xml
+1
-0
atlas_config.py
distro/src/bin/atlas_config.py
+52
-16
atlas_start.py
distro/src/bin/atlas_start.py
+33
-11
cputil.py
distro/src/bin/cputil.py
+3
-1
atlas-env.sh
distro/src/conf/atlas-env.sh
+3
-0
No files found.
distro/pom.xml
View file @
6b503eeb
...
@@ -75,6 +75,7 @@ atlas.graph.index.search.solr.wait-searcher=true
...
@@ -75,6 +75,7 @@ atlas.graph.index.search.solr.wait-searcher=true
<solr.embedded>
false
</solr.embedded>
<solr.embedded>
false
</solr.embedded>
<cassandra.embedded>
false
</cassandra.embedded>
<cassandra.embedded>
false
</cassandra.embedded>
<elasticsearch.managed>
false
</elasticsearch.managed>
<elasticsearch.managed>
false
</elasticsearch.managed>
<log.console>
false
</log.console>
<entity.repository.properties>
atlas.EntityAuditRepository.impl=org.apache.atlas.repository.audit.HBaseBasedAuditRepository
</entity.repository.properties>
<entity.repository.properties>
atlas.EntityAuditRepository.impl=org.apache.atlas.repository.audit.HBaseBasedAuditRepository
</entity.repository.properties>
</properties>
</properties>
...
...
This diff is collapsed.
Click to expand it.
distro/src/bin/atlas_config.py
View file @
6b503eeb
...
@@ -26,6 +26,7 @@ import errno
...
@@ -26,6 +26,7 @@ import errno
import
socket
import
socket
from
re
import
split
from
re
import
split
from
time
import
sleep
from
time
import
sleep
from
distutils.util
import
strtobool
BIN
=
"bin"
BIN
=
"bin"
LIB
=
"lib"
LIB
=
"lib"
...
@@ -56,10 +57,11 @@ SOLR_SHARDS = "SOLR_SHARDS"
...
@@ -56,10 +57,11 @@ SOLR_SHARDS = "SOLR_SHARDS"
DEFAULT_SOLR_SHARDS
=
"1"
DEFAULT_SOLR_SHARDS
=
"1"
SOLR_REPLICATION_FACTOR
=
"SOLR_REPLICATION_FACTOR"
SOLR_REPLICATION_FACTOR
=
"SOLR_REPLICATION_FACTOR"
DEFAULT_SOLR_REPLICATION_FACTOR
=
"1"
DEFAULT_SOLR_REPLICATION_FACTOR
=
"1"
ENABLE_LOGGING_TO_CONSOLE
=
"ENABLE_LOGGING_TO_CONSOLE"
ENV_KEYS
=
[
"JAVA_HOME"
,
ATLAS_OPTS
,
ATLAS_SERVER_OPTS
,
ATLAS_SERVER_HEAP
,
ATLAS_LOG
,
ATLAS_PID
,
ATLAS_CONF
,
ENV_KEYS
=
[
"JAVA_HOME"
,
ATLAS_OPTS
,
ATLAS_SERVER_OPTS
,
ATLAS_SERVER_HEAP
,
ATLAS_LOG
,
ATLAS_PID
,
ATLAS_CONF
,
"ATLASCPPATH"
,
ATLAS_DATA
,
ATLAS_HOME
,
ATLAS_WEBAPP
,
HBASE_CONF_DIR
,
SOLR_PORT
,
MANAGE_LOCAL_HBASE
,
"ATLASCPPATH"
,
ATLAS_DATA
,
ATLAS_HOME
,
ATLAS_WEBAPP
,
HBASE_CONF_DIR
,
SOLR_PORT
,
MANAGE_LOCAL_HBASE
,
MANAGE_LOCAL_SOLR
,
MANAGE_EMBEDDED_CASSANDRA
,
MANAGE_LOCAL_ELASTICSEARCH
]
MANAGE_LOCAL_SOLR
,
MANAGE_EMBEDDED_CASSANDRA
,
MANAGE_LOCAL_ELASTICSEARCH
,
ENABLE_LOGGING_TO_CONSOLE
]
IS_WINDOWS
=
platform
.
system
()
==
"Windows"
IS_WINDOWS
=
platform
.
system
()
==
"Windows"
ON_POSIX
=
'posix'
in
sys
.
builtin_module_names
ON_POSIX
=
'posix'
in
sys
.
builtin_module_names
CONF_FILE
=
"atlas-application.properties"
CONF_FILE
=
"atlas-application.properties"
...
@@ -179,7 +181,7 @@ def executeEnvSh(confDir):
...
@@ -179,7 +181,7 @@ def executeEnvSh(confDir):
proc
.
communicate
()
proc
.
communicate
()
def
java
(
classname
,
args
,
classpath
,
jvm_opts_list
,
logdir
=
None
):
def
java
(
classname
,
args
,
classpath
,
jvm_opts_list
,
logdir
=
None
,
logconsole
=
"false"
):
java_home
=
os
.
environ
.
get
(
"JAVA_HOME"
,
None
)
java_home
=
os
.
environ
.
get
(
"JAVA_HOME"
,
None
)
if
java_home
:
if
java_home
:
prg
=
os
.
path
.
join
(
java_home
,
"bin"
,
"java"
)
prg
=
os
.
path
.
join
(
java_home
,
"bin"
,
"java"
)
...
@@ -195,9 +197,10 @@ def java(classname, args, classpath, jvm_opts_list, logdir=None):
...
@@ -195,9 +197,10 @@ def java(classname, args, classpath, jvm_opts_list, logdir=None):
commandline
.
append
(
classpath
)
commandline
.
append
(
classpath
)
commandline
.
append
(
classname
)
commandline
.
append
(
classname
)
commandline
.
extend
(
args
)
commandline
.
extend
(
args
)
return
runProcess
(
commandline
,
logdir
)
return
runProcess
(
commandline
,
logdir
,
logconsole
=
logconsole
)
def
jar
(
path
):
def
jar
(
path
,
logconsole
=
"false"
):
java_home
=
os
.
environ
.
get
(
"JAVA_HOME"
,
None
)
java_home
=
os
.
environ
.
get
(
"JAVA_HOME"
,
None
)
if
java_home
:
if
java_home
:
prg
=
os
.
path
.
join
(
java_home
,
"bin"
,
"jar"
)
prg
=
os
.
path
.
join
(
java_home
,
"bin"
,
"jar"
)
...
@@ -210,7 +213,8 @@ def jar(path):
...
@@ -210,7 +213,8 @@ def jar(path):
commandline
=
[
prg
]
commandline
=
[
prg
]
commandline
.
append
(
"-xf"
)
commandline
.
append
(
"-xf"
)
commandline
.
append
(
path
)
commandline
.
append
(
path
)
process
=
runProcess
(
commandline
)
process
=
runProcess
(
commandline
,
logconsole
=
logconsole
)
process
.
wait
()
process
.
wait
()
def
is_exe
(
fpath
):
def
is_exe
(
fpath
):
...
@@ -231,17 +235,44 @@ def which(program):
...
@@ -231,17 +235,44 @@ def which(program):
return
None
return
None
def
runProcess
(
commandline
,
logdir
=
None
,
shell
=
False
,
wait
=
False
):
def
runProcess
(
commandline
,
logdir
=
None
,
shell
=
False
,
wait
=
False
,
logconsole
=
"false"
):
"""
"""
Run a process
Run a process
:param commandline: command line
:param commandline: command line
:param: logdir: directory where logs from stdout and stderr should be saved
:logconsole: whether to print outout of stdout and stderr to console
:return:the return code
:return:the return code
"""
"""
global
finished
global
finished
debug
(
"Executing :
%
s"
%
str
(
commandline
))
debug
(
"Executing :
%
s"
%
str
(
commandline
))
timestr
=
time
.
strftime
(
"atlas.
%
Y
%
m
%
d-
%
H
%
M
%
S"
)
timestr
=
time
.
strftime
(
"atlas.
%
Y
%
m
%
d-
%
H
%
M
%
S"
)
logconsole
=
bool
(
strtobool
(
logconsole
))
if
logconsole
:
stdoutTargetsList
=
[
sys
.
stdout
]
stderrTargetsList
=
[
sys
.
stderr
]
if
logdir
:
stdoutFile
=
open
(
os
.
path
.
join
(
logdir
,
timestr
+
".out"
),
"w"
)
stderrFile
=
open
(
os
.
path
.
join
(
logdir
,
timestr
+
".err"
),
"w"
)
stdoutTargetsList
.
append
(
stdoutFile
)
stderrTargetsList
.
append
(
stderrFile
)
p
=
subprocess
.
Popen
(
commandline
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
shell
=
shell
)
for
line
in
p
.
stdout
:
for
target
in
stdoutTargetsList
:
target
.
write
(
line
)
for
line
in
p
.
stderr
:
for
target
in
stderrTargetsList
:
target
.
write
(
line
)
else
:
stdoutFile
=
None
stdoutFile
=
None
stderrFile
=
None
stderrFile
=
None
if
logdir
:
if
logdir
:
stdoutFile
=
open
(
os
.
path
.
join
(
logdir
,
timestr
+
".out"
),
"w"
)
stdoutFile
=
open
(
os
.
path
.
join
(
logdir
,
timestr
+
".out"
),
"w"
)
stderrFile
=
open
(
os
.
path
.
join
(
logdir
,
timestr
+
".err"
),
"w"
)
stderrFile
=
open
(
os
.
path
.
join
(
logdir
,
timestr
+
".err"
),
"w"
)
...
@@ -418,7 +449,7 @@ def is_hbase_local(confdir):
...
@@ -418,7 +449,7 @@ def is_hbase_local(confdir):
confFile
=
os
.
path
.
join
(
confdir
,
CONF_FILE
)
confFile
=
os
.
path
.
join
(
confdir
,
CONF_FILE
)
return
is_hbase
(
confdir
)
and
grep
(
confFile
,
HBASE_STORAGE_LOCAL_CONF_ENTRY
)
is
not
None
return
is_hbase
(
confdir
)
and
grep
(
confFile
,
HBASE_STORAGE_LOCAL_CONF_ENTRY
)
is
not
None
def
run_hbase_action
(
dir
,
action
,
hbase_conf_dir
=
None
,
logdir
=
None
,
wait
=
True
):
def
run_hbase_action
(
dir
,
action
,
hbase_conf_dir
=
None
,
logdir
=
None
,
wait
=
True
,
logconsole
=
"false"
):
if
IS_WINDOWS
:
if
IS_WINDOWS
:
if
action
==
'start'
:
if
action
==
'start'
:
hbaseScript
=
'start-hbase.cmd'
hbaseScript
=
'start-hbase.cmd'
...
@@ -436,7 +467,8 @@ def run_hbase_action(dir, action, hbase_conf_dir = None, logdir = None, wait=Tru
...
@@ -436,7 +467,8 @@ def run_hbase_action(dir, action, hbase_conf_dir = None, logdir = None, wait=Tru
cmd
=
[
os
.
path
.
join
(
dir
,
hbaseScript
),
action
,
'master'
]
cmd
=
[
os
.
path
.
join
(
dir
,
hbaseScript
),
action
,
'master'
]
return
runProcess
(
cmd
,
logdir
,
False
,
wait
)
return
runProcess
(
cmd
,
logdir
,
False
,
wait
,
logconsole
=
logconsole
)
def
is_solr
(
confdir
):
def
is_solr
(
confdir
):
confdir
=
os
.
path
.
join
(
confdir
,
CONF_FILE
)
confdir
=
os
.
path
.
join
(
confdir
,
CONF_FILE
)
...
@@ -523,7 +555,7 @@ def wait_for_startup(confdir, wait):
...
@@ -523,7 +555,7 @@ def wait_for_startup(confdir, wait):
sys
.
stdout
.
write
(
'
\n
'
)
sys
.
stdout
.
write
(
'
\n
'
)
def
run_zookeeper
(
dir
,
action
,
logdir
=
None
,
wait
=
True
):
def
run_zookeeper
(
dir
,
action
,
logdir
=
None
,
wait
=
True
,
logconsole
=
"false"
):
zookeeperScript
=
"zkServer.sh"
zookeeperScript
=
"zkServer.sh"
if
IS_WINDOWS
:
if
IS_WINDOWS
:
...
@@ -531,9 +563,10 @@ def run_zookeeper(dir, action, logdir = None, wait=True):
...
@@ -531,9 +563,10 @@ def run_zookeeper(dir, action, logdir = None, wait=True):
cmd
=
[
os
.
path
.
join
(
dir
,
zookeeperScript
),
action
,
os
.
path
.
join
(
dir
,
'../../conf/zookeeper/zoo.cfg'
)]
cmd
=
[
os
.
path
.
join
(
dir
,
zookeeperScript
),
action
,
os
.
path
.
join
(
dir
,
'../../conf/zookeeper/zoo.cfg'
)]
return
runProcess
(
cmd
,
logdir
,
False
,
wait
)
return
runProcess
(
cmd
,
logdir
,
False
,
wait
,
logconsole
=
logconsole
)
def
start_elasticsearch
(
dir
,
logdir
=
None
,
wait
=
True
):
def
start_elasticsearch
(
dir
,
logdir
=
None
,
wait
=
True
,
logconsole
=
"false"
):
elasticsearchScript
=
"elasticsearch"
elasticsearchScript
=
"elasticsearch"
...
@@ -542,11 +575,12 @@ def start_elasticsearch(dir, logdir = None, wait=True):
...
@@ -542,11 +575,12 @@ def start_elasticsearch(dir, logdir = None, wait=True):
cmd
=
[
os
.
path
.
join
(
dir
,
elasticsearchScript
),
'-d'
,
'-p'
,
os
.
path
.
join
(
logdir
,
'elasticsearch.pid'
)]
cmd
=
[
os
.
path
.
join
(
dir
,
elasticsearchScript
),
'-d'
,
'-p'
,
os
.
path
.
join
(
logdir
,
'elasticsearch.pid'
)]
processVal
=
runProcess
(
cmd
,
logdir
,
False
,
wait
)
processVal
=
runProcess
(
cmd
,
logdir
,
False
,
wait
,
logconsole
=
logconsole
)
sleep
(
6
)
sleep
(
6
)
return
processVal
return
processVal
def
run_solr
(
dir
,
action
,
zk_url
=
None
,
port
=
None
,
logdir
=
None
,
wait
=
True
):
def
run_solr
(
dir
,
action
,
zk_url
=
None
,
port
=
None
,
logdir
=
None
,
wait
=
True
,
logconsole
=
"false"
):
solrScript
=
"solr"
solrScript
=
"solr"
...
@@ -564,9 +598,10 @@ def run_solr(dir, action, zk_url = None, port = None, logdir = None, wait=True):
...
@@ -564,9 +598,10 @@ def run_solr(dir, action, zk_url = None, port = None, logdir = None, wait=True):
else
:
else
:
cmd
=
[
os
.
path
.
join
(
dir
,
solrScript
),
action
,
'-z'
,
zk_url
,
'-p'
,
port
]
cmd
=
[
os
.
path
.
join
(
dir
,
solrScript
),
action
,
'-z'
,
zk_url
,
'-p'
,
port
]
return
runProcess
(
cmd
,
logdir
,
False
,
wait
)
return
runProcess
(
cmd
,
logdir
,
False
,
wait
,
logconsole
=
logconsole
)
def
create_solr_collection
(
dir
,
confdir
,
index
,
logdir
=
None
,
wait
=
True
):
def
create_solr_collection
(
dir
,
confdir
,
index
,
logdir
=
None
,
wait
=
True
,
logconsole
=
"false"
):
solrScript
=
"solr"
solrScript
=
"solr"
if
IS_WINDOWS
:
if
IS_WINDOWS
:
...
@@ -574,7 +609,8 @@ def create_solr_collection(dir, confdir, index, logdir = None, wait=True):
...
@@ -574,7 +609,8 @@ def create_solr_collection(dir, confdir, index, logdir = None, wait=True):
cmd
=
[
os
.
path
.
join
(
dir
,
solrScript
),
'create'
,
'-c'
,
index
,
'-d'
,
confdir
,
'-shards'
,
solrShards
(),
'-replicationFactor'
,
solrReplicationFactor
()]
cmd
=
[
os
.
path
.
join
(
dir
,
solrScript
),
'create'
,
'-c'
,
index
,
'-d'
,
confdir
,
'-shards'
,
solrShards
(),
'-replicationFactor'
,
solrReplicationFactor
()]
return
runProcess
(
cmd
,
logdir
,
False
,
wait
)
return
runProcess
(
cmd
,
logdir
,
False
,
wait
,
logconsole
=
logconsole
)
def
configure_hbase
(
dir
):
def
configure_hbase
(
dir
):
env_conf_dir
=
os
.
environ
.
get
(
HBASE_CONF_DIR
)
env_conf_dir
=
os
.
environ
.
get
(
HBASE_CONF_DIR
)
...
...
This diff is collapsed.
Click to expand it.
distro/src/bin/atlas_start.py
View file @
6b503eeb
...
@@ -21,6 +21,8 @@ import traceback
...
@@ -21,6 +21,8 @@ import traceback
import
atlas_config
as
mc
import
atlas_config
as
mc
from
distutils.util
import
strtobool
ATLAS_LOG_OPTS
=
"-Datlas.log.dir=
%
s -Datlas.log.file=
%
s.log"
ATLAS_LOG_OPTS
=
"-Datlas.log.dir=
%
s -Datlas.log.file=
%
s.log"
ATLAS_COMMAND_OPTS
=
"-Datlas.home=
%
s"
ATLAS_COMMAND_OPTS
=
"-Datlas.home=
%
s"
ATLAS_CONFIG_OPTS
=
"-Datlas.conf=
%
s"
ATLAS_CONFIG_OPTS
=
"-Datlas.conf=
%
s"
...
@@ -35,6 +37,9 @@ def main():
...
@@ -35,6 +37,9 @@ def main():
confdir
=
mc
.
dirMustExist
(
mc
.
confDir
(
atlas_home
))
confdir
=
mc
.
dirMustExist
(
mc
.
confDir
(
atlas_home
))
mc
.
executeEnvSh
(
confdir
)
mc
.
executeEnvSh
(
confdir
)
logdir
=
mc
.
dirMustExist
(
mc
.
logDir
(
atlas_home
))
logdir
=
mc
.
dirMustExist
(
mc
.
logDir
(
atlas_home
))
console_logging
=
"enabled"
if
bool
(
strtobool
(
os
.
environ
.
get
(
mc
.
ENABLE_LOGGING_TO_CONSOLE
)))
else
"disabled"
print
"Logging to console is
%
s."
%
console_logging
mc
.
dirMustExist
(
mc
.
dataDir
(
atlas_home
))
mc
.
dirMustExist
(
mc
.
dataDir
(
atlas_home
))
if
mc
.
isCygwin
():
if
mc
.
isCygwin
():
# Pathnames that are passed to JVM must be converted to Windows format.
# Pathnames that are passed to JVM must be converted to Windows format.
...
@@ -112,7 +117,9 @@ def main():
...
@@ -112,7 +117,9 @@ def main():
if
is_hbase
and
mc
.
is_hbase_local
(
confdir
):
if
is_hbase
and
mc
.
is_hbase_local
(
confdir
):
print
"configured for local hbase."
print
"configured for local hbase."
mc
.
configure_hbase
(
atlas_home
)
mc
.
configure_hbase
(
atlas_home
)
mc
.
run_hbase_action
(
mc
.
hbaseBinDir
(
atlas_home
),
"start"
,
hbase_conf_dir
,
logdir
)
mc
.
run_hbase_action
(
mc
.
hbaseBinDir
(
atlas_home
),
"start"
,
hbase_conf_dir
,
logdir
,
logconsole
=
os
.
environ
.
get
(
mc
.
ENABLE_LOGGING_TO_CONSOLE
))
print
"hbase started."
print
"hbase started."
#solr setup
#solr setup
...
@@ -123,39 +130,54 @@ def main():
...
@@ -123,39 +130,54 @@ def main():
print
"Cassandra embedded configured."
print
"Cassandra embedded configured."
mc
.
configure_cassandra
(
atlas_home
)
mc
.
configure_cassandra
(
atlas_home
)
mc
.
configure_zookeeper
(
atlas_home
)
mc
.
configure_zookeeper
(
atlas_home
)
mc
.
run_zookeeper
(
mc
.
zookeeperBinDir
(
atlas_home
),
"start"
,
logdir
)
mc
.
run_zookeeper
(
mc
.
zookeeperBinDir
(
atlas_home
),
"start"
,
logdir
,
logconsole
=
os
.
environ
.
get
(
mc
.
ENABLE_LOGGING_TO_CONSOLE
))
print
"zookeeper started."
print
"zookeeper started."
mc
.
run_solr
(
mc
.
solrBinDir
(
atlas_home
),
"start"
,
mc
.
get_solr_zk_url
(
confdir
),
mc
.
solrPort
(),
logdir
)
mc
.
run_solr
(
mc
.
solrBinDir
(
atlas_home
),
"start"
,
mc
.
get_solr_zk_url
(
confdir
),
mc
.
solrPort
(),
logdir
,
logconsole
=
os
.
environ
.
get
(
mc
.
ENABLE_LOGGING_TO_CONSOLE
))
print
"solr started."
print
"solr started."
print
"setting up solr collections..."
print
"setting up solr collections..."
mc
.
create_solr_collection
(
mc
.
solrBinDir
(
atlas_home
),
mc
.
solrConfDir
(
atlas_home
),
"vertex_index"
,
logdir
)
mc
.
create_solr_collection
(
mc
.
solrBinDir
(
atlas_home
),
mc
.
solrConfDir
(
atlas_home
),
"vertex_index"
,
logdir
,
mc
.
create_solr_collection
(
mc
.
solrBinDir
(
atlas_home
),
mc
.
solrConfDir
(
atlas_home
),
"edge_index"
,
logdir
)
logconsole
=
os
.
environ
.
get
(
mc
.
ENABLE_LOGGING_TO_CONSOLE
))
mc
.
create_solr_collection
(
mc
.
solrBinDir
(
atlas_home
),
mc
.
solrConfDir
(
atlas_home
),
"fulltext_index"
,
logdir
)
mc
.
create_solr_collection
(
mc
.
solrBinDir
(
atlas_home
),
mc
.
solrConfDir
(
atlas_home
),
"edge_index"
,
logdir
,
logconsole
=
os
.
environ
.
get
(
mc
.
ENABLE_LOGGING_TO_CONSOLE
))
mc
.
create_solr_collection
(
mc
.
solrBinDir
(
atlas_home
),
mc
.
solrConfDir
(
atlas_home
),
"fulltext_index"
,
logdir
,
logconsole
=
os
.
environ
.
get
(
mc
.
ENABLE_LOGGING_TO_CONSOLE
))
#elasticsearch setup
#elasticsearch setup
if
mc
.
is_elasticsearch_local
():
if
mc
.
is_elasticsearch_local
():
print
"configured for local elasticsearch."
print
"configured for local elasticsearch."
mc
.
start_elasticsearch
(
mc
.
elasticsearchBinDir
(
atlas_home
),
logdir
)
mc
.
start_elasticsearch
(
mc
.
elasticsearchBinDir
(
atlas_home
),
logdir
,
logconsole
=
os
.
environ
.
get
(
mc
.
ENABLE_LOGGING_TO_CONSOLE
))
print
"elasticsearch started."
print
"elasticsearch started."
web_app_path
=
os
.
path
.
join
(
web_app_dir
,
"atlas"
)
web_app_path
=
os
.
path
.
join
(
web_app_dir
,
"atlas"
)
if
(
mc
.
isCygwin
()):
if
(
mc
.
isCygwin
()):
web_app_path
=
mc
.
convertCygwinPath
(
web_app_path
)
web_app_path
=
mc
.
convertCygwinPath
(
web_app_path
)
if
not
is_setup
:
if
not
is_setup
:
start_atlas_server
(
atlas_classpath
,
atlas_pid_file
,
jvm_logdir
,
jvm_opts_list
,
web_app_path
)
start_atlas_server
(
atlas_classpath
,
atlas_pid_file
,
jvm_logdir
,
jvm_opts_list
,
web_app_path
,
logconsole
=
os
.
environ
.
get
(
mc
.
ENABLE_LOGGING_TO_CONSOLE
))
mc
.
wait_for_startup
(
confdir
,
300
)
mc
.
wait_for_startup
(
confdir
,
300
)
print
"Apache Atlas Server started!!!
\n
"
print
"Apache Atlas Server started!!!
\n
"
else
:
else
:
process
=
mc
.
java
(
"org.apache.atlas.web.setup.AtlasSetup"
,
[],
atlas_classpath
,
jvm_opts_list
,
jvm_logdir
)
process
=
mc
.
java
(
"org.apache.atlas.web.setup.AtlasSetup"
,
[],
atlas_classpath
,
jvm_opts_list
,
jvm_logdir
,
logconsole
=
os
.
environ
.
get
(
mc
.
ENABLE_LOGGING_TO_CONSOLE
))
return
process
.
wait
()
return
process
.
wait
()
def
start_atlas_server
(
atlas_classpath
,
atlas_pid_file
,
jvm_logdir
,
jvm_opts_list
,
web_app_path
):
def
start_atlas_server
(
atlas_classpath
,
atlas_pid_file
,
jvm_logdir
,
jvm_opts_list
,
web_app_path
,
logconsole
=
"false"
):
args
=
[
"-app"
,
web_app_path
]
args
=
[
"-app"
,
web_app_path
]
args
.
extend
(
sys
.
argv
[
1
:])
args
.
extend
(
sys
.
argv
[
1
:])
process
=
mc
.
java
(
"org.apache.atlas.Atlas"
,
args
,
atlas_classpath
,
jvm_opts_list
,
jvm_logdir
)
process
=
mc
.
java
(
"org.apache.atlas.Atlas"
,
args
,
atlas_classpath
,
jvm_opts_list
,
jvm_logdir
,
logconsole
=
logconsole
)
mc
.
writePid
(
atlas_pid_file
,
process
)
mc
.
writePid
(
atlas_pid_file
,
process
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
This diff is collapsed.
Click to expand it.
distro/src/bin/cputil.py
View file @
6b503eeb
...
@@ -45,7 +45,9 @@ def main():
...
@@ -45,7 +45,9 @@ def main():
+
os
.
path
.
join
(
web_app_dir
,
"atlas"
,
"WEB-INF"
,
"lib"
,
"*"
)
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"atlas"
,
"WEB-INF"
,
"lib"
,
"*"
)
+
p
\
+
os
.
path
.
join
(
atlas_home
,
"libext"
,
"*"
)
+
os
.
path
.
join
(
atlas_home
,
"libext"
,
"*"
)
process
=
mc
.
java
(
"org.apache.atlas.util.CredentialProviderUtility"
,
sys
.
argv
[
1
:],
atlas_classpath
,
jvm_opts_list
)
process
=
mc
.
java
(
"org.apache.atlas.util.CredentialProviderUtility"
,
sys
.
argv
[
1
:],
atlas_classpath
,
jvm_opts_list
,
logconsole
=
os
.
environ
.
get
(
mc
.
ENABLE_LOGGING_TO_CONSOLE
))
process
.
wait
()
process
.
wait
()
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
This diff is collapsed.
Click to expand it.
distro/src/conf/atlas-env.sh
View file @
6b503eeb
...
@@ -66,3 +66,6 @@ export MANAGE_EMBEDDED_CASSANDRA=${cassandra.embedded}
...
@@ -66,3 +66,6 @@ export MANAGE_EMBEDDED_CASSANDRA=${cassandra.embedded}
# indicates whether or not a local instance of Elasticsearch should be started for Atlas
# indicates whether or not a local instance of Elasticsearch should be started for Atlas
export
MANAGE_LOCAL_ELASTICSEARCH
=
${
elasticsearch
.managed
}
export
MANAGE_LOCAL_ELASTICSEARCH
=
${
elasticsearch
.managed
}
# Indicates whether or not allow printing logs to stdout. To be used only with processes not requiring user input.
export
ENABLE_LOGGING_TO_CONSOLE
=
${
log
.console
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment