Class CustomSetterSinkDataProcessorImpl

java.lang.Object
com.illumon.iris.importers.csv.CustomSetterSinkDataProcessorImpl
All Implemented Interfaces:
CustomSetterSinkDataProcessor

public class CustomSetterSinkDataProcessorImpl extends Object implements CustomSetterSinkDataProcessor
The implementation class for CustomSetterSinkDataProcessor. An instance of this class is created when a CustomSetter is found in the schema and set on all the ColumnSinks
  • Method Summary

    Modifier and Type
    Method
    Description
    The method is invoked from CustomSetterSinks to get the processed data The control will wait until all data is processed
    <DATA_TYPE>
    void
    publish(String columnName, DATA_TYPE[] values, int length, Class<DATA_TYPE> dataType)
    The publish method that allows ColumnSinks to publish their non-primitive data
    void
    publishBooleans(String columnName, Boolean[] values, int length)
    The publish method that allows ColumnSinks that are handling Boolean data type to publish data
    void
    publishBytes(String columnName, byte[] values, boolean[] isNull, int length)
    The publish method that allows ColumnSinks that are handling byte data type to publish data
    void
    publishChars(String columnName, char[] values, boolean[] isNull, int length)
    The publish method that allows ColumnSinks that are handling char data type to publish data
    void
    publishDoubles(String columnName, double[] values, boolean[] isNull, int length)
    The publish method that allows ColumnSinks that are handling double data type to publish data
    void
    publishFloats(String columnName, float[] values, boolean[] isNull, int length)
    The publish method that allows ColumnSinks that are handling float data type to publish data
    void
    publishInts(String columnName, int[] values, boolean[] isNull, int length)
    The publish method that allows ColumnSinks that are handling int data type to publish data
    void
    publishLongs(String columnName, long[] values, boolean[] isNull, int length)
    The publish method that allows ColumnSinks that are handling long data type to publish data
    void
    publishShorts(String columnName, short[] values, boolean[] isNull, int length)
    The publish method that allows ColumnSinks that are handling short data type to publish data
    int
    Expected to be invoked when the import is complete or terminated, necessary cleanup should be done

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • shutdown

      public int shutdown()
      Description copied from interface: CustomSetterSinkDataProcessor
      Expected to be invoked when the import is complete or terminated, necessary cleanup should be done
      Specified by:
      shutdown in interface CustomSetterSinkDataProcessor
      Returns:
      The count of columns that have not been processed yet in the event this is a forced termination
    • getAllColumnDataMap

      public Map<String,Object[]> getAllColumnDataMap(@NotNull String columnName)
      Description copied from interface: CustomSetterSinkDataProcessor
      The method is invoked from CustomSetterSinks to get the processed data The control will wait until all data is processed
      Specified by:
      getAllColumnDataMap in interface CustomSetterSinkDataProcessor
      Parameters:
      columnName - The invoking custom-setter column name
      Returns:
      Map of column name to data for that column represented as an array of (potentially boxed) Objects.
    • publishBytes

      public void publishBytes(@NotNull String columnName, @NotNull byte[] values, boolean[] isNull, int length)
      Description copied from interface: CustomSetterSinkDataProcessor
      The publish method that allows ColumnSinks that are handling byte data type to publish data

      The column name will be used to associate the data as well as used to confirm that column data has been received

      Specified by:
      publishBytes in interface CustomSetterSinkDataProcessor
      Parameters:
      columnName - The column name publishing the data
      values - The values for the column in this chunk
      isNull - A boolean array, with the same range of valid elements. A "true" value at position i means that src[i] should be ignored and the element should be considered as the "null value".
      length - The length of the values in the chunk
    • publishBooleans

      public void publishBooleans(@NotNull String columnName, @NotNull Boolean[] values, int length)
      Description copied from interface: CustomSetterSinkDataProcessor
      The publish method that allows ColumnSinks that are handling Boolean data type to publish data

      The column name will be used to associate the data as well as used to confirm that column data has been received

      Specified by:
      publishBooleans in interface CustomSetterSinkDataProcessor
      Parameters:
      columnName - The column name publishing the data
      values - The values for the column in this chunk
      length - The length of the values in the chunk
    • publishChars

      public void publishChars(@NotNull String columnName, @NotNull char[] values, boolean[] isNull, int length)
      Description copied from interface: CustomSetterSinkDataProcessor
      The publish method that allows ColumnSinks that are handling char data type to publish data

      The column name will be used to associate the data as well as used to confirm that column data has been received

      Specified by:
      publishChars in interface CustomSetterSinkDataProcessor
      Parameters:
      columnName - The column name publishing the data
      values - The values for the column in this chunk
      isNull - A boolean array, with the same range of valid elements. A "true" value at position i means that src[i] should be ignored and the element should be considered as the "null value".
      length - The length of the values in the chunk
    • publishDoubles

      public void publishDoubles(@NotNull String columnName, @NotNull double[] values, boolean[] isNull, int length)
      Description copied from interface: CustomSetterSinkDataProcessor
      The publish method that allows ColumnSinks that are handling double data type to publish data

      The column name will be used to associate the data as well as used to confirm that column data has been received

      Specified by:
      publishDoubles in interface CustomSetterSinkDataProcessor
      Parameters:
      columnName - The column name publishing the data
      values - The values for the column in this chunk
      isNull - A boolean array, with the same range of valid elements. A "true" value at position i means that src[i] should be ignored and the element should be considered as the "null value".
      length - The length of the values in the chunk
    • publishFloats

      public void publishFloats(@NotNull String columnName, @NotNull float[] values, boolean[] isNull, int length)
      Description copied from interface: CustomSetterSinkDataProcessor
      The publish method that allows ColumnSinks that are handling float data type to publish data

      The column name will be used to associate the data as well as used to confirm that column data has been received

      Specified by:
      publishFloats in interface CustomSetterSinkDataProcessor
      Parameters:
      columnName - The column name publishing the data
      values - The values for the column in this chunk
      isNull - A boolean array, with the same range of valid elements. A "true" value at position i means that src[i] should be ignored and the element should be considered as the "null value".
      length - The length of the values in the chunk
    • publishInts

      public void publishInts(@NotNull String columnName, @NotNull int[] values, boolean[] isNull, int length)
      Description copied from interface: CustomSetterSinkDataProcessor
      The publish method that allows ColumnSinks that are handling int data type to publish data

      The column name will be used to associate the data as well as used to confirm that column data has been received

      Specified by:
      publishInts in interface CustomSetterSinkDataProcessor
      Parameters:
      columnName - The column name publishing the data
      values - The values for the column in this chunk
      isNull - A boolean array, with the same range of valid elements. A "true" value at position i means that src[i] should be ignored and the element should be considered as the "null value".
      length - The length of the values in the chunk
    • publishLongs

      public void publishLongs(@NotNull String columnName, @NotNull long[] values, boolean[] isNull, int length)
      Description copied from interface: CustomSetterSinkDataProcessor
      The publish method that allows ColumnSinks that are handling long data type to publish data

      The column name will be used to associate the data as well as used to confirm that column data has been received

      Specified by:
      publishLongs in interface CustomSetterSinkDataProcessor
      Parameters:
      columnName - The column name publishing the data
      values - The values for the column in this chunk
      isNull - A boolean array, with the same range of valid elements. A "true" value at position i means that src[i] should be ignored and the element should be considered as the "null value".
      length - The length of the values in the chunk
    • publishShorts

      public void publishShorts(@NotNull String columnName, @NotNull short[] values, boolean[] isNull, int length)
      Description copied from interface: CustomSetterSinkDataProcessor
      The publish method that allows ColumnSinks that are handling short data type to publish data

      The column name will be used to associate the data as well as used to confirm that column data has been received

      Specified by:
      publishShorts in interface CustomSetterSinkDataProcessor
      Parameters:
      columnName - The column name publishing the data
      values - The values for the column in this chunk
      isNull - A boolean array, with the same range of valid elements. A "true" value at position i means that src[i] should be ignored and the element should be considered as the "null value".
      length - The length of the values in the chunk
    • publish

      public <DATA_TYPE> void publish(@NotNull String columnName, @NotNull DATA_TYPE[] values, int length, Class<DATA_TYPE> dataType)
      Description copied from interface: CustomSetterSinkDataProcessor
      The publish method that allows ColumnSinks to publish their non-primitive data

      The column name will be used to associate the data as well as used to confirm that column data has been received

      Specified by:
      publish in interface CustomSetterSinkDataProcessor
      Type Parameters:
      DATA_TYPE - This is the type of data for the column publishing the data
      Parameters:
      columnName - The column name publishing the data
      values - The values for the column in this chunk
      length - The length of the values in the chunk
      dataType - The data type of the data