LoggingResearch created HADOOP-19265:
----------------------------------------

             Summary: Enhance Logging for Localized Trash Configuration in 
moveToAppropriateTrash Method
                 Key: HADOOP-19265
                 URL: https://issues.apache.org/jira/browse/HADOOP-19265
             Project: Hadoop Common
          Issue Type: Improvement
          Components: common
    Affects Versions: 3.3.6
         Environment: Hadoop Version: 3.3.6
Location: 
{{{}`hadoop/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Trash.java`{}}},
 in {{`moveToAppropriateTrash`}} method. Lines 114-118.
            Reporter: LoggingResearch
         Attachments: TestViewFsTrash.java, original-vs-log-enhanced.md

The {{moveToAppropriateTrash}} method in {{Trash.java}} handles file deletion 
by moving files to the appropriate trash directory based on the configuration. 
However, the current implementation lacks logging to indicate whether the 
localized trash feature is enabled or not. This enhancement proposal introduces 
logging to provide better visibility into the decision-making process when 
moving files to the trash, particularly in environments where the 
ViewFileSystem is used.
 
*Expected Behavior:* 
When {{CONFIG_VIEWFS_TRASH_FORCE_INSIDE_MOUNT_POINT}} is enabled, the system 
should log that the localized trash feature is enabled and that the {{Trash}} 
is being initialized with a {{ViewFileSystem}} object. Conversely, if the 
feature is disabled, the system should log that it is using a fully resolved 
{{FileSystem}} object.
 
*How-to-Fix:*
This logging enhancement adds informative messages to indicate whether the 
localized trash feature is enabled or not, thus providing more transparency 
during the file deletion process. The test cases verify the functionality under 
different configurations.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to