name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
hudi_HoodieTable_validateSchema_rdh
/** * Ensure that the current writerSchema is compatible with the latest schema of this dataset. * * When inserting/updating data, we read records using the last used schema and convert them to the * GenericRecords with writerSchema. Hence, we need to ensure that this conversion can take place without errors. */pr...
3.26
hudi_HoodieTable_getIndex_rdh
/** * Return the index. */ public HoodieIndex<?, ?> getIndex() { return index; }
3.26
hudi_HoodieTable_getIndexingMetadataWriter_rdh
/** * Gets the metadata writer for async indexer. * * @param triggeringInstantTimestamp * The instant that is triggering this metadata write. * @return An instance of {@link HoodieTableMetadataWriter}. */ public Option<HoodieTableMetadataWriter> getIndexingMetadataWriter(String triggeringInstantTimestamp) { ...
3.26
hudi_HoodieTable_clearMetadataTablePartitionsConfig_rdh
/** * Clears hoodie.table.metadata.partitions in hoodie.properties */ private void clearMetadataTablePartitionsConfig(Option<MetadataPartitionType> partitionType, boolean clearAll) { Set<String> partitions = metaClient.getTableConfig().getMetadataPartitions(); if (clearAll && (partitions.size() > 0)) { ...
3.26
hudi_HoodieTable_getBaseFileOnlyView_rdh
/** * Get the base file only view of the file system for this table. */ public BaseFileOnlyView getBaseFileOnlyView() { return getViewManager().getFileSystemView(metaClient); }
3.26
hudi_HoodieTable_rollbackInflightCompaction_rdh
/** * Rollback failed compactions. Inflight rollbacks for compactions revert the .inflight file * to the .requested file. * * @param inflightInstant * Inflight Compaction Instant */ public void rollbackInflightCompaction(HoodieInstant inflightInstant, Function<String, Option<HoodiePendingRollbackInfo>> getPend...
3.26
hudi_HoodieTable_m4_rdh
/** * Finalize the written data onto storage. Perform any final cleanups. * * @param context * HoodieEngineContext * @param stats * List of HoodieWriteStats * @throws HoodieIOException * if some paths can't be finalized on storage */public void m4(HoodieEngineContext context, String instantTs, List<Hood...
3.26
hudi_HoodieTable_logCompact_rdh
/** * Run Log Compaction on the table. Log Compaction arranges the data so that it is optimized for data access. * * @param context * HoodieEngineContext * @param logCompactionInstantTime * Instant Time */ public HoodieWriteMetadata<O> logCompact(HoodieEngineContext context, String logCompactionInstantTime...
3.26
hudi_HoodieTable_reconcileAgainstMarkers_rdh
/** * Reconciles WriteStats and marker files to detect and safely delete duplicate data files created because of Spark * retries. * * @param context * HoodieEngineContext * @param instantTs * Instant Timestamp * @param stats * Hoodie Write Stat * @param consistencyCheckEnabled * Consistency Check Ena...
3.26
hudi_HoodieTable_getSliceView_rdh
/** * Get the full view of the file system for this table. */ public SliceView getSliceView() { return getViewManager().getFileSystemView(metaClient); }
3.26
hudi_HoodieTable_getCleanTimeline_rdh
/** * Get clean timeline. */ public HoodieTimeline getCleanTimeline() { return getActiveTimeline().getCleanerTimeline(); }
3.26
hudi_HoodieTable_rollbackInflightInstant_rdh
/** * Rollback inflight instant to requested instant * * @param inflightInstant * Inflight instant * @param getPendingRollbackInstantFunc * Function to get rollback instant */ private void rollbackInflightInstant(HoodieInstant inflightInstant, Function<String, Option<HoodiePendingRollbackInfo>> getPendingRol...
3.26
hudi_HoodieTable_getCompletedCommitsTimeline_rdh
/** * Get only the completed (no-inflights) commit + deltacommit timeline. */ public HoodieTimeline getCompletedCommitsTimeline() { return metaClient.getCommitsTimeline().filterCompletedInstants(); }
3.26
hudi_HoodieTable_getSavepointTimestamps_rdh
/** * Get the list of savepoint timestamps in this table. */ public Set<String> getSavepointTimestamps() { return m3().getInstantsAsStream().map(HoodieInstant::getTimestamp).collect(Collectors.toSet()); }
3.26
hudi_HoodieTable_deleteMetadataIndexIfNecessary_rdh
/** * Deletes the metadata partition if the writer disables any metadata index. */ public void deleteMetadataIndexIfNecessary() { Stream.of(MetadataPartitionType.values()).forEach(partitionType -> { if (shouldDeleteMetadataPartition(partitionType)) { try {LOG.info...
3.26
hudi_HoodieTable_getHoodieView_rdh
/** * Get complete view of the file system for this table with ability to force sync. */ public SyncableFileSystemView getHoodieView() { return getViewManager().getFileSystemView(metaClient); }
3.26
hudi_HoodieTable_getConsistencyGuard_rdh
/** * Instantiate {@link ConsistencyGuard} based on configs. * <p> * Default consistencyGuard class is {@link OptimisticConsistencyGuard}. */ public static ConsistencyGuard getConsistencyGuard(FileSystem fs, ConsistencyGuardConfig consistencyGuardConfig) throws IOException { try { return consistencyGu...
3.26
hudi_HoodieTable_getPendingCommitTimeline_rdh
/** * Get only the inflights (no-completed) commit timeline. */ public HoodieTimeline getPendingCommitTimeline() { return metaClient.getCommitsTimeline().filterPendingExcludingMajorAndMinorCompaction(); }
3.26
hudi_HoodieTable_isPartitioned_rdh
/** * * @return if the table is physically partitioned, based on the partition fields stored in the table config. */ public boolean isPartitioned() { return getMetaClient().getTableConfig().isTablePartitioned(); }
3.26
hudi_GenericRecordPartialPayloadGenerator_validate_rdh
// Atleast 1 entry should be null private boolean validate(Object object) { if (object == null) { return true; } else if (object instanceof GenericRecord) {for (Schema.Field field : ((GenericRecord) (object)).getSchema().getFields()) { boolean ret = ...
3.26
hudi_ThreadUtils_collectActiveThreads_rdh
/** * Fetches all active threads currently running in the JVM */ public static List<Thread> collectActiveThreads() { ThreadGroup threadGroup = Thread.currentThread().getThreadGroup(); while (threadGroup.getParent() != null) { threadGroup = threadGroup.getParent(); } Thread[] activeThrea...
3.26
hudi_ClusteringTask_newBuilder_rdh
/** * Utility to create builder for {@link ClusteringTask}. * * @return Builder for {@link ClusteringTask}. */ public static Builder newBuilder() { return new Builder(); }
3.26
hudi_HoodieRowDataFileWriterFactory_getRowDataFileWriter_rdh
/** * Factory method to assist in instantiating an instance of {@link HoodieRowDataFileWriter}. * * @param path * path of the RowFileWriter. * @param hoodieTable * instance of {@link HoodieTable} in use. * @param config * instance of {@link HoodieWriteConfig} to use. * @param schema * schema of the da...
3.26
hudi_IOUtils_getMaxMemoryAllowedForMerge_rdh
/** * Dynamic calculation of max memory to use for spillable map. There is always more than one task * running on an executor and each task maintains a spillable map. * user.available.memory = executor.memory * (1 - memory.fraction) * spillable.available.memory = user.available.memory * hoodie.memory.fraction / exe...
3.26
hudi_HoodieJavaRDD_of_rdh
/** * * @param data * a {@link List} of objects in type T. * @param context * {@link HoodieSparkEngineContext} to use. * @param parallelism * parallelism for the {@link JavaRDD<T>}. * @param <T> * type of object. * @return a new instance containing the {@link JavaRDD<T>} instance. */public static <T>...
3.26
hudi_HoodieJavaRDD_getJavaRDD_rdh
/** * * @param hoodieData * {@link HoodieJavaRDD <T>} instance containing the {@link JavaRDD} of objects. * @param <T> * type of object. * @return the a {@link JavaRDD} of objects in type T. */ public static <T> JavaRDD<T> getJavaRDD(HoodieData<T> hoodieData) { return ((HoodieJavaRDD<T>) (hoodieData)...
3.26
hudi_HoodieMetaSyncOperations_addPartitionsToTable_rdh
/** * Add partitions to the table in metastore. */ default void addPartitionsToTable(String tableName, List<String> partitionsToAdd) { }
3.26
hudi_HoodieMetaSyncOperations_dropTable_rdh
/** * Drop table from metastore. */ default void dropTable(String tableName) { }
3.26
hudi_HoodieMetaSyncOperations_updateTableSchema_rdh
/** * Update schema for the table in the metastore. */ default void updateTableSchema(String tableName, MessageType newSchema) { }
3.26
hudi_HoodieMetaSyncOperations_getPartitionsByFilter_rdh
/** * Get the metadata of partitions that belong to the specified table * * @param tableName * @return */ default List<Partition> getPartitionsByFilter(String tableName, String filter) { return Collections.emptyList(); }
3.26
hudi_HoodieMetaSyncOperations_updateTableComments_rdh
/** * Update the field comments for table in metastore, by using the ones from storage. * * @return */ default boolean updateTableComments(String tableName, List<FieldSchema> fromMetastore, List<FieldSchema> fromStorage) { return false; }
3.26
hudi_HoodieMetaSyncOperations_updateTableProperties_rdh
/** * Update the table properties in metastore. * * @return true if properties updated. */ default boolean updateTableProperties(String tableName, Map<String, String> tableProperties) { return false; }
3.26
hudi_HoodieMetaSyncOperations_getMetastoreFieldSchemas_rdh
/** * Get the list of field schemas from metastore. */ default List<FieldSchema> getMetastoreFieldSchemas(String tableName) { return Collections.emptyList(); }
3.26
hudi_HoodieMetaSyncOperations_getLastReplicatedTime_rdh
/** * Get the timestamp of last replication. */ default Option<String> getLastReplicatedTime(String tableName) { return Option.empty(); }
3.26
hudi_HoodieMetaSyncOperations_getLastCommitCompletionTimeSynced_rdh
/** * Get the commit completion time of last sync */ default Option<String> getLastCommitCompletionTimeSynced(String tableName) { return Option.empty(); }
3.26
hudi_HoodieMetaSyncOperations_createDatabase_rdh
/** * Create a database in the metastore. */ default void createDatabase(String databaseName) { }
3.26
hudi_HoodieMetaSyncOperations_updatePartitionsToTable_rdh
/** * Update partitions to the table in metastore. */ default void updatePartitionsToTable(String tableName, List<String> changedPartitions) { }
3.26
hudi_HoodieMetaSyncOperations_dropPartitions_rdh
/** * Drop partitions from the table in metastore. */ default void dropPartitions(String tableName, List<String> partitionsToDrop) { }
3.26
hudi_HoodieMetaSyncOperations_getMetastoreSchema_rdh
/** * Get the schema from metastore. */ default Map<String, String> getMetastoreSchema(String tableName) { return Collections.emptyMap(); }
3.26
hudi_HoodieMetaSyncOperations_updateSerdeProperties_rdh
/** * Update the SerDe properties in metastore. * * @return true if properties updated. */ default boolean updateSerdeProperties(String tableName, Map<String, String> serdeProperties, boolean useRealtimeFormat) { return false; }
3.26
hudi_HoodieMetaSyncOperations_updateLastCommitTimeSynced_rdh
/** * Update the timestamp of last sync. */ default void updateLastCommitTimeSynced(String tableName) { }
3.26
hudi_HoodieMetaSyncOperations_getAllPartitions_rdh
/** * Get all partitions for the table in the metastore. */ default List<Partition> getAllPartitions(String tableName) { return Collections.emptyList(); }
3.26
hudi_HoodieMetaSyncOperations_tableExists_rdh
/** * Check if table exists in metastore. */ default boolean tableExists(String tableName) { return false; }
3.26
hudi_HoodieMetaSyncOperations_deleteLastReplicatedTimeStamp_rdh
/** * Delete the timestamp of last replication. */ default void deleteLastReplicatedTimeStamp(String tableName) { }
3.26
hudi_HoodieMetaSyncOperations_databaseExists_rdh
/** * Check if a database already exists in the metastore. */ default boolean databaseExists(String databaseName) { return false;}
3.26
hudi_HoodieMetaSyncOperations_getLastCommitTimeSynced_rdh
/** * Get the timestamp of last sync. */ default Option<String> getLastCommitTimeSynced(String tableName) { return Option.empty();}
3.26
hudi_HoodieMetaSyncOperations_createTable_rdh
/** * Create the table. * * @param tableName * The table name. * @param storageSchema * The table schema. * @param inputFormatClass * The input format class of this table. * @param outputFormatClass * The output format class of this table. * @param serdeClass * The serde class of this table. * @p...
3.26
hudi_HoodieMetaSyncOperations_updateLastReplicatedTimeStamp_rdh
/** * Update the timestamp of last replication. */ default void updateLastReplicatedTimeStamp(String tableName, String timeStamp) { }
3.26
hudi_HoodieMetaSyncOperations_getStorageSchema_rdh
/** * Get the schema from the Hudi table on storage. * * @param includeMetadataField * true if to include metadata fields in the schema */ default MessageType getStorageSchema(boolean includeMetadataField) { return null; }
3.26
hudi_HoodieAvroPayload_getRecordBytes_rdh
// for examples public byte[] getRecordBytes() { return recordBytes; }
3.26
hudi_TableHeader_addTableHeaderFields_rdh
/** * Add fields from another {@link TableHeader} instance. * * @param tableHeader * {@link TableHeader} instance. */ public TableHeader addTableHeaderFields(TableHeader tableHeader) { fieldNames.addAll(tableHeader.getFieldNames()); return this; }
3.26
hudi_TableHeader_get_rdh
/** * Lookup field by offset. */ public String get(int index) { return fieldNames.get(index); }
3.26
hudi_TableHeader_indexOf_rdh
/** * Index of the field in the table. * * @param fieldName * Field Name */ public int indexOf(String fieldName) { return fieldNames.indexOf(fieldName); }
3.26
hudi_TableHeader_addTableHeaderField_rdh
/** * Add a field (column) to table. * * @param fieldName * field Name */public TableHeader addTableHeaderField(String fieldName) { fieldNames.add(fieldName); return this; }
3.26
hudi_TableHeader_getNumFields_rdh
/** * Get number of fields in the table. */ public int getNumFields() { return fieldNames.size(); }
3.26
hudi_TableHeader_getFieldNames_rdh
/** * Get all field names. */ public List<String> getFieldNames() { return fieldNames; }
3.26
hudi_TimelineServerBasedWriteMarkers_executeCreateMarkerRequest_rdh
/** * Executes marker creation request with specific parameters. * * @param paramsMap * Parameters to be included in the marker request. * @param partitionPath * Relative partition path. * @param markerFileName * Marker file name. * @return {@code true} if successful; {@code false} otherwise. */ private...
3.26
hudi_TimelineServerBasedWriteMarkers_m0_rdh
/** * Gets parameter map for marker creation request. * * @param partitionPath * Relative partition path. * @param markerFileName * Marker file name. * @return parameter map. */ private Map<String, String> m0(String partitionPath, String markerFileName, boolean initEarlyConflictDetectionConfigs) { Map<S...
3.26
hudi_InternalSchemaCache_getInternalSchemaAndAvroSchemaForClusteringAndCompaction_rdh
/** * Get internalSchema and avroSchema for compaction/cluster operation. * * @param metaClient * current hoodie metaClient * @param compactionAndClusteringInstant * first instant before current compaction/cluster instant * @return (internalSchemaStrOpt, avroSchemaStrOpt) a pair of InternalSchema/avroSchema ...
3.26
hudi_InternalSchemaCache_searchSchemaAndCache_rdh
/** * Search internalSchema based on versionID. * first step: try to get internalSchema from hoodie commit files, we no need to add lock. * if we cannot get internalSchema by first step, then we try to get internalSchema from cache. * * @param versionID * schema version_id need to search * @param metaClient *...
3.26
hudi_InternalSchemaCache_getInternalSchemaByVersionId_rdh
/** * Give a schema versionId return its internalSchema. * This method will be called by spark tasks, we should minimize time cost. * We try our best to not use metaClient, since the initialization of metaClient is time cost * step1: * try to parser internalSchema from HoodieInstant directly * step2: * if we can...
3.26
hudi_BaseHoodieLogRecordReader_reconcileSpuriousBlocksAndGetValidOnes_rdh
/** * There could be spurious log blocks due to spark task retries. So, we will use BLOCK_SEQUENCE_NUMBER in the log block header to deduce such spurious log blocks and return * a deduped set of log blocks. * * @param allValidLogBlocks * all valid log blocks parsed so far. * @param blockSequenceMapPerCommit * ...
3.26
hudi_BaseHoodieLogRecordReader_getProgress_rdh
/** * Return progress of scanning as a float between 0.0 to 1.0. */ public float getProgress() { return progress;}
3.26
hudi_BaseHoodieLogRecordReader_isNewInstantBlock_rdh
/** * Checks if the current logblock belongs to a later instant. */ private boolean isNewInstantBlock(HoodieLogBlock logBlock) { return ((currentInstantLogBlocks.size() > 0) && (currentInstantLogBlocks.peek().getBlockType() != CORRUPT_BLOCK)) && (!logBlock.getLogBlockHeader().get(INSTANT_TIME).contentEquals(currentIn...
3.26
hudi_BaseHoodieLogRecordReader_scanInternal_rdh
/** * * @param keySpecOpt * specifies target set of keys to be scanned * @param skipProcessingBlocks * controls, whether (delta) blocks have to actually be processed */ protected final void scanInternal(Option<KeySpec> keySpecOpt, boolean skipProcessingBlocks) { synchr...
3.26
hudi_BaseHoodieLogRecordReader_updateBlockSequenceTracker_rdh
/** * Updates map tracking block seq no. * Here is the map structure. * Map<String, Map<Long, List<Pair<Integer, HoodieLogBlock>>>> blockSequenceMapPerCommit * Key: Commit time. * Value: Map<Long, List<Pair<Integer, HoodieLogBlock>>>> * Value refers to a Map of different attempts for the commit of interest. List ...
3.26
hudi_BaseHoodieLogRecordReader_processQueuedBlocksForInstant_rdh
/** * Process the set of log blocks belonging to the last instant which is read fully. */ private void processQueuedBlocksForInstant(Deque<HoodieLogBlock> logBlocks, int numLogFilesSeen, Option<KeySpec> keySpecOpt) throws Exception {while (!logBlocks.isEmpty()) { LOG.info("Number of remaining logblocks to merge " + l...
3.26
hudi_AvroSchemaCompatibility_objectsEqual_rdh
/** * Borrowed from Guava's Objects.equal(a, b) */ private static boolean objectsEqual(Object obj1, Object obj2) { return Objects.equals(obj1, obj2); }
3.26
hudi_AvroSchemaCompatibility_getReader_rdh
/** * Gets the reader schema that was validated. * * @return reader schema that was validated. */ public Schema getReader() { return mReader; }
3.26
hudi_AvroSchemaCompatibility_getReaderFragment_rdh
/** * Returns the fragment of the reader schema that failed compatibility check. * * @return a Schema instance (fragment of the reader schema). */ public Schema getReaderFragment() { return mReaderFragment; }
3.26
hudi_AvroSchemaCompatibility_checkReaderWriterCompatibility_rdh
/** * Validates that the provided reader schema can be used to decode avro data * written with the provided writer schema. * * @param reader * schema to check. * @param writer * schema to check. * @return a result object identifying any compatibility errors. */ public static SchemaPairCompatibility checkRe...
3.26
hudi_AvroSchemaCompatibility_calculateCompatibility_rdh
/** * Calculates the compatibility of a reader/writer schema pair. * * <p> * Relies on external memoization performed by * {@link #getCompatibility(Schema, Schema)}. * </p> * * @param reader * Reader schema to test. * @param writer * Writer schema to test. * @param locations * Stack with which to tra...
3.26
hudi_AvroSchemaCompatibility_lookupWriterField_rdh
/** * Identifies the writer field that corresponds to the specified reader field. * * <p> * Matching includes reader name aliases. * </p> * * @param writerSchema * Schema of the record where to look for the writer field. * @param readerField * Reader field to identify the corresponding writer field * o...
3.26
hudi_AvroSchemaCompatibility_getMessage_rdh
/** * Returns a human-readable message with more details about what failed. Syntax * depends on the SchemaIncompatibilityType. * * @return a String with details about the incompatibility. * @see #getType() */ public String getMessage() {return mMessage; }
3.26
hudi_AvroSchemaCompatibility_m2_rdh
/** * {@inheritDoc } */ @Override public String m2() { return String.format("SchemaCompatibilityResult{compatibility:%s, incompatibilities:%s}", mCompatibilityType, mIncompatibilities); }
3.26
hudi_AvroSchemaCompatibility_getLocation_rdh
/** * Returns a * <a href="https://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-08">JSON * Pointer</a> describing the node location within the schema's JSON document * tree where the incompatibility was encountered. ...
3.26
hudi_AvroSchemaCompatibility_equals_rdh
/** * {@inheritDoc } */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } ...
3.26
hudi_AvroSchemaCompatibility_schemaNameEquals_rdh
// ----------------------------------------------------------------------------------------------- /** * Tests the equality of two Avro named schemas. * * <p> * Matching includes reader name aliases. * </p> * * @param reader * Named reader schema. * @param writer * Named writer schema. * @return whether ...
3.26
hudi_AvroSchemaCompatibility_toString_rdh
/** * {@inheritDoc } */@Override public String toString() { return String.format("SchemaPairCompatibility{result:%s, readerSchema:%s, writerSchema:%s, description:%s}", mResult, mReader, mWriter, f3);} /** * {@inheritDoc }
3.26
hudi_AvroSchemaCompatibility_getDescription_rdh
/** * Gets a human readable description of this validation result. * * @return a human readable description of this validation result. */ public String getDescription() { return f3; }
3.26
hudi_AvroSchemaCompatibility_m0_rdh
/** * Returns the SchemaCompatibilityType, always non-null. * * @return a SchemaCompatibilityType instance, always non-null */ public SchemaCompatibilityType m0() { return mCompatibilityType; } /** * If the compatibility is INCOMPATIBLE, returns {@link Incompatibility * Incompatibilities} found, otherwise a...
3.26
hudi_AvroSchemaCompatibility_getWriterFragment_rdh
/** * Returns the fragment of the writer schema that failed compatibility check. * * @return a Schema instance (fragment of the writer schema). */ public Schema getWriterFragment() { return mWriterFragment; }
3.26
hudi_AvroSchemaCompatibility_hashCode_rdh
/** * {@inheritDoc } */ @Override public int hashCode() { return Arrays.hashCode(new Object[]{ mResult, mReader, mWriter, f3 }); }
3.26
hudi_AvroSchemaCompatibility_getWriter_rdh
/** * Gets the writer schema that was validated. * * @return writer schema that was validated. */ public Schema getWriter() { return mWriter; }
3.26
hudi_AvroSchemaCompatibility_getType_rdh
/** * Gets the type of this result. * * @return the type of this result. */ public SchemaCompatibilityType getType() { return mResult.m0(); }
3.26
hudi_AvroSchemaCompatibility_getResult_rdh
/** * Gets more details about the compatibility, in particular if getType() is * INCOMPATIBLE. * * @return the details of this compatibility check. */ public SchemaCompatibilityResult getResult() { return mResult; }
3.26
hudi_AvroSchemaCompatibility_getCompatibility_rdh
/** * Reports the compatibility of a reader/writer schema pair. * <p> * Memorizes the compatibility results. * </p> * * @param reader * Reader schema to test. * @param writer * Writer schema to test. * @param locations * Stack tracking the path (chain of locations) within the * schema. * @return th...
3.26
hudi_HoodieInstantTimeGenerator_getInstantForDateString_rdh
/** * Creates an instant string given a valid date-time string. * * @param dateString * A date-time string in the format yyyy-MM-dd HH:mm:ss[.SSS] * @return A timeline instant * @throws ParseException * If we cannot parse the date string */ public static String getInstantForDateString(String dateString) { ...
3.26
hudi_HoodieInstantTimeGenerator_createNewInstantTime_rdh
/** * Returns next instant time in the correct format. * Ensures each instant time is at least 1 millisecond apart since we create instant times at millisecond granularity. * * @param shouldLock * Whether the lock should be enabled to get the instant time. * @param timeGenerator * TimeGenerator used to gener...
3.26
hudi_HoodieDataTableUtils_getBaseAndLogFilePathsFromFileSystem_rdh
/** * * @return All hoodie files of the table from the file system. * @throws IOException * upon errors. */ static List<Path> getBaseAndLogFilePathsFromFileSystem(HoodieTableMetadata tableMetadata, String basePath) throws IOException { List<String> allPartitionPaths = tableMetadata.getAllPartitionPaths().str...
3.26
hudi_S3EventsMetaSelector_getNextEventsFromQueue_rdh
/** * Get the list of events from queue. * * @param lastCheckpointStr * The last checkpoint instant string, empty if first run. * @return A pair of dataset of event records and the next checkpoint instant string. */ public Pair<List<String>, String> getNextEventsFromQueue(SqsClient sqs, Option<String> lastCheck...
3.26
hudi_S3EventsMetaSelector_getValidEvents_rdh
/** * List messages from queue, filter out illegible events while doing so. It will also delete the * ineligible messages from queue. * * @param processedMessages * array of processed messages to add more messages * @return the filtered list of valid S3 events in SQS. */ protected List<Map<String, Object>> get...
3.26
hudi_S3EventsMetaSelector_createSourceSelector_rdh
/** * Factory method for creating custom CloudObjectsMetaSelector. Default selector to use is {@link S3EventsMetaSelector} */ public static S3EventsMetaSelector createSourceSelector(TypedProperties props) { String v0 = getStringWithAltKeys(props, DFSPathSelectorConfig.SOURCE_INPUT_SELECTOR, S3EventsMetaSelector...
3.26
hudi_SparkBulkInsertHelper_bulkInsert_rdh
/** * Do bulk insert using WriteHandleFactory from the partitioner (i.e., partitioner.getWriteHandleFactory) */ public HoodieData<WriteStatus> bulkInsert(HoodieData<HoodieRecord<T>> inputRecords, String instantTime, HoodieTable<T, HoodieData<HoodieRecord<T>>, HoodieData<HoodieKey>, HoodieData<WriteStatus>> table, Hoo...
3.26
hudi_TimelineUtils_concatTimeline_rdh
/** * Concat two timelines timeline1 and timeline2 to build a new timeline. */ public static HoodieTimeline concatTimeline(HoodieTimeline timeline1, HoodieTimeline timeline2, HoodieTableMetaClient metaClient) { return new HoodieDefaultTimeline(Stream.concat(timeline1.getInstantsAsStream(), timeline2.getInstantsAsStre...
3.26
hudi_TimelineUtils_getDroppedPartitions_rdh
/** * Returns partitions that have been deleted or marked for deletion in the given timeline. * Does not include internal operations such as clean in the timeline. */ public static List<String> getDroppedPartitions(HoodieTimeline timeline) { HoodieTimeline replaceCommitTimeline = timeline.getWriteTimeline().filt...
3.26
hudi_TimelineUtils_getCommitMetadata_rdh
/** * Returns the commit metadata of the given instant. * * @param instant * The hoodie instant * @param timeline * The timeline * @return the commit metadata */ public static HoodieCommitMetadata getCommitMetadata(HoodieInstant instant, HoodieTimeline timeline) throws IOException {byte[] data = timeline.g...
3.26
hudi_TimelineUtils_validateTimestampAsOf_rdh
/** * Validate user-specified timestamp of time travel query against incomplete commit's timestamp. * * @throws HoodieException * when time travel query's timestamp >= incomplete commit's timestamp */ public static void validateTimestampAsOf(HoodieTableMetaClient metaClient, String timestampAsOf) { Option<Hoodie...
3.26
hudi_TimelineUtils_getEarliestInstantForMetadataArchival_rdh
/** * Gets the qualified earliest instant from the active timeline of the data table * for the archival in metadata table. * <p> * the qualified earliest instant is chosen as the earlier one between the earliest * commit (COMMIT, DELTA_COMMIT, and REPLACE_COMMIT only, considering non-savepoint * commit only if en...
3.26
hudi_TimelineUtils_getWrittenPartitions_rdh
/** * Returns partitions that have new data strictly after commitTime. * Does not include internal operations such as clean in the timeline. */ public static List<String> getWrittenPartitions(HoodieTimeline timeline) { HoodieTimeline timelineToSync = timeline.getWriteTimeline(); return getAffectedPartitions(...
3.26