I was able to fix the issue using below mentioned discussion thread.
However, now I'm getting below mentioned error.
hdfs_logstash.1.i8axxr7tdhsq@SIDCAPASPARK2 | No Kerberos credentials available: Invalid UID in persistent keyring name
hdfs_logstash.1.i8axxr7tdhsq@SIDCAPASPARK2 | )
hdfs_logstash.1.i8axxr7tdhsq@SIDCAPASPARK2 | [2019-07-29T12:20:24,356][ERROR][logstash.javapipeline ] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<WebHDFS::KerberosError: gss_init_sec_context did not return GSS_S_COMPLETE: Unspecified GSS failure. Minor code may provide more information
hdfs_logstash.1.i8axxr7tdhsq@SIDCAPASPARK2 | No Kerberos credentials available: Invalid UID in persistent keyring name
hdfs_logstash.1.i8axxr7tdhsq@SIDCAPASPARK2 | >, :backtrace=>["/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/webhdfs-0.8.0/lib/webhdfs/client_v1.rb:323:in `request'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/webhdfs-0.8.0/lib/webhdfs/client_v1.rb:275:in `operate_requests'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/webhdfs-0.8.0/lib/webhdfs/client_v1.rb:138:in `list'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-webhdfs-3.0.6/lib/logstash/outputs/webhdfs_helper.rb:49:in `test_client'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-output-webhdfs-3.0.6/lib/logstash/outputs/webhdfs.rb:155:in `register'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:106:in `register'", "org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:48:in `register'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:192:in `block in register_plugins'", "org/jruby/RubyArray.java:1792:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:191:in `register_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:462:in `maybe_setup_out_plugins'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:204:in `start_workers'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:146:in `run'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:105:in `block in start'"], :thread=>"#<Thread:0x49a8e1b3 run>"}
hdfs_logstash.1.i8axxr7tdhsq@SIDCAPASPARK2 | [2019-07-29T12:20:24,374][ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create<main>, action_result: false", :backtrace=>nil}
hdfs_logstash.1.i8axxr7tdhsq@SIDCAPASPARK2 | [2019-07-29T12:20:24,519][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
hdfs_logstash.1.i8axxr7tdhsq@SIDCAPASPARK2 | [2019-07-29T12:20:29,606][INFO ][logstash.runner ] Logstash shut down.```