I am unable to upload json file in HDFS using Ambari ( File View ).
Getting error as Attached
Sample file is also attached for your reference.
There is not error / screenshot attached.
How are you uploading the file? Can you please share a dummy file here? Or this issue is happening while uploading any specific file?
Ambari version ?
In the screenshot you will find a "Details" like can you please click on that and share the complete stacktarce of the error?
Or please share the ambari-server log so that we can see the complete stacktarce to findout the cause of failure.
As we see that you are getting "500" error message while the uploaded file. Here 500 is "Internal Server Error", Means definitely in the ambari server log you will see a complete error which explains why did this error occurred. If you can share that complete stackTrace then it will be useful.
Also we see that you have logged in to FileView as "maria_dev" user and you are trying to write inside the "/user/pig" (HDFS dir). you might now have permission to write there. Can you please check?
I am suspecting that you might be getting following kind of error:
Permission denied: user=maria_dev, access=WRITE, inode="/user/pig/YOUR_FILE.json":hdfs:hdfs:drwxr-xr-x at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:319)...
Because the user "maria_dev" is not having write permission on the '/user/pig' HDFS directory.
You should upload your files to a directory where you have ambari logged in user maria_dev write permission.
Example please try uploading file to "/user/maria_dev"
If that directory is not setup in HDFS then please refer to:
su - hdfs hadoop fs -mkdir /user/maria_dev hadoop fs -chown admin:hadoop /user/maria_dev