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
dab9cb7c
Commit
dab9cb7c
authored
May 05, 2016
by
Shwetha GS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-659 atlas_start fails on Windows (dkantor via shwethags)
parent
feff0cf7
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
13 deletions
+36
-13
atlas_config.py
distro/src/bin/atlas_config.py
+24
-5
atlas_start.py
distro/src/bin/atlas_start.py
+6
-6
atlas_stop.py
distro/src/bin/atlas_stop.py
+1
-1
hbase-site.xml.template
distro/src/conf/hbase/hbase-site.xml.template
+1
-1
TestMetadata.py
distro/src/test/python/scripts/TestMetadata.py
+3
-0
release-log.txt
release-log.txt
+1
-0
No files found.
distro/src/bin/atlas_config.py
View file @
dab9cb7c
...
...
@@ -326,13 +326,14 @@ def exist_pid(pid):
elif
IS_WINDOWS
:
#The os.kill approach does not work on Windows with python 2.7
#the output from tasklist command is searched for the process id
command
=
'tasklist /fi "pid eq '
+
pid
+
'"'
pidStr
=
str
(
pid
)
command
=
'tasklist /fi "pid eq
%
s"'
%
pidStr
sub_process
=
subprocess
.
Popen
(
command
,
stdout
=
subprocess
.
PIPE
,
shell
=
False
)
sub_process
.
communicate
()
output
=
subprocess
.
check_output
(
command
)
output
=
split
(
" *"
,
output
)
for
line
in
output
:
if
pid
in
line
:
if
pid
Str
in
line
:
return
True
return
False
#os other than nt or posix - not supported - need to delete the file to restart server if pid no longer exist
...
...
@@ -359,11 +360,23 @@ def is_hbase_local(confdir):
confdir
=
os
.
path
.
join
(
confdir
,
CONF_FILE
)
return
grep
(
confdir
,
HBASE_STORAGE_CONF_ENTRY
)
is
not
None
and
grep
(
confdir
,
HBASE_STORAGE_LOCAL_CONF_ENTRY
)
is
not
None
def
run_hbase
(
dir
,
action
,
hbase_conf_dir
=
None
,
logdir
=
None
,
wait
=
True
):
def
run_hbase_action
(
dir
,
action
,
hbase_conf_dir
=
None
,
logdir
=
None
,
wait
=
True
):
if
IS_WINDOWS
:
if
action
==
'start'
:
hbaseScript
=
'start-hbase.cmd'
else
:
hbaseScript
=
'stop-hbase.cmd'
if
hbase_conf_dir
is
not
None
:
cmd
=
[
os
.
path
.
join
(
dir
,
hbaseScript
),
'--config'
,
hbase_conf_dir
]
else
:
cmd
=
[
os
.
path
.
join
(
dir
,
hbaseScript
)]
else
:
hbaseScript
=
'hbase-daemon.sh'
if
hbase_conf_dir
is
not
None
:
cmd
=
[
os
.
path
.
join
(
dir
,
"hbase-daemon.sh"
),
'--config'
,
hbase_conf_dir
,
action
,
'master'
]
cmd
=
[
os
.
path
.
join
(
dir
,
hbaseScript
),
'--config'
,
hbase_conf_dir
,
action
,
'master'
]
else
:
cmd
=
[
os
.
path
.
join
(
dir
,
"hbase-daemon.sh"
),
action
,
'master'
]
cmd
=
[
os
.
path
.
join
(
dir
,
hbaseScript
),
action
,
'master'
]
return
runProcess
(
cmd
,
logdir
,
False
,
wait
)
...
...
@@ -376,6 +389,11 @@ def configure_hbase(dir):
hbase_conf_file
=
"hbase-site.xml"
tmpl_file
=
os
.
path
.
join
(
tmpl_dir
,
hbase_conf_file
+
".template"
)
if
IS_WINDOWS
:
url_prefix
=
"file:///"
else
:
url_prefix
=
"file://"
conf_file
=
os
.
path
.
join
(
conf_dir
,
hbase_conf_file
)
if
os
.
path
.
exists
(
tmpl_file
):
...
...
@@ -385,6 +403,7 @@ def configure_hbase(dir):
f
.
close
()
config
=
template
.
replace
(
"${hbase_home}"
,
dir
)
config
=
config
.
replace
(
"${url_prefix}"
,
url_prefix
)
f
=
open
(
conf_file
,
'w'
)
f
.
write
(
config
)
...
...
distro/src/bin/atlas_start.py
View file @
dab9cb7c
...
...
@@ -74,12 +74,6 @@ def main():
#add hbase-site.xml to classpath
hbase_conf_dir
=
mc
.
hbaseConfDir
(
atlas_home
)
if
mc
.
is_hbase_local
(
confdir
):
print
"configured for local hbase."
mc
.
configure_hbase
(
atlas_home
)
mc
.
run_hbase
(
mc
.
hbaseBinDir
(
atlas_home
),
"start"
,
hbase_conf_dir
,
logdir
)
print
"hbase started."
p
=
os
.
pathsep
atlas_classpath
=
confdir
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"atlas"
,
"WEB-INF"
,
"classes"
)
+
p
\
...
...
@@ -111,6 +105,12 @@ def main():
else
:
mc
.
server_pid_not_running
(
pid
)
if
mc
.
is_hbase_local
(
confdir
):
print
"configured for local hbase."
mc
.
configure_hbase
(
atlas_home
)
mc
.
run_hbase_action
(
mc
.
hbaseBinDir
(
atlas_home
),
"start"
,
hbase_conf_dir
,
logdir
)
print
"hbase started."
web_app_path
=
os
.
path
.
join
(
web_app_dir
,
"atlas"
)
if
(
mc
.
isCygwin
()):
web_app_path
=
mc
.
convertCygwinPath
(
web_app_path
)
...
...
distro/src/bin/atlas_stop.py
View file @
dab9cb7c
...
...
@@ -56,7 +56,7 @@ def main():
# stop hbase
if
mc
.
is_hbase_local
(
confdir
):
mc
.
run_hbase
(
mc
.
hbaseBinDir
(
atlas_home
),
"stop"
,
None
,
None
,
True
)
mc
.
run_hbase
_action
(
mc
.
hbaseBinDir
(
atlas_home
),
"stop"
,
None
,
None
,
True
)
if
__name__
==
'__main__'
:
try
:
...
...
distro/src/conf/hbase/hbase-site.xml.template
View file @
dab9cb7c
...
...
@@ -19,7 +19,7 @@
<configuration>
<property>
<name>
hbase.rootdir
</name>
<value>
file://
${hbase_home}/root
</value>
<value>
${url_prefix}
${hbase_home}/root
</value>
</property>
<property>
<name>
hbase.zookeeper.property.dataDir
</name>
...
...
distro/src/test/python/scripts/TestMetadata.py
View file @
dab9cb7c
...
...
@@ -53,6 +53,9 @@ class TestMetadata(unittest.TestCase):
atlas
.
main
()
self
.
assertTrue
(
configure_hbase_mock
.
called
)
if
IS_WINDOWS
:
runProcess_mock
.
assert_called_with
([
'atlas_home
\\
hbase
\\
bin
\\
start-hbase.cmd'
,
'--config'
,
'atlas_home
\\
hbase
\\
conf'
],
'atlas_home
\\
logs'
,
False
,
True
)
else
:
runProcess_mock
.
assert_called_with
([
'atlas_home/hbase/bin/hbase-daemon.sh'
,
'--config'
,
'atlas_home/hbase/conf'
,
'start'
,
'master'
],
'atlas_home/logs'
,
False
,
True
)
self
.
assertTrue
(
java_mock
.
called
)
if
IS_WINDOWS
:
...
...
release-log.txt
View file @
dab9cb7c
...
...
@@ -18,6 +18,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file (dosset
ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via shwethags)
ALL CHANGES:
ATLAS-659 atlas_start fails on Windows (dkantor via shwethags)
ATLAS-732 Dashboard v2 build fails on Windows (vmadugun via yhemanth)
ATLAS-602 Hooks stuck in case of failure (svimal2106 via shwethags)
ATLAS-631 Introduce Versioning to Atlas Notification Payload (tbeerbower via shwethags)
...
...
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