Package io.trino.plugin.hive
Class HiveUpdatablePageSource
- java.lang.Object
-
- io.trino.plugin.hive.AbstractHiveAcidWriters
-
- io.trino.plugin.hive.HiveUpdatablePageSource
-
- All Implemented Interfaces:
ConnectorPageSource,UpdatablePageSource,Closeable,AutoCloseable
public class HiveUpdatablePageSource extends AbstractHiveAcidWriters implements UpdatablePageSource
-
-
Field Summary
Fields Modifier and Type Field Description static intACID_ROW_STRUCT_COLUMN_IDstatic intBUCKET_CHANNELstatic intORIGINAL_TRANSACTION_CHANNELstatic intROW_CHANNELstatic intROW_ID_CHANNEL-
Fields inherited from class io.trino.plugin.hive.AbstractHiveAcidWriters
BASE_PATH_MATCHER, BUCKET_PATH_MATCHER, bucketNumber, DELETE_OPERATION_BLOCK, deleteDeltaDirectory, deleteFileWriter, deltaDirectory, hiveRowType, INSERT_OPERATION_BLOCK, insertFileWriter, ORIGINAL_FILE_PATH_MATCHER, session, statementId, transaction
-
Fields inherited from interface io.trino.spi.connector.ConnectorPageSource
NOT_BLOCKED
-
-
Constructor Summary
Constructors Constructor Description HiveUpdatablePageSource(HiveTableHandle hiveTableHandle, String partitionName, int statementId, ConnectorPageSource hivePageSource, TypeManager typeManager, OptionalInt bucketNumber, org.apache.hadoop.fs.Path bucketPath, boolean originalFile, OrcFileWriterFactory orcFileWriterFactory, org.apache.hadoop.conf.Configuration configuration, ConnectorSession session, HiveType hiveRowType, List<HiveColumnHandle> dependencyColumns, AcidOperation updateKind, long initialRowId, long maxNumberOfRowsPerSplit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voiddeleteRows(Block rowIds)CompletableFuture<Collection<io.airlift.slice.Slice>>finish()longgetCompletedBytes()PagegetNextPage()longgetReadTimeNanos()longgetSystemMemoryUsage()booleanisFinished()voidupdateRows(Page page, List<Integer> columnValueAndRowIdChannels)-
Methods inherited from class io.trino.plugin.hive.AbstractHiveAcidWriters
lazyInitializeDeleteFileWriter, lazyInitializeInsertFileWriter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.trino.spi.connector.ConnectorPageSource
getCompletedPositions, getMetrics, isBlocked
-
Methods inherited from interface io.trino.spi.connector.UpdatablePageSource
abort
-
-
-
-
Field Detail
-
ORIGINAL_TRANSACTION_CHANNEL
public static final int ORIGINAL_TRANSACTION_CHANNEL
- See Also:
- Constant Field Values
-
BUCKET_CHANNEL
public static final int BUCKET_CHANNEL
- See Also:
- Constant Field Values
-
ROW_ID_CHANNEL
public static final int ROW_ID_CHANNEL
- See Also:
- Constant Field Values
-
ROW_CHANNEL
public static final int ROW_CHANNEL
- See Also:
- Constant Field Values
-
ACID_ROW_STRUCT_COLUMN_ID
public static final int ACID_ROW_STRUCT_COLUMN_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HiveUpdatablePageSource
public HiveUpdatablePageSource(HiveTableHandle hiveTableHandle, String partitionName, int statementId, ConnectorPageSource hivePageSource, TypeManager typeManager, OptionalInt bucketNumber, org.apache.hadoop.fs.Path bucketPath, boolean originalFile, OrcFileWriterFactory orcFileWriterFactory, org.apache.hadoop.conf.Configuration configuration, ConnectorSession session, HiveType hiveRowType, List<HiveColumnHandle> dependencyColumns, AcidOperation updateKind, long initialRowId, long maxNumberOfRowsPerSplit)
-
-
Method Detail
-
deleteRows
public void deleteRows(Block rowIds)
- Specified by:
deleteRowsin interfaceUpdatablePageSource
-
updateRows
public void updateRows(Page page, List<Integer> columnValueAndRowIdChannels)
- Specified by:
updateRowsin interfaceUpdatablePageSource
-
finish
public CompletableFuture<Collection<io.airlift.slice.Slice>> finish()
- Specified by:
finishin interfaceUpdatablePageSource
-
getCompletedBytes
public long getCompletedBytes()
- Specified by:
getCompletedBytesin interfaceConnectorPageSource
-
getReadTimeNanos
public long getReadTimeNanos()
- Specified by:
getReadTimeNanosin interfaceConnectorPageSource
-
isFinished
public boolean isFinished()
- Specified by:
isFinishedin interfaceConnectorPageSource
-
getNextPage
public Page getNextPage()
- Specified by:
getNextPagein interfaceConnectorPageSource
-
getSystemMemoryUsage
public long getSystemMemoryUsage()
- Specified by:
getSystemMemoryUsagein interfaceConnectorPageSource
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceConnectorPageSource
-
-