You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by yao lei <le...@163.com> on 2016/01/10 08:12:10 UTC

Re: Review Request 42021: Enhance the function of HdfsResource to copy local matching wildcard files to hdfs

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42021/
-----------------------------------------------------------

(Updated 一月 10, 2016, 7:12 a.m.)


Review request for Ambari.


Summary (updated)
-----------------

Enhance the function of HdfsResource to copy local matching wildcard files to hdfs


Bugs: AMBARI-14536
    https://issues.apache.org/jira/browse/AMBARI-14536


Repository: ambari


Description (updated)
-------

In some cases,we need to copy local matching wildcard files to hdfs.
eg. we'd like to copy /usr/lib/spark*.jar to hdfs by following codes in Python:
params.HdfsResource(hdfs_path,
type="file",
action="create_on_execute",
source="/usr/lib/spark*.jar",
group=params.user_group,
owner=params.pdm_user,
mode=0755
)
params.HdfsResource(None, action="execute")


Diffs
-----

  ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py 731bce7 

Diff: https://reviews.apache.org/r/42021/diff/


Testing
-------


Thanks,

yao lei


Re: Review Request 42021: Enhance the function of HdfsResource to copy local matching wildcard files to hdfs

Posted by Matt <mi...@gmail.com>.

> On Jan. 10, 2016, 9:04 p.m., Matt wrote:
> > ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py, line 278
> > <https://reviews.apache.org/r/42021/diff/2/?file=1190078#file1190078line278>
> >
> >     Is this line aligned correctly for the preceeding **if** block? Or is the browser rendering it wrong?
> 
> yao lei wrote:
>     Thanks,Matt.
>     As is shown in https://issues.apache.org/jira/secure/attachment/12781408/AMBARI-14536.patch, it is correct.

Please add aonishuk to the review. aonishuk would have good context regarding HdfsResource.


- Matt


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42021/#review113675
-----------------------------------------------------------


On Jan. 9, 2016, 11:12 p.m., yao lei wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42021/
> -----------------------------------------------------------
> 
> (Updated Jan. 9, 2016, 11:12 p.m.)
> 
> 
> Review request for Ambari.
> 
> 
> Bugs: AMBARI-14536
>     https://issues.apache.org/jira/browse/AMBARI-14536
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In some cases,we need to copy local matching wildcard files to hdfs.
> eg. we'd like to copy /usr/lib/spark*.jar to hdfs by following codes in Python:
> params.HdfsResource(hdfs_path,
> type="file",
> action="create_on_execute",
> source="/usr/lib/spark*.jar",
> group=params.user_group,
> owner=params.pdm_user,
> mode=0755
> )
> params.HdfsResource(None, action="execute")
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py 731bce7 
> 
> Diff: https://reviews.apache.org/r/42021/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> yao lei
> 
>


Re: Review Request 42021: Enhance the function of HdfsResource to copy local matching wildcard files to hdfs

Posted by yao lei <le...@163.com>.

> On 一月 11, 2016, 5:04 a.m., Matt wrote:
> > ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py, line 278
> > <https://reviews.apache.org/r/42021/diff/2/?file=1190078#file1190078line278>
> >
> >     Is this line aligned correctly for the preceeding **if** block? Or is the browser rendering it wrong?

Thanks,Matt.
As is shown in https://issues.apache.org/jira/secure/attachment/12781408/AMBARI-14536.patch, it is correct.


- yao


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42021/#review113675
-----------------------------------------------------------


On 一月 10, 2016, 7:12 a.m., yao lei wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42021/
> -----------------------------------------------------------
> 
> (Updated 一月 10, 2016, 7:12 a.m.)
> 
> 
> Review request for Ambari.
> 
> 
> Bugs: AMBARI-14536
>     https://issues.apache.org/jira/browse/AMBARI-14536
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In some cases,we need to copy local matching wildcard files to hdfs.
> eg. we'd like to copy /usr/lib/spark*.jar to hdfs by following codes in Python:
> params.HdfsResource(hdfs_path,
> type="file",
> action="create_on_execute",
> source="/usr/lib/spark*.jar",
> group=params.user_group,
> owner=params.pdm_user,
> mode=0755
> )
> params.HdfsResource(None, action="execute")
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py 731bce7 
> 
> Diff: https://reviews.apache.org/r/42021/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> yao lei
> 
>


Re: Review Request 42021: Enhance the function of HdfsResource to copy local matching wildcard files to hdfs

Posted by Matt <mi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42021/#review113675
-----------------------------------------------------------



ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py (line 278)
<https://reviews.apache.org/r/42021/#comment174430>

    Is this line aligned correctly for the preceeding **if** block? Or is the browser rendering it wrong?


- Matt


On Jan. 9, 2016, 11:12 p.m., yao lei wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42021/
> -----------------------------------------------------------
> 
> (Updated Jan. 9, 2016, 11:12 p.m.)
> 
> 
> Review request for Ambari.
> 
> 
> Bugs: AMBARI-14536
>     https://issues.apache.org/jira/browse/AMBARI-14536
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In some cases,we need to copy local matching wildcard files to hdfs.
> eg. we'd like to copy /usr/lib/spark*.jar to hdfs by following codes in Python:
> params.HdfsResource(hdfs_path,
> type="file",
> action="create_on_execute",
> source="/usr/lib/spark*.jar",
> group=params.user_group,
> owner=params.pdm_user,
> mode=0755
> )
> params.HdfsResource(None, action="execute")
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py 731bce7 
> 
> Diff: https://reviews.apache.org/r/42021/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> yao lei
> 
>