Where are the files stored in Hue in Amazon EMR

Viewed 324

If I go to the hue link here at http://ec2-****:8888/hue/home/ I can access the hue dashboard and create and save files etc. However, I'm not able to see those files while browsing through the system using SSH. Where are these files stored in the system?

enter image description here

1 Answers

This is not how it works Alex, you cannot see that information in your filesystem.

Hue is giving you a view of the underlying Hadoop Distributed File System (HDFS).

The information in this filesystem is spread across several nodes in your Hadoop cluster.

If you need to find something in that filesystem, you cannot use the typical file manipulation tools provided by the operating system, but their Hadoop counterparts.

For your use case, Hadoop provide you the hdfs dfs command, or equivalently, hadoop fs.

Let's say you wanna find test1.sql in the Hadoop filesystem. You can issue the following command once you ssh in your node:

hadoop fs -ls -R / | grep test1.sql

Or:

hadoop fs -find / -name test1.sql

Please, see the complete reference of the options available.

You can retrieve the file to your local filesystem, once located by the previous commands, by issuing the following one:

hadoop fs -get /path/to/test1.sql test1.sql

This operation could be also achieved from the Hue File Browser.

In the specific case of Amazon EMR, this distributed filesystem can be supported by different storage systems basically, HDFS, for ephemeral workloads, and EMRFS, an implementation of HDFS over S3:

EMRFS is an implementation of the Hadoop file system used for reading and writing regular files from Amazon EMR directly to Amazon S3.

Related