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
28d8ab4b
Commit
28d8ab4b
authored
May 26, 2015
by
arpitgupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG-37749: metadata start/stop scripts ask for JAVA_HOME even when java is path
parent
ef9a07ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
metadata_config.py
src/bin/metadata_config.py
+6
-4
metadata_start.py
src/bin/metadata_start.py
+2
-0
metadata_stop.py
src/bin/metadata_stop.py
+2
-0
No files found.
src/bin/metadata_config.py
View file @
28d8ab4b
...
...
@@ -110,8 +110,9 @@ def executeEnvSh(confDir):
proc
.
communicate
()
def
java
(
classname
,
args
,
classpath
,
jvm_opts_list
,
logdir
=
None
):
if
os
.
environ
.
get
(
"JAVA_HOME"
)
is
not
None
and
os
.
environ
[
"JAVA_HOME"
]:
prg
=
os
.
path
.
join
(
os
.
environ
[
"JAVA_HOME"
],
"bin"
,
"java"
)
java_home
=
os
.
environ
.
get
(
"JAVA_HOME"
,
None
)
if
java_home
:
prg
=
os
.
path
.
join
(
java_home
,
"bin"
,
"java"
)
else
:
prg
=
which
(
"java"
)
...
...
@@ -124,8 +125,9 @@ def java(classname, args, classpath, jvm_opts_list, logdir=None):
return
runProcess
(
commandline
,
logdir
)
def
jar
(
path
):
if
os
.
environ
[
"JAVA_HOME"
]
is
not
None
and
os
.
environ
[
"JAVA_HOME"
]:
prg
=
os
.
path
.
join
(
os
.
environ
[
"JAVA_HOME"
],
"bin"
,
"jar"
)
java_home
=
os
.
environ
.
get
(
"JAVA_HOME"
,
None
)
if
java_home
:
prg
=
os
.
path
.
join
(
java_home
,
"bin"
,
"jar"
)
else
:
prg
=
which
(
"jar"
)
...
...
src/bin/metadata_start.py
View file @
28d8ab4b
...
...
@@ -17,6 +17,7 @@
# limitations under the License.
import
os
import
sys
import
traceback
import
metadata_config
as
mc
...
...
@@ -74,6 +75,7 @@ if __name__ == '__main__':
returncode
=
main
()
except
Exception
as
e
:
print
"Exception:
%
s "
%
str
(
e
)
print
traceback
.
format_exc
()
returncode
=
-
1
sys
.
exit
(
returncode
)
src/bin/metadata_stop.py
View file @
28d8ab4b
...
...
@@ -18,6 +18,7 @@
import
os
from
signal
import
SIGTERM
import
sys
import
traceback
import
metadata_config
as
mc
...
...
@@ -52,6 +53,7 @@ if __name__ == '__main__':
returncode
=
main
()
except
Exception
as
e
:
print
"Exception:
%
s "
%
str
(
e
)
print
traceback
.
format_exc
()
returncode
=
-
1
sys
.
exit
(
returncode
)
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