atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suma Shivaprasad (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ATLAS-20) Rename env variables from METADATA to ATLAS
Date Sat, 12 Dec 2015 07:30:46 GMT

    [ https://issues.apache.org/jira/browse/ATLAS-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15054107#comment-15054107
] 

Suma Shivaprasad commented on ATLAS-20:
---------------------------------------

[~rishabhbhardwaj] Can you pls merge and reattach the patch

{noformat}
12:59:17-sshivaprasad~/workspace2/master-commit (master)$ curl -k -o ATLAS-20.patch https://issues.apache.org/jira/secure/attachment/12775494/ATLAS-20.patch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 26146  100 26146    0     0   6590      0  0:00:03  0:00:03 --:--:--  6589
12:59:30-sshivaprasad~/workspace2/master-commit (master)$ git apply -v ATLAS-20.patch
Checking patch addons/hive-bridge/src/bin/import-hive.sh...
Checking patch distro/src/bin/atlas_config.py...
Checking patch distro/src/bin/atlas_start.py...
error: while searching for:

import atlas_config as mc

METADATA_LOG_OPTS="-Datlas.log.dir=%s -Datlas.log.file=application.log"
METADATA_COMMAND_OPTS="-Datlas.home=%s"
METADATA_CONFIG_OPTS="-Datlas.conf=%s"
DEFAULT_JVM_OPTS="-Xmx1024m -XX:MaxPermSize=512m -Dlog4j.configuration=atlas-log4j.xml"
CONF_FILE="application.properties"
HBASE_STORAGE_CONF_ENTRY="atlas.graph.storage.backend\s*=\s*hbase"

def main():

    metadata_home = mc.metadataDir()
    confdir = mc.dirMustExist(mc.confDir(metadata_home))
    mc.executeEnvSh(confdir)
    logdir = mc.dirMustExist(mc.logDir(metadata_home))

    #create sys property for conf dirs
    jvm_opts_list = (METADATA_LOG_OPTS % logdir).split()

    cmd_opts = (METADATA_COMMAND_OPTS % metadata_home)
    jvm_opts_list.extend(cmd_opts.split())

    config_opts = (METADATA_CONFIG_OPTS % confdir)
    jvm_opts_list.extend(config_opts.split())

    default_jvm_opts = DEFAULT_JVM_OPTS
    metadata_jvm_opts = os.environ.get(mc.METADATA_OPTS, default_jvm_opts)
    jvm_opts_list.extend(metadata_jvm_opts.split())

    #expand web app dir
    web_app_dir = mc.webAppDir(metadata_home)
    mc.expandWebApp(metadata_home)

    #add hbase-site.xml to classpath
    hbase_conf_dir = mc.hbaseConfDir(confdir)

    p = os.pathsep
    metadata_classpath = confdir + 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", "*")
    if os.path.exists(hbase_conf_dir):
        metadata_classpath = metadata_classpath + p \
                            + hbase_conf_dir
    else:
       storage_backend = mc.grep(os.path.join(confdir, CONF_FILE), HBASE_STORAGE_CONF_ENTRY)
       if storage_backend != None:
	   raise Exception("Could not find hbase-site.xml in %s. Please set env var HBASE_CONF_DIR
to the hbase client conf dir", hbase_conf_dir)

    metadata_pid_file = mc.pidFile(metadata_home)


    if os.path.isfile(metadata_pid_file):
       #Check if process listed in atlas.pid file is still running
       pf = file(metadata_pid_file, 'r')
       pid = pf.read().strip()
       pf.close()


error: patch failed: distro/src/bin/atlas_start.py:21
error: distro/src/bin/atlas_start.py: patch does not apply
Checking patch distro/src/bin/atlas_stop.py...
Checking patch distro/src/bin/cputil.py...
Checking patch distro/src/bin/quick_start.py...
Checking patch distro/src/conf/atlas-env.sh...
Checking patch distro/src/test/python/scripts/TestMetadata.py...
error: while searching for:
  @patch.object(mc,"unix_exist_pid")
  @patch.object(mc,"writePid")
  @patch.object(mc, "executeEnvSh")
  @patch.object(mc,"metadataDir")
  @patch.object(mc, "expandWebApp")
  @patch("os.path.exists")
  @patch.object(mc, "java")

  def test_main(self, java_mock, exists_mock, expandWebApp_mock, metadataDir_mock, executeEnvSh_mock,
writePid_mock, unix_exist_pid_mock, win_exist_pid_mock):
    sys.argv = []
    exists_mock.return_value = True
    expandWebApp_mock.return_value = "webapp"
    metadataDir_mock.return_value = "metadata_home"

    win_exist_pid_mock("789")
    win_exist_pid_mock.assert_called_with((str)(789))
    unix_exist_pid_mock(789)
    unix_exist_pid_mock.assert_called_with(789)
    metadata.main()
    self.assertTrue(java_mock.called)
    if IS_WINDOWS:

      java_mock.assert_called_with(
        'org.apache.atlas.Atlas',
        ['-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\\*;metadata_home\\hbase\\conf',
        ['-Datlas.log.dir=metadata_home\\logs', '-Datlas.log.file=application.log', '-Datlas.home=metadata_home',
'-Datlas.conf=metadata_home\\conf', '-Xmx1024m', '-XX:MaxPermSize=512m', '-Dlog4j.configuration=atlas-log4j.xml'],
'metadata_home\\logs')




error: patch failed: distro/src/test/python/scripts/TestMetadata.py:34
error: distro/src/test/python/scripts/TestMetadata.py: patch does not apply
Checking patch docs/src/site/twiki/InstallationSteps.twiki...
Checking patch webapp/src/main/java/org/apache/atlas/web/listeners/LoginProcessor.java...
{noformat}

> Rename env variables from METADATA to ATLAS
> -------------------------------------------
>
>                 Key: ATLAS-20
>                 URL: https://issues.apache.org/jira/browse/ATLAS-20
>             Project: Atlas
>          Issue Type: Improvement
>    Affects Versions: 0.5-incubating
>            Reporter: Venkatesh Seetharam
>            Assignee: Rishabh Bhardwaj
>         Attachments: ATLAS-20.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message