You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by ph...@free.fr on 2023/02/15 09:11:56 UTC

Monitoring HDFS filesystem changes

Hello,
is there an efficient way to monitoring the HDFS Filesystem for owner-right changes?
For instance, let's say the /a/b/c/d HDFS Directory's owner is called user1.
However, overnight, the owner changed for some unknown reason.
How can I monitor the /a/b/c/d directory and determine what caused the owner to change?
Many thanks.
Best regards,
Philippe


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org
For additional commands, e-mail: user-help@hadoop.apache.org


Re: Monitoring HDFS filesystem changes

Posted by Ayush Saxena <ay...@gmail.com>.
Hey,
The best I know you can check in the HDFS Audit logs. Just copying a sample
entry,

2023-02-15 14:47:30,679 [IPC Server handler 1 on default port 59514] INFO
 FSNamesystem.audit (FSNamesystem.java:logAuditMessage(8852)) -
allowed=true ugi=ayushsaxena (auth:SIMPLE) ip=localhost/127.0.0.1
cmd=setOwner src=/test dst=null perm=Ayush:Hadoop:rwxr-xr-x proto=rpc

This is what you can get from there
-Ayush

On Wed, 15 Feb 2023 at 14:42, <ph...@free.fr> wrote:

> Hello,
> is there an efficient way to monitoring the HDFS Filesystem for
> owner-right changes?
> For instance, let's say the /a/b/c/d HDFS Directory's owner is called
> user1.
> However, overnight, the owner changed for some unknown reason.
> How can I monitor the /a/b/c/d directory and determine what caused the
> owner to change?
> Many thanks.
> Best regards,
> Philippe
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org
> For additional commands, e-mail: user-help@hadoop.apache.org
>
>

Re: Monitoring HDFS filesystem changes

Posted by ph...@free.fr.
Many thanks, Wei-Chiu.

----- Mail original -----
De: "Wei-Chiu Chuang" <we...@cloudera.com>
À: phiroc@free.fr
Cc: user@hadoop.apache.org
Envoyé: Mercredi 15 Février 2023 16:50:44
Objet: Re: Monitoring HDFS filesystem changes


Use the inotify api 


https://dev-listener.medium.com/watch-for-changes-in-hdfs-800c6fb5481f 

https://github.com/onefoursix/hdfs-inotify-example/blob/master/src/main/java/com/onefoursix/HdfsINotifyExample.java 





On Wed, Feb 15, 2023 at 1:12 AM < phiroc@free.fr > wrote: 


Hello, 
is there an efficient way to monitoring the HDFS Filesystem for owner-right changes? 
For instance, let's say the /a/b/c/d HDFS Directory's owner is called user1. 
However, overnight, the owner changed for some unknown reason. 
How can I monitor the /a/b/c/d directory and determine what caused the owner to change? 
Many thanks. 
Best regards, 
Philippe 


--------------------------------------------------------------------- 
To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org 
For additional commands, e-mail: user-help@hadoop.apache.org 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org
For additional commands, e-mail: user-help@hadoop.apache.org


Re: Monitoring HDFS filesystem changes

Posted by Wei-Chiu Chuang <we...@cloudera.com.INVALID>.
Use the inotify api

https://dev-listener.medium.com/watch-for-changes-in-hdfs-800c6fb5481f
https://github.com/onefoursix/hdfs-inotify-example/blob/master/src/main/java/com/onefoursix/HdfsINotifyExample.java


On Wed, Feb 15, 2023 at 1:12 AM <ph...@free.fr> wrote:

> Hello,
> is there an efficient way to monitoring the HDFS Filesystem for
> owner-right changes?
> For instance, let's say the /a/b/c/d HDFS Directory's owner is called
> user1.
> However, overnight, the owner changed for some unknown reason.
> How can I monitor the /a/b/c/d directory and determine what caused the
> owner to change?
> Many thanks.
> Best regards,
> Philippe
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@hadoop.apache.org
> For additional commands, e-mail: user-help@hadoop.apache.org
>
>