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.file.hdfs_file.HdfsFileObject Class Reference
Inheritance diagram for plaso.tarzan.file.hdfs_file.HdfsFileObject:
Inheritance graph
[legend]
Collaboration diagram for plaso.tarzan.file.hdfs_file.HdfsFileObject:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self)
 
def open (self, hdfs_uri, path_spec=None)
 
def close (self)
 
def read (self, size=None)
 
def seek (self, offset, whence=os.SEEK_SET)
 
def tell (self)
 

Public Attributes

 hdfs
 
 path
 
 input_stream
 

Detailed Description

HDFS file access.

Constructor & Destructor Documentation

◆ __init__()

def plaso.tarzan.file.hdfs_file.HdfsFileObject.__init__ (   self)
Initializes a HDFS file object.

Member Function Documentation

◆ close()

def plaso.tarzan.file.hdfs_file.HdfsFileObject.close (   self)
Close the file.

Reimplemented from plaso.tarzan.file.generic_file.FileObject.

◆ open()

def plaso.tarzan.file.hdfs_file.HdfsFileObject.open (   self,
  hdfs_uri,
  path_spec = None 
)
Open a HDFS file identified by the HDFS URI and optionally also by its path.
:param hdfs_uri: the HDFS URI of the file to open
:param path_spec: the path of the file to open

◆ read()

def plaso.tarzan.file.hdfs_file.HdfsFileObject.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

Reimplemented from plaso.tarzan.file.generic_file.FileObject.

◆ seek()

def plaso.tarzan.file.hdfs_file.HdfsFileObject.seek (   self,
  offset,
  whence = os.SEEK_SET 
)
Set a position in the file for future reading or writing.
:param offset: the position as an offset
:param whence: from where the position should be reached (the beginning, the end, etc.)

Reimplemented from plaso.tarzan.file.generic_file.FileObject.

◆ tell()

def plaso.tarzan.file.hdfs_file.HdfsFileObject.tell (   self)
Get a current position in the file.
:return: the current position (an offset)

Member Data Documentation

◆ hdfs

plaso.tarzan.file.hdfs_file.HdfsFileObject.hdfs

◆ input_stream

plaso.tarzan.file.hdfs_file.HdfsFileObject.input_stream

◆ path

plaso.tarzan.file.hdfs_file.HdfsFileObject.path

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