Question
In this homework, you are asked to emulate the file system structure of HDFS using Firebase and allow the export of its structure in the
In this homework, you are asked to emulate the file system structure of HDFS using Firebase and allow the export of its structure in the XML format. The emulated HDFS (or EDFS) should support ls, create, mkdir, rmdir, rm, and export commands as detailed below. Your task is to write a Python script edfs.py to support the above commands.
Formats:
python edfs.py -ls
where
. For example, edfs.py -ls /user will list all files or directories under /user. For another example, edfs.py -ls / will list all files or directories under the EDFS root directory.
Permitted python libraries are - base64, json, requests, sys, uuid, fileinput. Please also ensure that your file can be executed as mentioned in the questions.
For example: python edfs.py -ls
Further, You should assume that the directory names only contain alphanumeric characters and do not contain .. The filenames however, may contain . Please remember to hard-code your firebase url in your code. Please do not download the entire firebase data to implement commands, instead you should rely on Firebases functions by sending the appropriate requests.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started