class ExportStreamTemplatesFirst extends ExportStream
ExportStreamTemplatesFirst extends the ExportStream class to ensure that Templates occur in the output stream before Records.
Instances of this class only produce output when the close() method is called.
Note: When template metadata or information element metadata is being written to the stream, those records may appear before some templates.
- Alphabetic
- By Inheritance
- ExportStreamTemplatesFirst
- ExportStream
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def add(template: Template): ExportStream
Adds
template
to the output stream unless the template has already been seen by this stream.Adds
template
to the output stream unless the template has already been seen by this stream.If
template
appears to be a template for describing either information element meta-data or template meta-data, then the template is ignored if the Export Stream is exporting that meta-data itself (see thedescribeElements
anddescribeTemplates
variables).- Definition Classes
- ExportStreamTemplatesFirst → ExportStream
- def add(reader: MessageReader): ExportStream
Add all records from a MesageReader to this ExportStream
Add all records from a MesageReader to this ExportStream
- Definition Classes
- ExportStream
- def add(record: Record): ExportStream
Adds
record
to the output stream.Adds
record
to the output stream. Prior to addingrecord
, adds any Templates used byrecord
that have not been seen before.If
record
appears to contain either information element meta-data or template meta-data, then the record is ignored if the Export Stream is exporting that meta-data itself (see thedescribeElements
anddescribeTemplates
variables).- Definition Classes
- ExportStream
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def close(): Unit
Flushes and closes the output stream.
Flushes and closes the output stream.
- Definition Classes
- ExportStreamTemplatesFirst → ExportStream
- def dataWrittenCallback: Option[DataWrittenCallback]
Gets the current callback invoked when bytes are written to the outputStream as an Option.
Gets the current callback invoked when bytes are written to the outputStream as an Option.
- Definition Classes
- ExportStream
- Since
1.3.1
- def dataWrittenCallback_=(callback: DataWrittenCallback): Unit
Sets a callback to be invoked when bytes are written to the outputStream.
Sets a callback to be invoked when bytes are written to the outputStream.
- Definition Classes
- ExportStream
- Since
1.3.1
- var describeElements: Boolean
Whether to export option records that describe private enterprise information elements.
Whether to export option records that describe private enterprise information elements.
If this is
true
, ExportStream generates these records itself and any such records given to theadd
method are ignored. The records are generated as-needed and may appear anywhere in the output.If this is
false
, input records that describe private enterprise elements are written to the output without ExportStream examining their content. This may result in duplicate descriptions in the output.In either case, ExportStream attempts to use the same template ID for the element metadata template as seen in the incoming data.
- Definition Classes
- ExportStream
- var describeTemplates: Boolean
Whether to export option records that include the name and description of each template.
Whether to export option records that include the name and description of each template.
If this is
true
, ExportStream generates these records itself and any such records given to theadd
method are ignored. The records are generated as-needed and may appear anywhere in the output.If this is
false
, input records that describe templates are written to the output without ExportStream examining their content. This may result in duplicate descriptions in the output.In either case, ExportStream attempts to use the same template ID for the template metadata template as seen in the incoming data.
- Definition Classes
- ExportStream
- def elementDescriptionTID: Option[Int]
Returns the template ID for the options template used by records that describe private enterprise information elements.
Returns the template ID for the options template used by records that describe private enterprise information elements. Returns scala.None if no ID has been assigned.
- Definition Classes
- ExportStream
- def elementDescriptionTID_=(tid: Int): Unit
Sets the template ID for the options template used by records that describe private enterprise information elements and exports the template to ensure the template ID is reserved.
Sets the template ID for the options template used by records that describe private enterprise information elements and exports the template to ensure the template ID is reserved.
- Definition Classes
- ExportStream
- Exceptions thrown
IllegalTemplateRecordException
whentid
is illegal or is already in use by the session.java.lang.RuntimeException
whentid
cannot be used for the template because the template already exists.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flush(): ExportStream
Flushes any data currently sitting in memory.
Flushes any data currently sitting in memory.
- Definition Classes
- ExportStream
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- var knownTmpl: Set[Template]
The set of templates that have been exported
The set of templates that have been exported
- Definition Classes
- ExportStream
- var makeTimestamp: MessageTimestamp
Callback to generate a timestamp
Callback to generate a timestamp
- Definition Classes
- ExportStream
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def outputStream: WritableByteChannel
Returns the file channel to which the data is being written
Returns the file channel to which the data is being written
- Definition Classes
- ExportStreamTemplatesFirst → ExportStream
- def recordCount: Int
Returns the number of data records added to the stream.
Returns the number of data records added to the stream.
- Definition Classes
- ExportStream
- val session: Session
- Definition Classes
- ExportStream
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def templateCount: Int
Returns the number of templates added to the stream.
Returns the number of templates added to the stream.
- Definition Classes
- ExportStream
- def templateDescriptionTID: Option[Int]
Returns the template ID for the options template used by records that describe templates.
Returns the template ID for the options template used by records that describe templates. Returns scala.None if no ID has been assigned.
- Definition Classes
- ExportStream
- def templateDescriptionTID_=(tid: Int): Unit
Sets the template ID for the options template used by records that describe templates and exports the template to ensure the template ID is reserved.
Sets the template ID for the options template used by records that describe templates and exports the template to ensure the template ID is reserved.
- Definition Classes
- ExportStream
- Exceptions thrown
IllegalTemplateRecordException
whentid
is illegal or is already in use by the session.java.lang.RuntimeException
whentid
cannot be used for the template because the template already exists.
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
This is documentation for Mothra, a collection of Scala and Spark library functions for working with Internet-related data. Some modules contain APIs of general use to Scala programmers. Some modules make those tools more useful on Spark data-processing systems.
Please see the documentation for the individual packages for more details on their use.
Scala Packages
These packages are useful in Scala code without involving Spark:
org.cert.netsa.data
This package, which is collected as the
netsa-data
library, provides types for working with various kinds of information:org.cert.netsa.data.net
- types for working with network dataorg.cert.netsa.data.time
- types for working with time dataorg.cert.netsa.data.unsigned
- types for working with unsigned integral valuesorg.cert.netsa.io.ipfix
The
netsa-io-ipfix
library provides tools for reading and writing IETF IPFIX data from various connections and files.org.cert.netsa.io.silk
To read and write CERT NetSA SiLK file formats and configuration files, use the
netsa-io-silk
library.org.cert.netsa.util
The "junk drawer" of
netsa-util
so far provides only two features: First, a method for equipping Scala scala.collection.Iterators with exception handling. And second, a way to query the versions of NetSA libraries present in a JVM at runtime.Spark Packages
These packages require the use of Apache Spark:
org.cert.netsa.mothra.datasources
Spark datasources for CERT file types. This package contains utility features which add methods to Apache Spark DataFrameReader objects, allowing IPFIX and SiLK flows to be opened using simple
spark.read...
calls.The
mothra-datasources
library contains both IPFIX and SiLK functionality, whilemothra-datasources-ipfix
andmothra-datasources-silk
contain only what's needed for the named datasource.org.cert.netsa.mothra.analysis
A grab-bag of analysis helper functions and example analyses.
org.cert.netsa.mothra.functions
This single Scala object provides Spark SQL functions for working with network data. It is the entirety of the
mothra-functions
library.