You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by GitBox <gi...@apache.org> on 2022/09/17 00:31:42 UTC

[GitHub] [ambari] timyuer commented on pull request #3365: AMBARI-25731: HdfsResource didn't chown again when reupload local file in resource_management

timyuer commented on PR #3365:
URL: https://github.com/apache/ambari/pull/3365#issuecomment-1249959009

   Refer to https://github.com/apache/bigtop/pull/1000#issuecomment-1248846681.
   
   In this scenario, when I use HdfsResource upload a file, the logic is:
   1. Obtain the file status: owner=ambari-qa
   2. If the files are inconsistent, upload the file again. In this case, the file permission is owner= HDFS
   3. Grant permissions. The assigned permissions are consistent with the file status permissions, and file permissions are not updated
   
   Because the file status first obtained was outdated, then `_set_owner` function will not take effect. This is not reasonable.
   
   And the updated logic is:
   1. Obtain the file status: owner=ambari-qa
   2. If the files are inconsistent, upload the file again. In this case, the file permission is owner= HDFS
   3. Obtain the file status again, and the file permission is owner= HDFS
   4. Assign permissions. If the assigned permissions are inconsistent with the file status permissions, update the file permissions
   
   Of course, this may be redundant when creating the file for the first ti.me, but it requires refactoring the code that created the file.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ambari.apache.org
For additional commands, e-mail: dev-help@ambari.apache.org