File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,31 @@ sub _dfs_mkdir {
352352 return @response
353353}
354354
355+ sub _dfs_chmod {
356+ my $self = shift ;
357+ my $options = shift ;
358+ my @params = @_ ;
359+ my @flags = qw( p ) ;
360+ my ($arg , $paths ) = $self -> _parse_options(
361+ \@params ,
362+ \@flags ,
363+ undef ,
364+ {
365+ require_params => 1,
366+ },
367+ );
368+ my @response = $self -> _capture(
369+ $options ,
370+ $self -> cmd_hdfs,
371+ qw( dfs -chmod ) ,
372+ ( map { ' -' . $_ } grep { $arg -> { $_ } } @flags ),
373+ @{ $paths },
374+ );
375+
376+ # just a confirmation message
377+ return @response
378+ }
379+
355380sub _parse_options {
356381 my $self = shift ;
357382 # TODO: collect dfs generic options
@@ -653,6 +678,12 @@ The C<@subcommand_args> can have these defined: C<-p>
653678
654679 $hdfs->dfs( mkdir => @subcommand_args, $path );
655680
681+ =head3 chmod
682+
683+ The C<@subcommand_args > can have these defined: C<-R >
684+
685+ $hdfs->dfs( chmod => @subcommand_args, $mode, $path );
686+
656687=head1 SEE ALSO
657688
658689C<`hdfs dfs -help` > .
You can’t perform that action at this time.
0 commit comments