How do i execute ‘hadoop fs -cat file_name’ commands in jupyter notebook. It is not recognizing hadoop commands
I tried :
from hdfs3 import HDFileSystem
hdfs = HDFileSystem();
But, the package hdfs3 is not available and it is showing not accessible even after ‘pip install hdfs3’ which probably installed in user directory.
For hadoop fs -cat file_name, please use the terminal.
If you want to do it Jupyter notebook for python3, please put an exclamation mark at the beginning like this:
!hadoop fs -cat file_name
Thanks for the response.
Hi,
i’m facing while i’m running commands.
Error while compiling statement: FAILED: SemanticException MetaException(message:java.net.ConnectException: Call From cxln2.c.thelab-240901.internal/10.142.1.2 to cxln1.c.thelab-240901.internal:8020 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused)