Interface PointCollector

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void putBinary​(long timestamp, Binary value)
      Collects a Binary data point with timestamp.
      void putBoolean​(long timestamp, boolean value)
      Collects a boolean data point with timestamp.
      void putDouble​(long timestamp, double value)
      Collects a double data point with timestamp.
      void putFloat​(long timestamp, float value)
      Collects a float data point with timestamp.
      void putInt​(long timestamp, int value)
      Collects an int data point with timestamp.
      void putLong​(long timestamp, long value)
      Collects a long data point with timestamp.
      void putString​(long timestamp, java.lang.String value)
      Collects a String data point with timestamp.
    • Method Detail

      • putFloat

        void putFloat​(long timestamp,
                      float value)
               throws java.io.IOException
        Collects a float data point with timestamp.

        Before calling this method, you need to ensure that the UDF output data type is set to TSDataType.FLOAT by calling UDTFConfigurations.setOutputDataType(Type) in UDTF.beforeStart(UDFParameters, UDTFConfigurations).

        Parameters:
        timestamp - timestamp to collect
        value - 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.IOException
        Collects a double data point with timestamp.

        Before calling this method, you need to ensure that the UDF output data type is set to TSDataType.DOUBLE by calling UDTFConfigurations.setOutputDataType(Type) in UDTF.beforeStart(UDFParameters, UDTFConfigurations).

        Parameters:
        timestamp - timestamp to collect
        value - 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.IOException
        Collects a boolean data point with timestamp.

        Before calling this method, you need to ensure that the UDF output data type is set to TSDataType.BOOLEAN by calling UDTFConfigurations.setOutputDataType(Type) in UDTF.beforeStart(UDFParameters, UDTFConfigurations).

        Parameters:
        timestamp - timestamp to collect
        value - 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.IOException
        Collects a Binary data point with timestamp.

        Before calling this method, you need to ensure that the UDF output data type is set to Type.TEXT by calling UDTFConfigurations.setOutputDataType(Type) in UDTF.beforeStart(UDFParameters, UDTFConfigurations).

        Parameters:
        timestamp - timestamp to collect
        value - Binary value to collect
        Throws:
        java.io.IOException - if any I/O errors occur
        java.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.IOException
        Collects a String data point with timestamp.

        Before calling this method, you need to ensure that the UDF output data type is set to Type.TEXT by calling UDTFConfigurations.setOutputDataType(Type) in UDTF.beforeStart(UDFParameters, UDTFConfigurations).

        Parameters:
        timestamp - timestamp to collect
        value - String value to collect
        Throws:
        java.io.IOException - if any I/O errors occur
        java.lang.RuntimeException - if memory is not enough to continue collecting data points
        See Also:
        Type