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


Ship it!




Ship It!

- Alejandro Fernandez


On March 17, 2016, 4:03 p.m., Andrew Onischuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44962/
> -----------------------------------------------------------
> 
> (Updated March 17, 2016, 4:03 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Dmytro Sen.
> 
> 
> Bugs: AMBARI-15468
>     https://issues.apache.org/jira/browse/AMBARI-15468
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> **Case 1**:
>     
>     
>     [root@c6403 ~]# mount
>     /dev/mapper/VolGroup-lv_root on / type ext4 (rw)
>     /newFs on /newHdfsDir type ext3 (rw,loop=/dev/loop1)
>     
>     [root@c6403 ~]# python
>     >>> from resource_management import *
>     >>> from resource_management.libraries.functions import file_system
>     >>> with Environment() as env:
>     ...   print file_system.get_mount_point_for_dir('/newHdfsDir/some_dir')
>     ...   print file_system.get_mount_point_for_dir('/newHdfsDir')
>     ... 
>     2016-03-17 13:00:33,640 - Mount point for directory /newHdfsDir/some_dir 
> is /
>     2016-03-17 13:00:33,640 - Mount point for directory /newHdfsDir is /
>     
> 
> It should be /newHdfsDir, not /
> 
> **Reason**   
> /newHdfsDir and / have the same count of os separators.
> 
> **Case 2**:
>     
>     
>     [root@c6403 ~]# mount
>     /dev/mapper/VolGroup-lv_root on / type ext4 (rw)
>     /newFs on /a/a type ext3 (rw,loop=/dev/loop2)
>     /newFs on /a/a1 type ext3 (rw,loop=/dev/loop3)
>     
>     [root@c6403 ~]# python
>     >>> from resource_management import *
>     >>> from resource_management.libraries.functions import file_system
>     >>> with Environment() as env:
>     >>> from resource_management import *
>     >>> from resource_management.libraries.functions import file_system
>     >>> with Environment() as env:
>     ...   print file_system.get_mount_point_for_dir('/a/a1/some_dir')
>     ...   print file_system.get_mount_point_for_dir('/a/a1')
>     ...
>     2016-03-17 13:07:38,899 - Mount point for directory /a/a1/some_dir is /a/a
>     2016-03-17 13:07:38,900 - Mount point for directory /a/a1 is /a/a
>     
> 
> It should be /a/a1, not /a/a
> 
> 
> Diffs
> -----
> 
>   ambari-agent/src/test/python/resource_management/TestFileSystem.py 4e0eb63 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/file_system.py
>  39b86dd 
>   ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py 
> 6132c2c 
> 
> Diff: https://reviews.apache.org/r/44962/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Andrew Onischuk
> 
>

Reply via email to