Class SparkTimeseriesDataSet
java.lang.Object
java.util.AbstractCollection<TimeseriesData>
java.util.AbstractList<TimeseriesData>
java.util.ArrayList<TimeseriesData>
cern.nxcals.api.backport.domain.core.timeseriesdata.SparkTimeseriesDataSet
- All Implemented Interfaces:
TimeseriesDataSet,Serializable,Cloneable,Iterable<TimeseriesData>,Collection<TimeseriesData>,List<TimeseriesData>,RandomAccess,SequencedCollection<TimeseriesData>
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(TimeseriesData data) Deprecated.(never use, major performance hit, could have led to unpredictable states)booleanaddAll(Collection<? extends TimeseriesData> c) Deprecated.(never use, major performance hit, could have led to unpredictable states)voidDeprecated.(never use, major performance hit, could have led to unpredictable states)alignToTimestamps(TimeseriesDataSet required) voidappend(TimeseriesDataSet data) Deprecated.(never use, major performance hit, could have led to unpredictable states)protected booleanvoidclear()Deprecated.(never use, major performance hit, could have led to unpredictable states)booleangetMetaDataInfo(LoggingTimeZone timeZone) getTimeseriesData(int index) getTimeseriesData(Timestamp timestamp) Returns the data at the given timestamp or null if the data is not foundgetTimeseriesDataOrLast(Timestamp timestamp) Returns the data at the given timestamp or repeat the last value if there is no value found at the given timestamp If there is no value before that time, null is returnedgetUnit()Note: Not always available (depending on the extraction)inthashCode()static TimeseriesDataSetof(Variable variable, List<TimeseriesData> data) static TimeseriesDataSetstatic TimeseriesDataSetofAggregated(Variable variable, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset) static TimeseriesDataSetofDataDistribution(Variable variable, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset) static TimeseriesDataSetofFundamentals(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset) static TimeseriesDataSetofSorted(Variable variable, List<TimeseriesData> data) static TimeseriesDataSetvoidprint(LoggingTimeZone utcTime) Deprecated.(never use, antipattern)booleanDeprecated.(never use, major performance hit, could have led to unpredictable states)booleanremoveAll(Collection<?> c) Deprecated.(never use, major performance hit, could have led to unpredictable states)booleanretainAll(Collection<?> c) Deprecated.(never use, major performance hit, could have led to unpredictable states)Methods inherited from class java.util.ArrayList
add, addAll, addFirst, addLast, clone, contains, ensureCapacity, forEach, get, getFirst, getLast, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeFirst, removeIf, removeLast, removeRange, replaceAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversedMethods inherited from interface cern.nxcals.api.backport.domain.core.timeseriesdata.TimeseriesDataSet
listIterator
-
Method Details
-
of
-
ofSorted
-
of
public static TimeseriesDataSet of(Variable variable, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset) -
ofFundamentals
public static TimeseriesDataSet ofFundamentals(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset) -
ofDataDistribution
public static TimeseriesDataSet ofDataDistribution(Variable variable, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset) -
ofSorted
public static TimeseriesDataSet ofSorted(Variable variable, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset) -
ofAggregated
public static TimeseriesDataSet ofAggregated(Variable variable, org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset) -
getTimeseriesData
- Specified by:
getTimeseriesDatain interfaceTimeseriesDataSet- Parameters:
index- - the index in this TimeseriesDataSet for which TimeseriesData should be returned.- Returns:
- - TimeseriesData at the given index within this TimeseriesDataSet
-
getVariableName
- Specified by:
getVariableNamein interfaceTimeseriesDataSet- Returns:
- - the name of the Variable to which this TimeseriesData belongs
-
getUnit
- Specified by:
getUnitin interfaceTimeseriesDataSet
-
getVariableDataType
- Specified by:
getVariableDataTypein interfaceTimeseriesDataSet- Returns:
- - the type of the Variable to which this TimeseriesData belongs
-
getTimeseriesDataOrLast
Description copied from interface:TimeseriesDataSetReturns the data at the given timestamp or repeat the last value if there is no value found at the given timestamp If there is no value before that time, null is returned- Specified by:
getTimeseriesDataOrLastin interfaceTimeseriesDataSet- Parameters:
timestamp- - The given timestamp- Returns:
- - The data at the given timestamp or just before
-
getTimeseriesData
Description copied from interface:TimeseriesDataSetReturns the data at the given timestamp or null if the data is not found- Specified by:
getTimeseriesDatain interfaceTimeseriesDataSet- Parameters:
timestamp-- Returns:
-
getMetaDataInfo
- Specified by:
getMetaDataInfoin interfaceTimeseriesDataSet
-
getMetaData
- Specified by:
getMetaDatain interfaceTimeseriesDataSet
-
alignToTimestamps
- Specified by:
alignToTimestampsin interfaceTimeseriesDataSet
-
print
Deprecated.(never use, antipattern)- Specified by:
printin interfaceTimeseriesDataSet
-
addTimeseriesData
Deprecated.(never use, major performance hit, could have led to unpredictable states)- Specified by:
addTimeseriesDatain interfaceTimeseriesDataSet- Parameters:
data- - the TimeseriesData to be added to this TimeseriesDataSet
-
append
Deprecated.(never use, major performance hit, could have led to unpredictable states)Description copied from interface:TimeseriesDataSetAppends a Timeseries Data Set to the end of the current data set- Specified by:
appendin interfaceTimeseriesDataSet- Parameters:
data- The data set to be appended
-
add
Deprecated.(never use, major performance hit, could have led to unpredictable states)- Specified by:
addin interfaceCollection<TimeseriesData>- Specified by:
addin interfaceList<TimeseriesData>- Overrides:
addin classArrayList<TimeseriesData>
-
remove
Deprecated.(never use, major performance hit, could have led to unpredictable states)- Specified by:
removein interfaceCollection<TimeseriesData>- Specified by:
removein interfaceList<TimeseriesData>- Overrides:
removein classArrayList<TimeseriesData>
-
addAll
Deprecated.(never use, major performance hit, could have led to unpredictable states)- Specified by:
addAllin interfaceCollection<TimeseriesData>- Specified by:
addAllin interfaceList<TimeseriesData>- Overrides:
addAllin classArrayList<TimeseriesData>
-
removeAll
Deprecated.(never use, major performance hit, could have led to unpredictable states)- Specified by:
removeAllin interfaceCollection<TimeseriesData>- Specified by:
removeAllin interfaceList<TimeseriesData>- Overrides:
removeAllin classArrayList<TimeseriesData>
-
retainAll
Deprecated.(never use, major performance hit, could have led to unpredictable states)- Specified by:
retainAllin interfaceCollection<TimeseriesData>- Specified by:
retainAllin interfaceList<TimeseriesData>- Overrides:
retainAllin classArrayList<TimeseriesData>
-
clear
Deprecated.(never use, major performance hit, could have led to unpredictable states)- Specified by:
clearin interfaceCollection<TimeseriesData>- Specified by:
clearin interfaceList<TimeseriesData>- Overrides:
clearin classArrayList<TimeseriesData>
-
getVariable
Description copied from interface:TimeseriesDataSetNote: Not always available (depending on the extraction)- Specified by:
getVariablein interfaceTimeseriesDataSet- Returns:
-
getMinStamp
- Specified by:
getMinStampin interfaceTimeseriesDataSet- Returns:
- - the smallest timestamp in the timeseries data set
-
getMaxStamp
- Specified by:
getMaxStampin interfaceTimeseriesDataSet- Returns:
- - the highest timestamp in the timeseries data set.
-
equals
- Specified by:
equalsin interfaceCollection<TimeseriesData>- Specified by:
equalsin interfaceList<TimeseriesData>- Overrides:
equalsin classArrayList<TimeseriesData>
-
canEqual
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<TimeseriesData>- Specified by:
hashCodein interfaceList<TimeseriesData>- Overrides:
hashCodein classArrayList<TimeseriesData>
-