Interface PointCollector
-
public interface PointCollectorUsed to collect time series data points generated byUDTF.transform(Row, PointCollector),UDTF.transform(RowWindow, PointCollector)orUDTF.terminate(PointCollector). Notice that one timestamp can not be put in the PointCollector more than once, or it may stop the calculation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidputBinary(long timestamp, Binary value)Collects a Binary data point with timestamp.voidputBoolean(long timestamp, boolean value)Collects a boolean data point with timestamp.voidputDouble(long timestamp, double value)Collects a double data point with timestamp.voidputFloat(long timestamp, float value)Collects a float data point with timestamp.voidputInt(long timestamp, int value)Collects an int data point with timestamp.voidputLong(long timestamp, long value)Collects a long data point with timestamp.voidputString(long timestamp, java.lang.String value)Collects a String data point with timestamp.
-
-
-
Method Detail
-
putInt
void putInt(long timestamp, int value) throws java.io.IOExceptionCollects an int data point with timestamp.Before calling this method, you need to ensure that the UDF output data type is set to
Type.INT32by callingUDTFConfigurations.setOutputDataType(Type)inUDTF.beforeStart(UDFParameters, UDTFConfigurations).- Parameters:
timestamp- timestamp to collectvalue- int value to collect- Throws:
java.io.IOException- if any I/O errors occur- See Also:
Type
-
putLong
void putLong(long timestamp, long value) throws java.io.IOExceptionCollects a long data point with timestamp.Before calling this method, you need to ensure that the UDF output data type is set to
Type.INT64by callingUDTFConfigurations.setOutputDataType(Type)inUDTF.beforeStart(UDFParameters, UDTFConfigurations).- Parameters:
timestamp- timestamp to collectvalue- long value to collect- Throws:
java.io.IOException- if any I/O errors occur- See Also:
Type
-
putFloat
void putFloat(long timestamp, float value) throws java.io.IOExceptionCollects a float data point with timestamp.Before calling this method, you need to ensure that the UDF output data type is set to
TSDataType.FLOATby callingUDTFConfigurations.setOutputDataType(Type)inUDTF.beforeStart(UDFParameters, UDTFConfigurations).- Parameters:
timestamp- timestamp to collectvalue- float value to collect- Throws:
java.io.IOException- if any I/O errors occur- See Also:
Type
-
putDouble
void putDouble(long timestamp, double value) throws java.io.IOExceptionCollects a double data point with timestamp.Before calling this method, you need to ensure that the UDF output data type is set to
TSDataType.DOUBLEby callingUDTFConfigurations.setOutputDataType(Type)inUDTF.beforeStart(UDFParameters, UDTFConfigurations).- Parameters:
timestamp- timestamp to collectvalue- double value to collect- Throws:
java.io.IOException- if any I/O errors occur- See Also:
Type
-
putBoolean
void putBoolean(long timestamp, boolean value) throws java.io.IOExceptionCollects a boolean data point with timestamp.Before calling this method, you need to ensure that the UDF output data type is set to
TSDataType.BOOLEANby callingUDTFConfigurations.setOutputDataType(Type)inUDTF.beforeStart(UDFParameters, UDTFConfigurations).- Parameters:
timestamp- timestamp to collectvalue- boolean value to collect- Throws:
java.io.IOException- if any I/O errors occur- See Also:
Type
-
putBinary
void putBinary(long timestamp, Binary value) throws java.io.IOExceptionCollects a Binary data point with timestamp.Before calling this method, you need to ensure that the UDF output data type is set to
Type.TEXTby callingUDTFConfigurations.setOutputDataType(Type)inUDTF.beforeStart(UDFParameters, UDTFConfigurations).- Parameters:
timestamp- timestamp to collectvalue- Binary value to collect- Throws:
java.io.IOException- if any I/O errors occurjava.lang.RuntimeException- if memory is not enough to continue collecting data points- See Also:
Type
-
putString
void putString(long timestamp, java.lang.String value) throws java.io.IOExceptionCollects a String data point with timestamp.Before calling this method, you need to ensure that the UDF output data type is set to
Type.TEXTby callingUDTFConfigurations.setOutputDataType(Type)inUDTF.beforeStart(UDFParameters, UDTFConfigurations).- Parameters:
timestamp- timestamp to collectvalue- String value to collect- Throws:
java.io.IOException- if any I/O errors occurjava.lang.RuntimeException- if memory is not enough to continue collecting data points- See Also:
Type
-
-