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

Steve Loughran edited comment on SLIDER-540 at 10/20/14 11:46 AM:
------------------------------------------------------------------

test runs now pick up the property {{HADOOP_CONF_DIR}} from 
{{slider-client.xml}}

If set
# the JUnit test runner reads in the standard core. hdfs and yarn site XML files
# the value is set to the environment variable {{HADOOP_CONF_DIR}}  before 
running {{bin/slider}}

{code}
      <property>
        <name>HADOOP_CONF_DIR</name>
        <value>/home/tester/sites/production/hadoop-conf</value>
      </property>
{code}
For ease of setting this up:

all env variables are loaded into the config; {{env.HADOOP_CONF_DIR}} would 
then refer to the current environment variable
{code}
      <property>
        <name>HADOOP_CONF_DIR</name>
        <value>${env.HADOOP_CONF_DIR}</value>
      </property>
{code}

a path can be set relative to the property {{SLIDER_CONF_DIR}}

{code}
      <property>
        <name>HADOOP_CONF_DIR</name>
        <value>${SLIDER_CONF_DIR}/../hadoop-conf</value>
      </property>
{code}

Note that here {{SLIDER_CONF_DIR}} is not any local environment variable —it is 
the parent directory of the {{slider-client.xml}} file used for the test run 
(i.e. the value which _becomes_ the env variable {{SLIDER_CONF_DIR}} when the 
slider script is invoked.


was (Author: [email protected]):
test runs now pick up the property {{HADOOP_CONF_DIR}} from 
{{slider-client.xml}}

If set
# the JUnit test runner reads in the standard core. hdfs and yarn site XML files
# the value is set to the environment variable {{HADOOP_CONF_DIR}}  before 
running {{bin/slider}}

{code}
      <property>
        <name>HADOOP_CONF_DIR</name>
        <value>/home/tester/sites/production/hadoop-conf</value>
      </property>
{code}
For ease of setting this up:

all env variables are loaded into the config; {{env.HADOOP_CONF_DIR}} would 
then refer to the current environment variable
{code}
      <property>
        <name>HADOOP_CONF_DIR</name>
        <value>${env.HADOOP_CONF_DIR}</value>
      </property>
{code}

a path can be set relative to the property {{ ${SLIDER_CONF_DIR} }}
 {code}
      <property>
        <name>HADOOP_CONF_DIR</name>
        <value>${SLIDER_CONF_DIR}/../hadoop-conf</value>
      </property>
{code}
Note that here {{ ${SLIDER_CONF_DIR} }} is not any local environment variable 
—it is the parent directory of the {{slider-client.xml}} file used for the test 
run (i.e. the value which _becomes_ {{SLIDER_CONF_DIR}} when the slider script 
is invoked.

> Command Test Base to set up HADOOP_CONF_DIR
> -------------------------------------------
>
>                 Key: SLIDER-540
>                 URL: https://issues.apache.org/jira/browse/SLIDER-540
>             Project: Slider
>          Issue Type: Sub-task
>          Components: client, test
>    Affects Versions: Slider 0.60
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> For functional testing where the cluster configuration is stored in 
> hadoop-site.xml, the test runner needs to get the {{HADOOP_CONF_DIR}} for the 
> target cluster onto the classpath of slider.sh/.py
> This is *not* the local hadoop conf dir, except in the special case that the 
> local cluster is the target test cluster.
> Instead it needs to be a conf dir specific to the target system, which can be 
> referred to from the test suites {{slider-client.xml}}. Relative paths will 
> (somehow) need to be supported, to make SCM hosting of slider & cluster conf 
> dirs side by side easy to share



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

Reply via email to