title: HDFS access from remote host through Java API, user authentication
body: <p>I need to use HDFS cluster from remote desktop through Java API. Everything works OK until it comes to write access. If I'm trying to create any file I receive access permission exception. Path looks good but exception indicates my remote desktop user name which is of course is not what I need to access needed HDFS directory.</p>
  
  <p>The question is:
  - Is there any way to represent different user name using 'simple' authentication in Java API?
  - Could you please point some good explanation of authentication / authorization schemes in hadoop / HDFS preferable with Java API examples?</p>
  
  <p>Yes, I already know 'whoami' could be overloaded in this case using shell alias but I prefer to avoid solutions like this. Also specifics here is I dislike usage of some tricks like pipes through SSH and scripts. I'd like to perform everything using just Java API.
  Thank you in advance.</p>