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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to