Object

com.alpine.plugin.core.spark.utils

BadDataReportingUtils

Related Doc: package utils

Permalink

object BadDataReportingUtils

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BadDataReportingUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val defaultDataRemovedMessage: String

    Permalink
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def filterNullDataAndReport(inputDataFrame: DataFrame, operatorParameters: OperatorParameters, sparkRuntimeUtils: SparkRuntimeUtils): (DataFrame, String)

    Permalink

    Given a dataFrame, the parameters and an instance of sparkRuntimeUtils, filters out all the rows containing null values.

    Given a dataFrame, the parameters and an instance of sparkRuntimeUtils, filters out all the rows containing null values. Writes those rows to a file according to the values of the 'dataToWriteParam' and the 'badDataPathParam' (provided in the HdfsParameterUtils class). The method returns the data frame which does not contain nulls as well as a string containing an HTML formatted table with the information about the what data was removed and if/where it was stored. The message is generated using the 'AddendumWriter' object in the Plugin Core module.

    Dirty Data: Spark SQL cannot process CSV files with dirty data (i.e. String values in numeric columns. We use the Drop Malformed option, so in the case of dirty data, the operator will not fail, but will silently remove those rows.

  10. def filterNullDataAndReportGeneral(removeRow: (Row) ⇒ Boolean, inputDataFrame: DataFrame, operatorParameters: OperatorParameters, sparkRuntimeUtils: SparkRuntimeUtils, dataRemovedDueTo: String): (DataFrame, String)

    Permalink

    Same as 'filterNullDataAndReport' but rather than using the .anyNull function in the dataFrame class allows the user to define a function which returns a boolean for each row is it contains data which should be removed.

    Same as 'filterNullDataAndReport' but rather than using the .anyNull function in the dataFrame class allows the user to define a function which returns a boolean for each row is it contains data which should be removed.

    Dirty Data: Spark SQL cannot process CSV files with dirty data (i.e. String values in numeric columns. We use the Drop Malformed option, so in the case of dirty data, the operator will not fail, but will silently remove those rows.

  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def getNullDataToWriteMessage(amountOfDataToWriteParam: Option[Long], badDataPath: String, inputDataSize: Long, outputSize: Long, badData: Option[DataFrame], dataRemovedDueTo: String): (Option[DataFrame], String)

    Permalink

    Helper function which uses the AddendumWriter object to generate a message about the bad data and* get the data, if any, to write to the bad data file.

    Helper function which uses the AddendumWriter object to generate a message about the bad data and* get the data, if any, to write to the bad data file. The data removed parameter is the message for what the bad data was removed. It will be of the form "data removed " + dataRemovedDueTo. I.e. if you put "due to zero values" then the message would read "Data removed due to zero values".

    Note: This method should NOT be called in the event that the user selected the "Do Not Count # of Rows Removed (Faster)" option.

  14. def handleNullDataAsDataFrame[T <: HdfsStorageFormatType](amountOfDataToWriteParam: Option[Long], badDataPath: String, inputDataSize: Long, outputSize: Long, badData: Option[DataFrame], sparkRuntimeUtils: SparkRuntimeUtils, hdfsStorageFormatType: T, overwrite: Boolean, operatorInfo: Option[OperatorInfo], dataRemovedDueTo: String): String

    Permalink

    If specified by Params will write data containing null values to a file.

    If specified by Params will write data containing null values to a file. Regardless return a message about how much data was removed.

  15. def handleNullDataAsDataFrameDefault[T <: HdfsStorageFormatType](amountOfDataToWriteParam: Option[Long], badDataPath: String, inputDataSize: Long, outputSize: Long, nullData: Option[DataFrame], sparkRuntimeUtils: SparkRuntimeUtils, dataRemovedDueTo: String = defaultDataRemovedMessage): String

    Permalink

    If applicable writes bad data as a CSV with default attributes.

  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. def removeDataFromDataFrame(removeRow: (Row) ⇒ Boolean, inputDataFrame: DataFrame, dataToWriteParam: Option[Long] = Some(Long.MaxValue)): (DataFrame, Option[DataFrame])

    Permalink

    Split a DataFrame according to the value of the removeRow parameter.

    Split a DataFrame according to the value of the removeRow parameter.

    Dirty Data: Spark SQL cannot process CSV files with dirty data (i.e. String values in numeric columns). We use the Drop Malformed option, so in the case of dirty data, the operator will not fail, but will silently remove those rows.

    removeRow

    A function from spark.sql.Row to boolean. Should return true if the row is false.

    inputDataFrame

    Input data read without null or bad data removed.

    dataToWriteParam

    None if write no data. Some(n) if parameter value is write n rows.

  22. def reportNullDataAsStringRDD(amountOfDataToWriteParam: Option[Long], badDataPath: String, inputDataSize: Long, outputSize: Long, badData: Option[RDD[String]], dataRemovedDueTo: String): String

    Permalink

    Rather than filtering the data, just provide an RDD of Strings that contain the null data and write the data and report according to the values of the other parameters.

    Rather than filtering the data, just provide an RDD of Strings that contain the null data and write the data and report according to the values of the other parameters.

    Dirty Data: Spark SQL cannot process CSV files with dirty data (i.e. String values in numeric columns. We use the Drop Malformed option, so in the case of dirty data, the operator will not fail, but will silently remove those rows.

  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def filterBadDataAndReport(inputDataFrame: DataFrame, operatorParameters: OperatorParameters, sparkRuntimeUtils: SparkRuntimeUtils): (DataFrame, String)

    Permalink
    Annotations
    @deprecated
    Deprecated

    use filterNullDataAndReport

  2. def filterBadDataAndReportGeneral(isBad: (Row) ⇒ Boolean, inputDataFrame: DataFrame, operatorParameters: OperatorParameters, sparkRuntimeUtils: SparkRuntimeUtils): (DataFrame, String)

    Permalink
    Annotations
    @deprecated
    Deprecated

    Use filterNullDataAndReportGeneral

  3. def getBadDataToWriteAndMessage(amountOfDataToWriteParam: Option[Long], badDataPath: String, inputDataSize: Long, outputSize: Long, badData: Option[DataFrame]): (Option[DataFrame], String)

    Permalink
    Annotations
    @deprecated
    Deprecated

    Use getNullDataToWriteMessage

  4. def reportBadDataAsStringRDD(amountOfDataToWriteParam: Option[Long], badDataPath: String, inputDataSize: Long, outputSize: Long, badData: Option[RDD[String]]): String

    Permalink
    Annotations
    @deprecated
    Deprecated

    Use reportNullDataAsStringRDD

Inherited from AnyRef

Inherited from Any

Ungrouped