AFAIK, you can't do write directly to HDFS using Splunk or the Splunk REST API. If you are using Hunk (Splunk for Hadoop), then you must write to the HDFS using one of the libraries for HDFS, not Splunk. Then the data will be searchable using Hunk, provided the virtual indexes are properly configured.
If you write data to Splunk, it will be stored in a Splunk index and that requires a Splunk license. You can move data from a Splunk index into Hadoop HDFS. When rolling buckets from cold to frozen in a Splunk index, you can send the frozen data to Hadoop - if you also have a Hunk license. This is an archiving technique.. The idea is to keep your most recent data in Splunk, where the access speed is very fast - and then roll your old data into Hadoop, where it is still available but more cheaply and slower.