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
b286488c
Commit
b286488c
authored
Jun 08, 2015
by
Venkatesh Seetharam
Browse files
Options
Browse Files
Download
Plain Diff
Fix broken python tests as a result of refactoring to atlas
parents
4ad5c42d
1a7dba9f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
21 deletions
+70
-21
import-hive.sh
addons/hive-bridge/src/bin/import-hive.sh
+2
-2
atlas_config.py
src/bin/atlas_config.py
+3
-3
atlas_start.py
src/bin/atlas_start.py
+4
-4
cputil.py
src/bin/cputil.py
+2
-2
quick_start.py
src/bin/quick_start.py
+3
-3
atlas-env.sh
src/conf/atlas-env.sh
+49
-0
TestMetadata.py
src/test/python/scripts/TestMetadata.py
+7
-7
No files found.
addons/hive-bridge/src/bin/import-hive.sh
View file @
b286488c
...
...
@@ -34,8 +34,8 @@ if [ -z "$METADATA_CONF" ]; then
fi
export
METADATA_CONF
if
[
-f
"
${
METADATA_CONF
}
/
metadata
-env.sh"
]
;
then
.
"
${
METADATA_CONF
}
/
metadata
-env.sh"
if
[
-f
"
${
METADATA_CONF
}
/
atlas
-env.sh"
]
;
then
.
"
${
METADATA_CONF
}
/
atlas
-env.sh"
fi
if
test
-z
${
JAVA_HOME
}
...
...
src/bin/atlas_config.py
View file @
b286488c
...
...
@@ -65,7 +65,7 @@ def logDir(dir):
def
pidFile
(
dir
):
localPid
=
os
.
path
.
join
(
dir
,
LOG
)
return
os
.
path
.
join
(
os
.
environ
.
get
(
METADATA_PID
,
localPid
),
'
metadata
.pid'
)
return
os
.
path
.
join
(
os
.
environ
.
get
(
METADATA_PID
,
localPid
),
'
atlas
.pid'
)
def
dataDir
(
dir
):
data
=
os
.
path
.
join
(
dir
,
DATA
)
...
...
@@ -77,7 +77,7 @@ def webAppDir(dir):
def
expandWebApp
(
dir
):
webappDir
=
webAppDir
(
dir
)
webAppMetadataDir
=
os
.
path
.
join
(
webappDir
,
"
metadata
"
)
webAppMetadataDir
=
os
.
path
.
join
(
webappDir
,
"
atlas
"
)
d
=
os
.
sep
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
webAppMetadataDir
,
"WEB-INF"
)):
try
:
...
...
@@ -95,7 +95,7 @@ def dirMustExist(dirname):
return
dirname
def
executeEnvSh
(
confDir
):
envscript
=
'
%
s/
metadata
-env.sh'
%
confDir
envscript
=
'
%
s/
atlas
-env.sh'
%
confDir
if
not
IS_WINDOWS
and
os
.
path
.
exists
(
envscript
):
envCmd
=
'source
%
s && env'
%
envscript
command
=
[
'bash'
,
'-c'
,
envCmd
]
...
...
src/bin/atlas_start.py
View file @
b286488c
...
...
@@ -21,7 +21,7 @@ import traceback
import
atlas_config
as
mc
METADATA_LOG_OPTS
=
"-D
metadata.log.dir=
%
s -Dmetadata
.log.file=application.log"
METADATA_LOG_OPTS
=
"-D
atlas.log.dir=
%
s -Datlas
.log.file=application.log"
METADATA_COMMAND_OPTS
=
"-Dmetadata.home=
%
s"
METADATA_CONFIG_OPTS
=
"-Dmetadata.conf=
%
s"
DEFAULT_JVM_OPTS
=
"-Xmx1024m"
...
...
@@ -52,8 +52,8 @@ def main():
p
=
os
.
pathsep
metadata_classpath
=
confdir
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"
metadata
"
,
"WEB-INF"
,
"classes"
)
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"
metadata
"
,
"WEB-INF"
,
"lib"
,
"*"
)
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"
atlas
"
,
"WEB-INF"
,
"classes"
)
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"
atlas
"
,
"WEB-INF"
,
"lib"
,
"*"
)
+
p
\
+
os
.
path
.
join
(
metadata_home
,
"libext"
,
"*"
)
metadata_pid_file
=
mc
.
pidFile
(
metadata_home
)
...
...
@@ -62,7 +62,7 @@ def main():
print
"
%
s already exists, exiting"
%
metadata_pid_file
sys
.
exit
()
args
=
[
"-app"
,
os
.
path
.
join
(
web_app_dir
,
"
metadata
"
)]
args
=
[
"-app"
,
os
.
path
.
join
(
web_app_dir
,
"
atlas
"
)]
args
.
extend
(
sys
.
argv
[
1
:])
process
=
mc
.
java
(
"org.apache.atlas.Main"
,
args
,
metadata_classpath
,
jvm_opts_list
,
logdir
)
...
...
src/bin/cputil.py
View file @
b286488c
...
...
@@ -41,8 +41,8 @@ def main():
p
=
os
.
pathsep
metadata_classpath
=
confdir
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"
metadata
"
,
"WEB-INF"
,
"classes"
)
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"
metadata
"
,
"WEB-INF"
,
"lib"
,
"*"
)
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"
atlas
"
,
"WEB-INF"
,
"classes"
)
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"
atlas
"
,
"WEB-INF"
,
"lib"
,
"*"
)
+
p
\
+
os
.
path
.
join
(
metadata_home
,
"libext"
,
"*"
)
process
=
mc
.
java
(
"org.apache.atlas.util.CredentialProviderUtility"
,
sys
.
argv
[
1
:],
metadata_classpath
,
jvm_opts_list
)
...
...
src/bin/quick_start.py
View file @
b286488c
...
...
@@ -20,7 +20,7 @@ import sys
import
atlas_config
as
mc
METADATA_LOG_OPTS
=
"-D
metadata
.log.dir=
%
s"
METADATA_LOG_OPTS
=
"-D
atlas
.log.dir=
%
s"
METADATA_COMMAND_OPTS
=
"-Dmetadata.home=
%
s"
DEFAULT_JVM_OPTS
=
"-Xmx1024m"
...
...
@@ -47,8 +47,8 @@ def main():
p
=
os
.
pathsep
metadata_classpath
=
confdir
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"
metadata
"
,
"WEB-INF"
,
"classes"
)
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"
metadata
"
,
"WEB-INF"
,
"lib"
,
"*"
)
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"
atlas
"
,
"WEB-INF"
,
"classes"
)
+
p
\
+
os
.
path
.
join
(
web_app_dir
,
"
atlas
"
,
"WEB-INF"
,
"lib"
,
"*"
)
+
p
\
+
os
.
path
.
join
(
metadata_home
,
"libext"
,
"*"
)
process
=
mc
.
java
(
"org.apache.atlas.examples.QuickStart"
,
sys
.
argv
[
1
:],
metadata_classpath
,
jvm_opts_list
)
...
...
src/conf/atlas-env.sh
0 → 100644
View file @
b286488c
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# The java implementation to use. If JAVA_HOME is not found we expect java and jar to be in path
#export JAVA_HOME=
# any additional java opts you want to set. This will apply to both client and server operations
#export METADATA_OPTS=
# any additional java opts that you want to set for client only
#export METADATA_CLIENT_OPTS=
# java heap size we want to set for the client. Default is 1024MB
#export METADATA_CLIENT_HEAP=
# any additional opts you want to set for falcon service.
#export METADATA_SERVER_OPTS=
# java heap size we want to set for the falcon server. Default is 1024MB
#export METADATA_SERVER_HEAP=
# What is is considered as falcon home dir. Default is the base locaion of the installed software
#export METADATA_HOME_DIR=
# Where log files are stored. Defatult is logs directory under the base install location
#export METADATA_LOG_DIR=
# Where pid files are stored. Defatult is logs directory under the base install location
#export METADATA_PID_DIR=
# where the falcon active mq data is stored. Defatult is logs/data directory under the base install location
#export METADATA_DATA_DIR=
# Where do you want to expand the war file. By Default it is in /server/webapp dir under the base install dir.
#export METADATA_EXPANDED_WEBAPP_DIR=
src/test/python/scripts/TestMetadata.py
View file @
b286488c
...
...
@@ -23,7 +23,7 @@ from mock import patch
import
unittest
import
logging
import
atlas_config
as
mc
import
metadata
_start
as
metadata
import
atlas
_start
as
metadata
import
platform
IS_WINDOWS
=
platform
.
system
()
==
"Windows"
...
...
@@ -48,15 +48,15 @@ class TestMetadata(unittest.TestCase):
if
IS_WINDOWS
:
java_mock
.
assert_called_with
(
'org.apache.atlas.Main'
,
[
'-app'
,
'metadata_home/server/webapp/
metadata
'
],
'metadata_home/conf:metadata_home/server/webapp/
metadata/WEB-INF/classes:metadata_home/server/webapp/metadata
/WEB-INF/lib
\\
*:metadata_home/libext
\\
*'
,
[
'-D
metadata.log.dir=metadata_home/logs'
,
'-Dmetadata
.log.file=application.log'
,
'-Dmetadata.home=metadata_home'
,
'-Dmetadata.conf=metadata_home/conf'
,
'-Xmx1024m'
],
'metadata_home/logs'
)
[
'-app'
,
'metadata_home/server/webapp/
atlas
'
],
'metadata_home/conf:metadata_home/server/webapp/
atlas/WEB-INF/classes:metadata_home/server/webapp/atlas
/WEB-INF/lib
\\
*:metadata_home/libext
\\
*'
,
[
'-D
atlas.log.dir=metadata_home/logs'
,
'-Datlas
.log.file=application.log'
,
'-Dmetadata.home=metadata_home'
,
'-Dmetadata.conf=metadata_home/conf'
,
'-Xmx1024m'
],
'metadata_home/logs'
)
else
:
java_mock
.
assert_called_with
(
'org.apache.atlas.Main'
,
[
'-app'
,
'metadata_home/server/webapp/
metadata
'
],
'metadata_home/conf:metadata_home/server/webapp/
metadata/WEB-INF/classes:metadata_home/server/webapp/metadata
/WEB-INF/lib/*:metadata_home/libext/*'
,
[
'-D
metadata.log.dir=metadata_home/logs'
,
'-Dmetadata
.log.file=application.log'
,
'-Dmetadata.home=metadata_home'
,
'-Dmetadata.conf=metadata_home/conf'
,
'-Xmx1024m'
],
'metadata_home/logs'
)
[
'-app'
,
'metadata_home/server/webapp/
atlas
'
],
'metadata_home/conf:metadata_home/server/webapp/
atlas/WEB-INF/classes:metadata_home/server/webapp/atlas
/WEB-INF/lib/*:metadata_home/libext/*'
,
[
'-D
atlas.log.dir=metadata_home/logs'
,
'-Datlas
.log.file=application.log'
,
'-Dmetadata.home=metadata_home'
,
'-Dmetadata.conf=metadata_home/conf'
,
'-Xmx1024m'
],
'metadata_home/logs'
)
pass
...
...
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