PySpark Plaso Release 2019 A tool for distributed extraction of timestamps from various files using extractors adapted from the Plaso engine to Apache Spark.

Public Member Functions | Public Attributes | List of all members
plaso.tarzan.app.controllers.filemancontroller.FileManController Class Reference
Inheritance diagram for plaso.tarzan.app.controllers.filemancontroller.FileManController:
[legend]
Collaboration diagram for plaso.tarzan.app.controllers.filemancontroller.FileManController:
[legend]

## Public Member Functions
def | __init__ (self, hdfs_base_uri)
def | ls (self, hdfs_path="")
def | rm (self, hdfs_path="")
def | get (self, hdfs_path="")
def | get_zip (self, hdfs_path="")
def | put (self, request, hdfs_path)
def | put_form (self, request, hdfs_path)
def | zip_put (self, request, hdfs_path="")
def | zip_put_form (self, request, hdfs_path="")
Public Member Functions inherited from plaso.tarzan.app.controllers.controller.Controller
def | make_hdfs_uri (self, hdfs_path)
def | strip_hdfs_uri (self, hdfs_path)

## Public Attributes
| hdfs
Public Attributes inherited from plaso.tarzan.app.controllers.controller.Controller
| hdfs_base_uri

## Detailed Description

    Controller for HDFS-related management operations.

## Constructor & Destructor Documentation

## ◆ __init__()

def plaso.tarzan.app.controllers.filemancontroller.FileManController.__init__ | ( |  | self,
|  |  | hdfs_base_uri
| ) |  |

    Create a new controller that is able to store and utilize HDFS URI in HDFS queries and operations.
    :param hdfs_base_uri: the base HDFS URI to store

Reimplemented from plaso.tarzan.app.controllers.controller.Controller.

## Member Function Documentation

## ◆ get()

def plaso.tarzan.app.controllers.filemancontroller.FileManController.get | ( |  | self,
|  |  | hdfs_path = `""`
| ) |  |

    Get a Flask Response to download a file in a given HDFS path.
    :param hdfs_path: the HDFS path of the file to download
    :return: the Flask Response of the download

## ◆ get_zip()

def plaso.tarzan.app.controllers.filemancontroller.FileManController.get_zip | ( |  | self,
|  |  | hdfs_path = `""`
| ) |  |

    Get a Flask Response to download a ZIP archive of files and directories in a given HDFS path.
    :param hdfs_path: the HDFS path which include into the ZIP archive
    :return: the Flask Response to download the ZIP file

## ◆ ls()

def plaso.tarzan.app.controllers.filemancontroller.FileManController.ls | ( |  | self,
|  |  | hdfs_path = `""`
| ) |  |

    Get a Flask Response listing all files and directories (the dirs are suffixed by "/")
    that are in a given HDFS path.
    :param hdfs_path: the HDFS path to search for the files and directories
    :return: the Flask Response of the list of files and directories in the path

## ◆ put()

def plaso.tarzan.app.controllers.filemancontroller.FileManController.put | ( |  | self,
|  |  | request,
|  |  | hdfs_path
| ) |  |

    Copy the content uploaded by a PUT request in the REST API to a file in a given HDFS path.
    :param request: the REST API PUT request
    :param hdfs_path: the HDFS path where to upload
    :return: the Flask Response confirming the upload

## ◆ put_form()

def plaso.tarzan.app.controllers.filemancontroller.FileManController.put_form | ( |  | self,
|  |  | request,
|  |  | hdfs_path
| ) |  |

    Copy the content uploaded by a HTML FORM to a file in a given HDFS path.
    :param request: the request which contains the FORM upload
    :param hdfs_path: the HDFS path where to upload
    :return: the Flask Response confirming the upload

## ◆ rm()

def plaso.tarzan.app.controllers.filemancontroller.FileManController.rm | ( |  | self,
|  |  | hdfs_path = `""`
| ) |  |

    Get a Flask Response confirming a recursive removal of files and directories in a given HDFS path.
    :param hdfs_path: the HDFS path which should be removed including to remove its files and directories
    :return: the Flask Response of the confirmation of the remove

## ◆ zip_put()

def plaso.tarzan.app.controllers.filemancontroller.FileManController.zip_put | ( |  | self,
|  |  | request,
|  |  | hdfs_path = `""`
| ) |  |

    Extract the content of a ZIP archive uploaded by a PUT request in the REST API into a given HDFS path.
    :param request: the REST API PUT request
    :param hdfs_path: the HDFS path where to extract the ZIP archive
    :return: the Flask Response confirming the upload and extraction

## ◆ zip_put_form()

def plaso.tarzan.app.controllers.filemancontroller.FileManController.zip_put_form | ( |  | self,
|  |  | request,
|  |  | hdfs_path = `""`
| ) |  |

    Extract the content of a ZIP archive uploaded by a HTML FORM into a given HDFS path.
    :param request: the request which contains the FORM upload
    :param hdfs_path: the HDFS path where to extract the ZIP archive
    :return: the Flask Response confirming the upload and extraction

## Member Data Documentation

## ◆ hdfs

plaso.tarzan.app.controllers.filemancontroller.FileManController.hdfs

The documentation for this class was generated from the following file:

- /home/rychly/repos/pyspark-plaso/src/plaso/tarzan/app/controllers/filemancontroller.py