Class SparkTimeseriesData
java.lang.Object
cern.nxcals.api.backport.domain.core.timeseriesdata.SparkTimeseriesData
- All Implemented Interfaces:
TimeseriesData,Cloneable,Comparable<TimeseriesData>
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbooleanafter(TimeseriesData timeseriesData) alignToTimestamp(Timestamp timestamp) booleanbefore(TimeseriesData timeseriesData) builder()intcompareTo(TimeseriesData other) intcompareValueTo(TimeseriesData that) int[]Gets the data dimensions of time series data.booleanGets the Varchar value associated with the time series data.doubleGets the Numeric value associated with the time series data.doublegetDoubleValueAtIndex(int index) Gets numeric value from the vectornumeric value at the given index.double[]Gets the Vector of Numeric values associated with the time series data.getFormattedStamp(LoggingTimeZone timeZone) longGets the Numeric value associated with the time series data.longgetLongValueAtIndex(int index) Gets numeric value from the vectornumeric value at the given index.long[]Gets the Vector of Numeric values associated with the time series data.double[][]long[][]getName()Gets the Status associated with the time series data.Deprecated.(never use, major performance hit)getNumericValueAtVectorIndex(int index) Deprecated.(never use, performance hit)getStamp()Gets the timestamp of the timeseries data.getStringValueAtIndex(int index) String[]Gets the Varchar value associated with the time series data.int[]int[]Gets the array of vectornumeric element indexes.Deprecated.(never use, major performance hit)inthashCode()booleanChecks whether the value is nullbooleanisNullValue(int index) Checks whether the value is null for a given index (vector numeric types)isSubSet()Indicates if this Timeseries Data is a subset of the actual logged vectornumerioc value as a result of filtering by index or value.static TimeseriesDatastatic TimeseriesDataof(@NonNull org.apache.spark.sql.Row row) static TimeseriesDataofDataDistribution(@NonNull org.apache.spark.sql.Row row) static TimeseriesDatastatic TimeseriesDataofFundamental(@NonNull org.apache.spark.sql.Row row) voidprint(LoggingTimeZone timezone) Deprecated.(never use, antipattern)Represents the value in a stringtoStringValue(int index) Gets the string of a value for a given index for a vector numeric typeClass<?> type()Gets the data type of time series data.
-
Method Details
-
of
-
of
public static TimeseriesData of(@NonNull @NonNull Timestamp timestamp, @NonNull @NonNull cern.cmw.datax.ImmutableEntry data) -
ofDouble
-
ofDataDistribution
-
ofFundamental
-
toBuilder
-
type
Description copied from interface:TimeseriesDataGets the data type of time series data.- Specified by:
typein interfaceTimeseriesData- Returns:
- the data type of time series data.
-
dimensions
public int[] dimensions()Description copied from interface:TimeseriesDataGets the data dimensions of time series data.- Specified by:
dimensionsin interfaceTimeseriesData- Returns:
- the data dimensions of time series data.
-
getVariableDataType
- Specified by:
getVariableDataTypein interfaceTimeseriesData- See Also:
-
after
- Specified by:
afterin interfaceTimeseriesData
-
before
- Specified by:
beforein interfaceTimeseriesData
-
getFormattedStamp
- Specified by:
getFormattedStampin interfaceTimeseriesData- Parameters:
timeZone- - the timezone which should be used to format the timestamp of this data- Returns:
- - a String representing the timestamp of this data, formatted according to the given timezone
-
getNumericStatus
Description copied from interface:TimeseriesDataGets the Status associated with the time series data.- Specified by:
getNumericStatusin interfaceTimeseriesData- Returns:
- the Status associated with the time series data.
- Throws:
NoSuchMethodException- - if an attempt is made to retrieve the Status of time series data that does not have a status associated with it i.e. it is not of the relevant datatype.
-
getDestination
Description copied from interface:TimeseriesDataGets the Varchar value associated with the time series data.- Specified by:
getDestinationin interfaceTimeseriesData- Returns:
- the Varchar value associated with the time series data.
- Throws:
NoSuchMethodException- - if an attempt is made to retrieve the destination value of time series data that does not have a destination value associated with it i.e. it is not of the fundamental datatype.
-
getNumericValue
Deprecated.(never use, major performance hit)Description copied from interface:TimeseriesDataGets the Numeric value associated with the time series data.- Specified by:
getNumericValuein interfaceTimeseriesData- Returns:
- the Numeric value associated with the time series data.
- Throws:
NoSuchMethodException- - if an attempt is made to retrieve the Numeric value of time series data that does not have a Numeric Value associated with it i.e. it is not of the relevant datatype.
-
getDoubleValue
Description copied from interface:TimeseriesDataGets the Numeric value associated with the time series data.- Specified by:
getDoubleValuein interfaceTimeseriesData- Returns:
- the Numeric value associated with the time series data.
- Throws:
NoSuchMethodException- - if an attempt is made to retrieve the Numeric value of time series data that does not have a Numeric Value associated with it i.e. it is not of the relevant datatype.
-
getLongValue
Description copied from interface:TimeseriesDataGets the Numeric value associated with the time series data.- Specified by:
getLongValuein interfaceTimeseriesData- Returns:
- the Numeric value associated with the time series data.
- Throws:
NoSuchMethodException- - if an attempt is made to retrieve the Numeric value of time series data that does not have a Numeric Value associated with it i.e. it is not of the relevant datatype.
-
getVarcharValue
Description copied from interface:TimeseriesDataGets the Varchar value associated with the time series data.- Specified by:
getVarcharValuein interfaceTimeseriesData- Returns:
- the Varchar value associated with the time series data.
- Throws:
NoSuchMethodException- - if an attempt is made to retrieve the Varchar value of time series data that does not have a Varchar value associated with it i.e. it is not of the relevant datatype.
-
getVectorNumericValues
Deprecated.(never use, major performance hit)Description copied from interface:TimeseriesDataGets the Vector of Numeric values associated with the time series data.- Specified by:
getVectorNumericValuesin interfaceTimeseriesData- Returns:
- the Vector of Numeric values associated with the time series data.
- Throws:
NoSuchMethodException- - if an attempt is made to retrieve the Vector of Numeric values of the time series data that does not have a Vector of Numeric values associated with it i.e. it is not of the relevant datatype.
-
getDoubleValues
Description copied from interface:TimeseriesDataGets the Vector of Numeric values associated with the time series data.- Specified by:
getDoubleValuesin interfaceTimeseriesData- Returns:
- the Vector of Numeric values associated with the time series data.
- Throws:
NoSuchMethodException- - if an attempt is made to retrieve the Vector of Numeric values of the time series data that does not have a Vector of Numeric values associated with it i.e. it is not of the relevant datatype.
-
getLongValues
Description copied from interface:TimeseriesDataGets the Vector of Numeric values associated with the time series data.- Specified by:
getLongValuesin interfaceTimeseriesData- Returns:
- the Vector of Numeric values associated with the time series data.
- Throws:
NoSuchMethodException- - if an attempt is made to retrieve the Vector of Numeric values of the time series data that does not have a Vector of Numeric values associated with it i.e. it is not of the relevant datatype.
-
getStringValues
- Specified by:
getStringValuesin interfaceTimeseriesData- Throws:
NoSuchMethodException
-
getMatrixDoubleValues
- Specified by:
getMatrixDoubleValuesin interfaceTimeseriesData- Throws:
NoSuchMethodException
-
getMatrixLongValues
- Specified by:
getMatrixLongValuesin interfaceTimeseriesData- Throws:
NoSuchMethodException
-
print
Deprecated.(never use, antipattern)- Specified by:
printin interfaceTimeseriesData
-
getNumericValueAtVectorIndex
Deprecated.(never use, performance hit)Description copied from interface:TimeseriesDataGets numeric value from the vectornumeric value at the given index.- Specified by:
getNumericValueAtVectorIndexin interfaceTimeseriesData- Returns:
- the numeric value from the vectornumeric value at the given index or null if there is no value at the given index.
- Throws:
NoSuchMethodException
-
getDoubleValueAtIndex
Description copied from interface:TimeseriesDataGets numeric value from the vectornumeric value at the given index.- Specified by:
getDoubleValueAtIndexin interfaceTimeseriesData- Returns:
- the numeric value from the vectornumeric value at the given index or null if there is no value at the given index.
- Throws:
NoSuchMethodException
-
getLongValueAtIndex
Description copied from interface:TimeseriesDataGets numeric value from the vectornumeric value at the given index.- Specified by:
getLongValueAtIndexin interfaceTimeseriesData- Returns:
- the numeric value from the vectornumeric value at the given index or null if there is no value at the given index.
- Throws:
NoSuchMethodException
-
getStringValueAtIndex
- Specified by:
getStringValueAtIndexin interfaceTimeseriesData- Throws:
NoSuchMethodException
-
isSubSet
Description copied from interface:TimeseriesDataIndicates if this Timeseries Data is a subset of the actual logged vectornumerioc value as a result of filtering by index or value.- Specified by:
isSubSetin interfaceTimeseriesData- Returns:
- true if this Timeseries Data is a subset of the actual logged vectornumerioc value.
- Throws:
NoSuchMethodException
-
getVectorNumericIndexes
Description copied from interface:TimeseriesDataGets the array of vectornumeric element indexes. This is useful in the case that this vectornumeric data is a subset of the actual logged vectornumerioc value (as a result of filtering by index or value).- Specified by:
getVectorNumericIndexesin interfaceTimeseriesData- Returns:
- the array of vectornumeric element indexes.
- Throws:
NoSuchMethodException
-
getVectorIndexes
- Specified by:
getVectorIndexesin interfaceTimeseriesData- Throws:
NoSuchMethodException
-
toStringValue
Description copied from interface:TimeseriesDataRepresents the value in a string- Specified by:
toStringValuein interfaceTimeseriesData- Returns:
- The value in a string
- Throws:
NoSuchMethodException
-
toStringValue
Description copied from interface:TimeseriesDataGets the string of a value for a given index for a vector numeric type- Specified by:
toStringValuein interfaceTimeseriesData- Parameters:
index-- Returns:
- Throws:
NoSuchMethodException
-
isNullValue
Description copied from interface:TimeseriesDataChecks whether the value is null- Specified by:
isNullValuein interfaceTimeseriesData- Returns:
- Throws:
NoSuchMethodException
-
isNullValue
Description copied from interface:TimeseriesDataChecks whether the value is null for a given index (vector numeric types)- Specified by:
isNullValuein interfaceTimeseriesData- Returns:
- Throws:
NoSuchMethodException
-
alignToTimestamp
- Specified by:
alignToTimestampin interfaceTimeseriesData- Throws:
NoSuchMethodException
-
compareValueTo
- Specified by:
compareValueToin interfaceTimeseriesData- Throws:
NoSuchMethodException
-
compareTo
- Specified by:
compareToin interfaceComparable<TimeseriesData>
-
equals
-
hashCode
public int hashCode() -
builder
-
getStamp
Description copied from interface:TimeseriesDataGets the timestamp of the timeseries data.- Specified by:
getStampin interfaceTimeseriesData- Returns:
- - the timestamp of the timeseries data.
-
getName
- Specified by:
getNamein interfaceTimeseriesData
-