Class AccumuloPageSink

  • All Implemented Interfaces:
    ConnectorPageSink

    public class AccumuloPageSink
    extends Object
    implements ConnectorPageSink
    Output class for serializing Trino pages (blocks of rows of data) to Accumulo. This class converts the rows from within a page to a collection of Accumulo Mutations, writing and indexed the rows. Writers are flushed and closed on commit, and if a rollback occurs... we'll you're gonna have a bad time.
    See Also:
    AccumuloPageSinkProvider
    • Field Detail

      • ROW_ID_COLUMN

        public static final org.apache.hadoop.io.Text ROW_ID_COLUMN
    • Constructor Detail

      • AccumuloPageSink

        public AccumuloPageSink​(org.apache.accumulo.core.client.Connector connector,
                                AccumuloTable table,
                                String username)
    • Method Detail

      • toMutation

        public static org.apache.accumulo.core.data.Mutation toMutation​(Row row,
                                                                        int rowIdOrdinal,
                                                                        List<AccumuloColumnHandle> columns,
                                                                        AccumuloRowSerializer serializer)
        Converts a Row to an Accumulo mutation.
        Parameters:
        row - Row object
        rowIdOrdinal - Ordinal in the list of columns that is the row ID. This isn't checked at all, so I hope you're right. Also, it is expected that the list of column handles is sorted in ordinal order. This is a very demanding function.
        columns - All column handles for the Row, sorted by ordinal.
        serializer - Instance of AccumuloRowSerializer used to encode the values of the row to the Mutation
        Returns:
        Mutation