Assuming your user name is hdfs
, add &user.name=hdfs
to your URL. Write operations require a valid user.
Your java code works because it pulls your user information from the unix environment.
If you see the user dr.who
anywhere, it's probably because you haven't set a user.name
in your request.