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 | List of all members
plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile Class Reference
Inheritance diagram for plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile:
[legend]
Collaboration diagram for plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile:
[legend]

## Public Member Functions
def | __init__ (self, resolver_context)
def | read (self, size=None)
def | seek (self, offset, whence=os.SEEK_SET)
def | get_offset (self)
def | get_size (self)

## Detailed Description

    File-like object for HDFS.

## Constructor & Destructor Documentation

## ◆ __init__()

def plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile.__init__ | ( |  | self,
|  |  | resolver_context
| ) |  |

    Initializes a file-like object.
    :param resolver_context: resolver context

## Member Function Documentation

## ◆ get_offset()

def plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile.get_offset | ( |  | self | ) |

    Retrieves the current offset into the file-like object.
    :return: current offset into the file-like object
    :raises: IOError: if the file-like object has not been opened

## ◆ get_size()

def plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile.get_size | ( |  | self | ) |

    Retrieves the size of the file-like object.
    :return: size of the file-like object data
    :raises IOError: if the file-like object has not been opened

## ◆ read()

def plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile.read | ( |  | self,
|  |  | size = `None`
| ) |  |

    Reads a byte string from the file-like object at the current offset.
    The function will read a byte string of the specified size or all of the remaining data
    if no size was specified.
    :param size: number of bytes to read, where None is all remaining data.
    :return: data read
    :raises IOError: if the read failed

## ◆ seek()

def plaso.tarzan.dfvfs2.hdfs_file_io.HDFSFile.seek | ( |  | self,
|  |  | offset,
|  |  | whence = `os.SEEK_SET`
| ) |  |

    Seeks to an offset within the file-like object.
    :param offset: offset to seek to
    :param whence: value that indicates whether offset is an absolute or relative position within the file
    :raises IOError: if the seek failed

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

- /home/rychly/repos/pyspark-plaso/src/plaso/tarzan/dfvfs2/hdfs_file_io.py