private static void inheritOwnerAndGroupIfEmpty ( MutableInode < ? > newInode , InodeDirectoryView ancestorInode ) { if ( ServerConfiguration . getBoolean ( PropertyKey . MASTER_METASTORE_INODE_INHERIT_OWNER_AND_GROUP ) && newInode . getOwner ( ) . isEmpty ( ) && newInode . getGroup ( ) . isEmpty ( ) ) { // Inherit owner / group if empty newInode . setOwner ( ancestorInode . getOwner ( ) ) ; newInode . setGroup ( ancestorInode . getGroup ( ) ) ; } }
Inherit owner and group from ancestor if both are empty