name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
hudi_HoodieRepairTool_copyFiles_rdh | /**
* Copies the list of files from source base path to destination base path.
* The destination file path (base + relative) should not already exist.
*
* @param context
* {@link HoodieEngineContext} instance.
* @param relativeFilePaths
* A {@link List} of relative file paths for copying.
* @param sourceBas... | 3.26 |
hudi_HoodieRepairTool_printRepairInfo_rdh | /**
* Prints the repair info.
*
* @param instantTimesToRepair
* A list instant times in consideration for repair
* @param instantsWithDanglingFiles
* A list of instants with dangling files.
*/
private void printRepairInfo(List<String> instantTimesToRepair, List<ImmutablePair<String, List<String>>> instantsWi... | 3.26 |
hudi_HoodieRepairTool_doRepair_rdh | /**
* Does repair, either in REPAIR or DRY_RUN mode.
*
* @param startingInstantOption
* {@link Option} of starting instant for scanning, can be empty.
* @param endingInstantOption
* {@link Option} of ending instant for scanning, can be empty.
* @param isDryRun
* Is dry run.
* @throws IOException
* upo... | 3.26 |
hudi_HoodieRepairTool_m0_rdh | /**
* Reads config from the file system.
*
* @param jsc
* {@link JavaSparkContext} instance.
* @param cfg
* {@link Config} instance.
* @return the {@link TypedProperties} instance.
*/
private TypedProperties m0(JavaSparkContext jsc, Config cfg) {
return UtilHelpers.readConfig(jsc.hadoopConfiguration(), new ... | 3.26 |
hudi_HoodieRepairTool_checkBackupPathAgainstBasePath_rdh | /**
* Verifies the backup path against table base path.
* If the backup path is within the table base path, throws an error.
*
* @return {@code 0} if successful; {@code -1} otherwise.
*/
int checkBackupPathAgainstBasePath() {if (f1.backupPath == null) {
f0.error("Backup path is not configured");
return
-1;
}
if (f... | 3.26 |
hudi_HoodieRepairTool_restoreFiles_rdh | /**
* Restores dangling files from backup path to table base path.
*
* @param relativeFilePaths
* A {@link List} of relative file paths for restoring.
* @return {@code true} if all successful; {@code false} otherwise.
*/
boolean restoreFiles(List<String> relativeFilePaths) {return copyFiles(context, relativeFil... | 3.26 |
hudi_HoodieRepairTool_backupFiles_rdh | /**
* Backs up dangling files from table base path to backup path.
*
* @param relativeFilePaths
* A {@link List} of relative file paths for backup.
* @return {@code true} if all successful; {@code false} otherwise.
*/
boolean backupFiles(List<String> relativeFilePaths) {
return copyFiles(context, relativeFilePa... | 3.26 |
hudi_HoodieRepairTool_checkBackupPathForRepair_rdh | /**
* Verifies the backup path for repair.
* If there is no backup path configured, creates a new one in temp folder.
* If the backup path already has files, throws an error to the user.
* If the backup path is within the table base path, throws an error too.
*
* @return {@code 0} if successful; {@code -1} otherw... | 3.26 |
hudi_HoodiePartitionMetadata_hasPartitionMetadata_rdh | // methods related to partition meta data
public static boolean hasPartitionMetadata(FileSystem fs, Path partitionPath) {
try {
return textFormatMetaPathIfExists(fs, partitionPath).isPresent() ||
baseFormatMetaPathIfExists(fs, partitionPath).isPresent();
} catch (IOException
ioe) {
... | 3.26 |
hudi_HoodiePartitionMetadata_readPartitionCreatedCommitTime_rdh | /**
* Read out the COMMIT_TIME_KEY metadata for this partition.
*/
public Option<String> readPartitionCreatedCommitTime() {
try {
if (!props.containsKey(COMMIT_TIME_KEY)) {
readFromFS();
}
return Option.of(props.getProperty(COMMIT_TIME_KEY));
}
catch (IOException ioe) {
LOG.warn("Error fetch Hoodie partition me... | 3.26 |
hudi_HoodiePartitionMetadata_writeMetafile_rdh | /**
* Write the partition metadata in the correct format in the given file path.
*
* @param filePath
* Path of the file to write
* @throws IOException
*/
private void writeMetafile(Path filePath)
throws IOException {
if (format.isPresent())
{
Schema schema = HoodieAvroUtils.getRecordKeySchema();
switch (format.... | 3.26 |
hudi_HoodiePartitionMetadata_readFromFS_rdh | /**
* Read out the metadata for this partition.
*/
public void readFromFS() throws IOException {
// first try reading the text format (legacy, currently widespread)
boolean readFile = readTextFormatMetaFile();
if (!readFile) {
// now try reading the base file formats.
readFile = readBaseFormatMetaFile();
}// throw ex... | 3.26 |
hudi_HoodiePartitionMetadata_getPartitionMetafilePath_rdh | /**
* Returns the name of the partition metadata.
*
* @return Name of the partition metafile or empty option
*/
public static Option<Path> getPartitionMetafilePath(FileSystem fs, Path partitionPath) {
// The partition listing is a costly operation so instead we are searching for existence of the files instead.
... | 3.26 |
hudi_JavaUpsertPartitioner_getSmallFiles_rdh | /**
* Returns a list of small files in the given partition path.
*/protected List<SmallFile> getSmallFiles(String partitionPath) {
// smallFiles only for partitionPath
List<SmallFile> v29 = new ArrayList<>();
HoodieTimeline commitTimeline = table.getMetaClient().getCommitsTimeline().filterCompletedInstants();
if (!... | 3.26 |
hudi_JavaUpsertPartitioner_averageBytesPerRecord_rdh | /**
* Obtains the average record size based on records written during previous commits. Used for estimating how many
* records pack into one file.
*/
protected static long averageBytesPerRecord(HoodieTimeline commitTimeline, HoodieWriteConfig hoodieWriteConfig) {
long avgSize = hoodieWriteConfig.getCopyOnWriteReco... | 3.26 |
hudi_HoodieInternalRowFileWriterFactory_getInternalRowFileWriter_rdh | /**
* Factory method to assist in instantiating an instance of {@link HoodieInternalRowFileWriter}.
*
* @param path
* path of the RowFileWriter.
* @param hoodieTable
* instance of {@link HoodieTable} in use.
* @param writeConfig
* instance of {@link HoodieWriteConfig} to use.
* @param schema
* schema ... | 3.26 |
hudi_AWSDmsAvroPayload_handleDeleteOperation_rdh | /**
* Handle a possible delete - check for "D" in Op column and return empty row if found.
*
* @param insertValue
* The new row that is being "inserted".
*/
private Option<IndexedRecord> handleDeleteOperation(IndexedRecord insertValue)
throws IOException {
boolean delete = false;
if (insertValue instance... | 3.26 |
hudi_InternalDynamicBloomFilter_write_rdh | // Writable
@Override
public void write(DataOutput out) throws IOException {
super.write(out);
out.writeInt(nr);
out.writeInt(currentNbRecord);
out.writeInt(matrix.length);
for (InternalBloomFilter bloomFilter : matrix) {bloomFilter.write(out);
}
} | 3.26 |
hudi_InternalDynamicBloomFilter_addRow_rdh | /**
* Adds a new row to <i>this</i> dynamic Bloom filter.
*/
private void
addRow() {
InternalBloomFilter[] tmp = new
InternalBloomFilter[matrix.length + 1];
System.arraycopy(matrix, 0, tmp, 0, matrix.length);
tmp[tmp.length - 1] = new InternalBloomFilter(vectorSize, nbHash, hashType);
matrix = tm... | 3.26 |
hudi_CompactionCommitEvent_setInstant_rdh | // -------------------------------------------------------------------------
// Getter/Setter
// -------------------------------------------------------------------------
public void setInstant(String instant) {
this.instant = instant;
} | 3.26 |
hudi_HoodieStreamerUtils_isDropPartitionColumns_rdh | /**
* Set based on hoodie.datasource.write.drop.partition.columns config.
* When set to true, will not write the partition columns into the table.
*/static Boolean isDropPartitionColumns(TypedProperties props)
{
return props.getBoolean(DROP_PARTITION_COLUMNS.key(), DROP_PARTITION_COLUMNS.defaultValue());
} | 3.26 |
hudi_HoodieStreamerUtils_getPartitionColumns_rdh | /**
* Get the partition columns as a set of strings.
*
* @param props
* TypedProperties
* @return Set of partition columns.
*/
static Set<String> getPartitionColumns(TypedProperties props) {
String partitionColumns = SparkKeyGenUtils.getPartitionColumns(props);
return Arrays.stream(partitionColumns.split(",")).... | 3.26 |
hudi_IMetaStoreClientUtil_getMSC_rdh | /**
* Returns the Hive metastore client with given Hive conf.
*/
public static IMetaStoreClient getMSC(HiveConf hiveConf) throws HiveException, MetaException {
IMetaStoreClient metaStoreClient;
try {
metaStoreClient = ((Hive) (Hive.class.getMethod("getWithoutRegisterFns", HiveConf.class).invoke(nu... | 3.26 |
hudi_ExceptionUtil_getRootCause_rdh | /**
* Fetches inner-most cause of the provided {@link Throwable}
*/
@Nonnull
public static Throwable getRootCause(@Nonnull
Throwable t) {
Throwable cause = t;
while (cause.getCause() != null) {cause = cause.getCause();
}
return cause;
} | 3.26 |
hudi_SchedulerConfGenerator_getSparkSchedulingConfigs_rdh | /**
* Helper to set Spark Scheduling Configs dynamically.
*
* @param cfg
* Config for HoodieDeltaStreamer
*/public static Map<String, String> getSparkSchedulingConfigs(HoodieStreamer.Config cfg) throws Exception {
Option<String> scheduleModeKeyOption = new SparkConf().getOption(SPARK_SCHEDULER_MODE_KEY);
... | 3.26 |
hudi_SchedulerConfGenerator_generateAndStoreConfig_rdh | /**
* Generate spark scheduling configs and store it to a randomly generated tmp file.
*
* @param deltaSyncWeight
* Scheduling weight for delta sync
* @param compactionWeight
* Scheduling weight for compaction
* @param deltaSyncMinShare
* Minshare for delta sync
* @param compactionMinShare
* Minshare ... | 3.26 |
hudi_SchedulerConfGenerator_generateConfig_rdh | /**
* Helper to generate spark scheduling configs in XML format with input params.
*
* @param deltaSyncWeight
* Scheduling weight for delta sync
* @param compactionWeight
* Scheduling weight for compaction
* @param deltaSyncMinShare
* Minshare for delta sync
* @param compactionMinShare
* Minshare for ... | 3.26 |
hudi_MarkerBasedRollbackUtils_getAllMarkerPaths_rdh | /**
* Gets all marker paths.
*
* @param table
* instance of {@code HoodieTable} to use
* @param context
* instance of {@code HoodieEngineContext} to use
* @param instant
* instant of interest to rollback
* @param parallelism
* parallelism to use
* @return a list of all markers
* @throws IOException
... | 3.26 |
hudi_CloudObjectsSelector_m0_rdh | /**
* Amazon SQS Client Builder.
*/
public SqsClient m0() {
return SqsClient.builder().region(Region.of(regionName)).build();
} | 3.26 |
hudi_CloudObjectsSelector_createListPartitions_rdh | /**
* Create partitions of list using specific batch size. we can't use third party API for this
* functionality, due to https://github.com/apache/hudi/blob/master/style/checkstyle.xml#L270
*/
protected List<List<Message>> createListPartitions(List<Message> singleList, int eachBatchSize) {List<List<Message>>
lis... | 3.26 |
hudi_CloudObjectsSelector_getFileAttributesFromRecord_rdh | /**
* Get the file attributes filePath, eventTime and size from JSONObject record.
*
* @param record
* of object event
* @return map of file attribute
*/
protected Map<String, Object> getFileAttributesFromRecord(JSONObject record) throws UnsupportedEncodingException {
Map<String, Object> fileRecord = new ... | 3.26 |
hudi_CloudObjectsSelector_deleteProcessedMessages_rdh | /**
* Delete Queue Messages after hudi commit. This method will be invoked by source.onCommit.
*/
public void deleteProcessedMessages(SqsClient sqs, String queueUrl, List<Message> processedMessages) {
if (!processedMessages.isEmpty()) {
// create batch for deletion, SES DeleteMessageBatchRequest only acce... | 3.26 |
hudi_CloudObjectsSelector_getMessagesToProcess_rdh | /**
* List messages from queue.
*/
protected List<Message> getMessagesToProcess(SqsClient sqsClient, String queueUrl, int longPollWait, int visibilityTimeout, int maxMessagePerBatch, int maxMessagesPerRequest) {
List<Message> messagesToProcess = new ArrayList<>();
ReceiveMessageRequest receiveMessageRequest ... | 3.26 |
hudi_HotSpotMemoryLayoutSpecification64bit_getArrayHeaderSize_rdh | /**
* Implementation of {@link MemoryLayoutSpecification} based on
* Hot Spot Memory Layout Specification on 64-bit.
*/public class HotSpotMemoryLayoutSpecification64bit implements MemoryLayoutSpecification {
@Override
public int getArrayHeaderSize() {return 24;
} | 3.26 |
hudi_BaseConsistentHashingBucketClusteringPlanStrategy_isBucketClusteringSortEnabled_rdh | /**
* Whether generate regular sort clustering plans for buckets that are not involved in merge or split.
*
* @return true if generate regular sort clustering plans for buckets that are not involved in merge or split, false otherwise.
*/
protected boolean isBucketClusteringSortEnabled() {
return true;
} | 3.26 |
hudi_BaseConsistentHashingBucketClusteringPlanStrategy_getFileSlicesEligibleForClustering_rdh | /**
* Generate candidate clustering file slices of the given partition.
* If there is inflight / requested clustering working on the partition, then return empty list
* to ensure serialized update to the hashing metadata.
*
* @return candidate file slices to be clustered (i.e., sort, bucket split or merge)
*/
@Ov... | 3.26 |
hudi_BaseConsistentHashingBucketClusteringPlanStrategy_buildClusteringGroupsForPartition_rdh | /**
* Generate cluster group based on split, merge and sort rules
*/
@Override
protected Stream<HoodieClusteringGroup> buildClusteringGroupsForPartition(String partitionPath, List<FileSlice> fileSlices) {
Option<HoodieConsistentHashingMetadata> metadata = ConsistentBucketIndexUtils.loadMetadata(getHoodieTable(), pa... | 3.26 |
hudi_BaseConsistentHashingBucketClusteringPlanStrategy_isBucketClusteringMergeEnabled_rdh | /**
* Whether enable buckets merged when using consistent hashing bucket index.
*
* @return true if bucket merge is enabled, false otherwise.
*/
protected boolean isBucketClusteringMergeEnabled() {
return true;
} | 3.26 |
hudi_BaseConsistentHashingBucketClusteringPlanStrategy_checkPrecondition_rdh | /**
* TODO maybe add force config to schedule the clustering. It could allow clustering on partitions that are not doing write operation.
* Block clustering if there is any ongoing concurrent writers
*
* @return true if the schedule can proceed
*/
@Override
public boolean checkPrecondition()
{
HoodieTimeline ... | 3.26 |
hudi_BaseConsistentHashingBucketClusteringPlanStrategy_buildMergeClusteringGroup_rdh | /**
* Generate clustering group according to merge rules
*
* @param identifier
* bucket identifier
* @param fileSlices
* file slice candidates to be built as merge clustering groups
* @param mergeSlot
* number of bucket allowed to be merged, in order to guarantee the lower bound of the total number of buc... | 3.26 |
hudi_BaseConsistentHashingBucketClusteringPlanStrategy_constructExtraMetadata_rdh | /**
* Construct extra metadata for clustering group
*/
private Map<String, String> constructExtraMetadata(String partition, List<ConsistentHashingNode> nodes, int seqNo) {
Map<String, String> extraMetadata = new HashMap<>();
try {
extraMetadata.put(METADATA_PARTITION_KEY, partition);
ext... | 3.26 |
hudi_DynamoTableUtils_deleteTableIfExists_rdh | /**
* Deletes the table and ignores any errors if it doesn't exist.
*
* @param dynamo
* The Dynamo client to use.
* @param deleteTableRequest
* The delete table request.
* @return True if deleted, false otherwise.
*/
public static boolean deleteTableIfExists(final DynamoDbClient dynamo, final DeleteTableReq... | 3.26 |
hudi_DynamoTableUtils_m0_rdh | /**
* Waits up to 10 minutes for a specified DynamoDB table to resolve,
* indicating that it exists. If the table doesn't return a result after
* this time, a SdkClientException is thrown.
*
* @param dynamo
* The DynamoDB client to use to make requests.
* @param tableName
* The name of the table being resol... | 3.26 |
hudi_DynamoTableUtils_createTableIfNotExists_rdh | /**
* Creates the table and ignores any errors if it already exists.
*
* @param dynamo
* The Dynamo client to use.
* @param createTableRequest
* The create table request.
* @return True if created, false otherwise.
*/
public static boolean createTableIfNotExists(final DynamoDbClient dynamo, final CreateTabl... | 3.26 |
hudi_DynamoTableUtils_waitUntilActive_rdh | /**
* Waits up to a specified amount of time for a specified DynamoDB table to
* move into the <code>ACTIVE</code> state. If the table does not exist or
* does not transition to the <code>ACTIVE</code> state after this time,
* then a SdkClientException is thrown.
*
* @param dynamo
* The DynamoDB client to use ... | 3.26 |
hudi_FlinkCreateHandle_deleteInvalidDataFile_rdh | /**
* The flink checkpoints start in sequence and asynchronously, when one write task finish the checkpoint(A)
* (thus the fs view got the written data files some of which may be invalid),
* it goes on with the next round checkpoint(B) write immediately,
* if it tries to reuse the last small data bucket(small file)... | 3.26 |
hudi_FlinkCreateHandle_newFilePathWithRollover_rdh | /**
* Use the writeToken + "-" + rollNumber as the new writeToken of a mini-batch write.
*/
private Path newFilePathWithRollover(int rollNumber) {
final String dataFileName = FSUtils.makeBaseFileName(instantTime, (writeToken + "-") + rollNumber, fileId, hoodieTable.getBaseFileExtension());
return makeNewFi... | 3.26 |
hudi_OverwriteNonDefaultsWithLatestAvroPayload_mergeRecords_rdh | /**
* Merges the given records into one.
* The fields in {@code baseRecord} has higher priority:
* it is set up into the merged record if it is not null or equals to the default.
*
* @param schema
* The record schema
* @param baseRecord
* The base record to merge with
* @param mergedRecord
* The record ... | 3.26 |
hudi_FutureUtils_allOf_rdh | /**
* Similar to {@link CompletableFuture#allOf(CompletableFuture[])} with a few important
* differences:
*
* <ol>
* <li>Completes successfully as soon as *all* of the futures complete successfully</li>
* <li>Completes exceptionally as soon as *any* of the futures complete exceptionally</li>
* <li>In case it'... | 3.26 |
hudi_BaseActionExecutor_writeTableMetadata_rdh | /**
* Writes restore metadata to table metadata.
*
* @param metadata
* restore metadata of interest.
*/protected
final void writeTableMetadata(HoodieRestoreMetadata metadata) {
Option<HoodieTableMetadataWriter> v6 = table.getMetadataWriter(instantTime);
if (v6.isPresent()) {
try (HoodieTableMetad... | 3.26 |
hudi_ExternalFilePathUtil_appendCommitTimeAndExternalFileMarker_rdh | /**
* Appends the commit time and external file marker to the file path. Hudi relies on the commit time in the file name for properly generating views of the files in a table.
*
* @param filePath
* The original file path
* @param commitTime
* The time of the commit that added this file to the table
* @return... | 3.26 |
hudi_ExternalFilePathUtil_isExternallyCreatedFile_rdh | /**
* Checks if the file name was created by an external system by checking for the external file marker at the end of the file name.
*
* @param fileName
* The file name
* @return True if the file was created by an external system, false otherwise
*/
public static boolean isExternallyCreatedFile(String fileName... | 3.26 |
hudi_HoodieMetadataTableValidator_validatePartitions_rdh | /**
* Compare the listing partitions result between metadata table and fileSystem.
*/
private List<String> validatePartitions(HoodieSparkEngineContext engineContext, String basePath) {
// compare partitions
List<String> allPartitionPathsFromFS = FSUtils.getAllPartitionPaths(engineContext, basePath, false);
... | 3.26 |
hudi_HoodieMetadataTableValidator_validateLatestFileSlices_rdh | /**
* Compare getLatestFileSlices between metadata table and fileSystem.
*/
private void validateLatestFileSlices(HoodieMetadataValidationContext metadataTableBasedContext, HoodieMetadataValidationContext fsBasedContext, String partitionPath, Set<String> baseDataFilesForCleaning) {
List<FileSlice> latestFileSli... | 3.26 |
hudi_HoodieMetadataTableValidator_validateFilesInPartition_rdh | /**
* Compare the file listing and index data between metadata table and fileSystem.
* For now, validate five kinds of apis:
* 1. HoodieMetadataFileSystemView::getLatestFileSlices
* 2. HoodieMetadataFileSystemView::getLatestBaseFiles
* 3. HoodieMetadataFileSystemView::getAllFileGroups and H... | 3.26 |
hudi_HoodieMetadataTableValidator_checkMetadataTableIsAvailable_rdh | /**
* Check metadata is initialized and available to ready.
* If not we will log.warn and skip current validation.
*/
private boolean checkMetadataTableIsAvailable() {
try {
HoodieTableMetaClient mdtMetaClient = HoodieTableMetaClient.builder().setConf(jsc.hadoopConfiguration()).setBasePath(new Path(cfg.b... | 3.26 |
hudi_HoodieMetadataTableValidator_validateLatestBaseFiles_rdh | /**
* Compare getLatestBaseFiles between metadata table and fileSystem.
*/
private void validateLatestBaseFiles(HoodieMetadataValidationContext metadataTableBasedContext, HoodieMetadataValidationContext fsBasedContext, String partitionPath, Set<String> baseDataFilesForCleaning) {
List<HoodieBaseFile> v35;
Lis... | 3.26 |
hudi_HoodieMetadataTableValidator_readConfigFromFileSystem_rdh | /**
* Reads config from the file system.
*
* @param jsc
* {@link JavaSparkContext} instance.
* @param cfg
* {@link Config} instance.
* @return the {@link TypedProperties} instance.
*/
private TypedProperties readConfigFromFileSystem(JavaSparkContext jsc, Config cfg) {
return UtilHelpers.readConfig(jsc.h... | 3.26 |
hudi_HoodieMetadataTableValidator_areFileSliceCommittedLogFilesMatching_rdh | /**
* Compares committed log files from two file slices.
*
* @param fs1
* File slice 1
* @param fs2
* File slice 2
* @param metaClient
* {@link HoodieTableMetaClient} instance
* @param committedFilesMap
* In-memory map for caching committed files of commits
* @return {@code true} if matching; {@code ... | 3.26 |
hudi_HiveSyncTool_getTablePartitions_rdh | /**
* Fetch partitions from meta service, will try to push down more filters to avoid fetching
* too many unnecessary partitions.
*
* @param writtenPartitions
* partitions has been added, updated, or dropped since last synced.
*/
private List<Partition> getTablePartitions(String tableName, List<String> written... | 3.26 |
hudi_BaseHoodieWriteClient_scheduleTableService_rdh | /**
* Schedule table services such as clustering, compaction & cleaning.
*
* @param extraMetadata
* Metadata to pass onto the scheduled service instant
* @param tableServiceType
* Type of table service to schedule
* @return The given instant time option or empty if no table service plan is scheduled
*/
publ... | 3.26 |
hudi_BaseHoodieWriteClient_postWrite_rdh | /**
* Common method containing steps to be performed after write (upsert/insert/..) operations including auto-commit.
*
* @param result
* Commit Action Result
* @param instantTime
* Instant Time
* @param hoodieTable
* Hoodie Table
... | 3.26 |
hudi_BaseHoodieWriteClient_startCommit_rdh | /**
* Provides a new commit time for a write operation (insert/update/delete/insert_overwrite/insert_overwrite_table) with specified action.
*/
public String startCommit(String actionType, HoodieTableMetaClient metaClient) {
CleanerUtils.rollbackFailedWrites(config.getFailedWritesCleanPolicy(), HoodieTimeline.COMMIT_... | 3.26 |
hudi_BaseHoodieWriteClient_scheduleLogCompactionAtInstant_rdh | /**
* Schedules a new log compaction instant with passed-in instant time.
*
* @param instantTime
* Log Compaction Instant Time
* @param extraMetadata
* Extra Metadata to be stored
*/
public boolean scheduleLogCompactionAtInstant(String instantTime, Option<Map<String, String>> extraMetadata) throws HoodieIOEx... | 3.26 |
hudi_BaseHoodieWriteClient_cluster_rdh | /**
* Ensures clustering instant is in expected state and performs clustering for the plan stored in metadata.
*
* @param clusteringInstant
* Clustering Instant Time
* @return Collection of Write Status
*/
public HoodieWriteMetadata<O> cluster(String clusteringInstant, boolean shouldComplete) {
HoodieTable tabl... | 3.26 |
hudi_BaseHoodieWriteClient_scheduleCompaction_rdh | /**
* Schedules a new compaction instant.
*
* @param extraMetadata
* Extra Metadata to be stored
*/
public Option<String> scheduleCompaction(Option<Map<String, String>> extraMetadata) throws HoodieIOException {
String instantTime = createNewInstantTime();
return scheduleCompactionAtInstant(instantTime, extraMet... | 3.26 |
hudi_BaseHoodieWriteClient_scheduleIndexing_rdh | /**
* Schedules INDEX action.
*
* @param partitionTypes
* - list of {@link MetadataPartitionType} which needs to be indexed
* @return instant time for the requested INDEX action
*/
public Option<String> scheduleIndexing(List<MetadataPartitionType> partitionTypes) {
String instantTime = createNewInstantTime();
... | 3.26 |
hudi_BaseHoodieWriteClient_updateColumnType_rdh | /**
* update col Type for hudi table.
* only support update primitive type to primitive type.
* cannot update nest type to nest type or primitive type eg: RecordType -> MapType, MapType -> LongType.
*
* @param colName
* col name to be changed. if we want to change col from a nested filed, the fullName should be... | 3.26 |
hudi_BaseHoodieWriteClient_commitLogCompaction_rdh | /**
* Commit a log compaction operation. Allow passing additional meta-data to be stored in commit instant file.
*
* @param logCompactionInstantTime
* Log Compaction Instant Time
* @param metadata
* All the metadata that gets stored along with a commit
* @param extraMetadata
* Extra Metadata to be stored
... | 3.26 |
hudi_BaseHoodieWriteClient_m2_rdh | /**
* Triggers cleaning and archival for the table of interest. This method is called outside of locks. So, internal callers should ensure they acquire lock whereever applicable.
*
* @param table
* instance of {@link HoodieTable} of interest.
*/
protected void m2(HoodieTable table) {
autoCleanOnCommit();
// relo... | 3.26 |
hudi_BaseHoodieWriteClient_index_rdh | /**
* Runs INDEX action to build out the metadata partitions as planned for the given instant time.
*
* @param indexInstantTime
* - instant time for the requested INDEX action
* @return {@link Option<HoodieIndexCommitMetadata>} after successful indexing.
*/
public Option<HoodieIndexCommitMetadata> index(String ... | 3.26 |
hudi_BaseHoodieWriteClient_reOrderColPosition_rdh | /**
* reorder the position of col.
*
* @param colName
* column which need to be reordered. if we want to change col from a nested filed, the fullName should be specified.
* @param referColName
* reference position.
* @param orderType
* col position change type. now support three change types: first/after/... | 3.26 |
hudi_BaseHoodieWriteClient_completeLogCompaction_rdh | /**
* Commit Log Compaction and track metrics.
*/
protected void completeLogCompaction(HoodieCommitMetadata metadata, HoodieTable table, String logCompactionCommitTime) {
tableServiceClient.completeLogCompaction(metadata, table, logCompactionCommitTime);
} | 3.26 |
hudi_BaseHoodieWriteClient_scheduleCompactionAtInstant_rdh | /**
* Schedules a new compaction instant with passed-in instant time.
*
* @param instantTime
* Compaction Instant Time
* @param extraMetadata
* Extra Metadata to be stored
*/
public boolean scheduleCompactionAtInstant(String instantTime, Option<Map<String,
String>> extraMetadata) throws HoodieIOException {re... | 3.26 |
hudi_BaseHoodieWriteClient_deleteSavepoint_rdh | /**
* Delete a savepoint that was created. Once the savepoint is deleted, the commit can be rolledback and cleaner may
* clean up data files.
*
* @param savepointTime
* Savepoint time to delete
*/
public void deleteSavepoint(String savepointTime) {
HoodieTable<T, I, K, O> table = createTable(config, hadoopConf... | 3.26 |
hudi_BaseHoodieWriteClient_restoreToSavepoint_rdh | /**
* Restore the data to the savepoint.
*
* WARNING: This rolls back recent commits and deleted data files and also pending compactions after savepoint time.
* Queries accessing the files will mostly fail. This is expected to be a manual operation and no concurrent write or
* compaction is expected to be running
... | 3.26 |
hudi_BaseHoodieWriteClient_logCompact_rdh | /**
* Ensures compaction instant is in expected state and performs Log Compaction for the workload stored in instant-time.s
*
* @param logCompactionInstantTime
* Compaction Instant Time
* @return Collection of Write Status
*/
protected HoodieWriteMetadata<O> logCompact(String logCompactionInstantTime,
boolean s... | 3.26 |
hudi_BaseHoodieWriteClient_saveInternalSchema_rdh | // Save internal schema
private void
saveInternalSchema(HoodieTable table, String instantTime, HoodieCommitMetadata metadata) {
TableSchemaResolver schemaUtil = new TableSchemaResolver(table.getMetaClient());
String historySchemaStr = schemaUtil.getTableHistorySchemaStrFromCommitMetadata().orElse("");
Fi... | 3.26 |
hudi_BaseHoodieWriteClient_m3_rdh | /**
* Delete a savepoint based on the latest commit action on the savepoint timeline.
*/
public void m3() {
HoodieTable<T,
I, K, O> table = createTable(config, hadoopConf);
HoodieTimeline savePointTimeline = table.getActiveTimeline().getSavePointTimeline();
if (savePointTimeline.empty()) {
throw new HoodieSavepointE... | 3.26 |
hudi_BaseHoodieWriteClient_writeTableMetadata_rdh | /**
* Write the HoodieCommitMetadata to metadata table if available.
*
* @param table
* {@link HoodieTable} of interest.
* @param instantTime
* instant time of the commit.
* @param metadata
* instance of {@link HoodieCommitMetadata}.
... | 3.26 |
hudi_BaseHoodieWriteClient_updateColumnNullability_rdh | /**
* update col nullable attribute for hudi table.
*
* @param colName
* col name to be changed. if we want to change col from a nested filed, the fullName should be specified
* @param nullable
* .
*/
public void updateColumnNullability(String colName, boolean nullable) {
Pair<InternalSchema, HoodieTableMeta... | 3.26 |
hudi_BaseHoodieWriteClient_dropIndex_rdh | /**
* Drops the index and removes the metadata partitions.
*
* @param partitionTypes
* - list of {@link MetadataPartitionType} which needs to be indexed
*/
public void dropIndex(List<MetadataPartitionType> partitionTypes) {
HoodieTable table = createTable(config, hadoopConf);
String v58 = createNewInstantTime()... | 3.26 |
hudi_BaseHoodieWriteClient_postCommit_rdh | /**
* Post Commit Hook. Derived classes use this method to perform post-commit processing
*
* @param table
* table to commit on
* @param metadata
* Commit Metadata corresponding to committed instant
* @param instantTime
* Instant Time
* @param extraMetadata
* Additional Metadata passed by user
*/
pro... | 3.26 |
hudi_BaseHoodieWriteClient_initTable_rdh | /**
* Instantiates and initializes instance of {@link HoodieTable}, performing crucial bootstrapping
* operations such as:
*
* NOTE: This method is engine-agnostic and SHOULD NOT be overloaded, please check on
* {@link #doInitTable(WriteOperationType, HoodieTableMetaClient, Option)} instead
*
* <ul>
* <li>Che... | 3.26 |
hudi_BaseHoodieWriteClient_scheduleLogCompaction_rdh | /**
* Schedules a new log compaction instant.
*
* @param extraMetadata
* Extra Metadata to be stored
*/
public Option<String> scheduleLogCompaction(Option<Map<String, String>> extraMetadata) throws HoodieIOException {
String instantTime = createNewInstantTime();
return scheduleLogCompactionAtInstant(instantTime... | 3.26 |
hudi_BaseHoodieWriteClient_completeCompaction_rdh | /**
* Commit Compaction and track metrics.
*/
protected void completeCompaction(HoodieCommitMetadata metadata, HoodieTable table, String compactionCommitTime) {
tableServiceClient.completeCompaction(metadata, table, compactionCommitTime);} | 3.26 |
hudi_BaseHoodieWriteClient_tryUpgrade_rdh | /**
* Upgrades the hoodie table if need be when moving to a new Hudi version.
* This method is called within a lock. Try to avoid double locking from within this method.
*
* @param metaClient
* instance of {@link HoodieTableMetaClient} to use.
* @param instantTime
* instant time of interest if we have one.
... | 3.26 |
hudi_BaseHoodieWriteClient_bootstrap_rdh | /**
* Main API to run bootstrap to hudi.
*/
public void bootstrap(Option<Map<String, String>> extraMetadata) {
// TODO : MULTIWRITER -> check if failed bootstrap files can be cleaned later
if (config.getWriteConcurrencyMode().supportsMultiWriter()) {
throw new HoodieException("Cannot bootstrap the... | 3.26 |
hudi_BaseHoodieWriteClient_commitCompaction_rdh | /**
* Commit a compaction operation. Allow passing additional meta-data to be stored in commit instant file.
*
* @param compactionInstantTime
* Compaction Instant Time
* @param metadata
* All the metadata that gets stored along with a commit
* @param extraMetadata
* Extra Metadata to be stored
*/
public ... | 3.26 |
hudi_BaseHoodieWriteClient_preCommit_rdh | /**
* Any pre-commit actions like conflict resolution goes here.
*
* @param inflightInstant
* instant of inflight operation.
* @param metadata
* commit metadata for which pre commit is being invoked.
*/
protected void preCommit(HoodieInstant inflightInstant, HoodieCommitMetadata metadata) {
// Create a H... | 3.26 |
hudi_BaseHoodieWriteClient_inlineScheduleCompaction_rdh | /**
* Schedules compaction inline.
*
* @param extraMetadata
* extra metadata to be used.
* @return compaction instant if scheduled.
*/ protected Option<String> inlineScheduleCompaction(Option<Map<String, String>> extraMetadata) {
return scheduleCompaction(extraMetadata);
} | 3.26 |
hudi_BaseHoodieWriteClient_archive_rdh | /**
* Trigger archival for the table. This ensures that the number of commits do not explode
* and keep increasing unbounded over time.
*/
public void archive()
{
// Create a Hoodie table which encapsulated the commits and files visible
HoodieTable table = createTable(config, hadoopConf);
archive(table);
} | 3.26 |
hudi_BaseHoodieWriteClient_runAnyPendingLogCompactions_rdh | /**
* Run any pending log compactions.
*/
public void runAnyPendingLogCompactions() {
tableServiceClient.runAnyPendingLogCompactions(createTable(config, hadoopConf));
} | 3.26 |
hudi_BaseHoodieWriteClient_updateColumnComment_rdh | /**
* update col comment for hudi table.
*
* @param colName
* col name to be changed. if we want to change col from a nested filed, the fullName should be specified
* @param doc
* .
*/
public void updateColumnComment(String colName, String doc) {
Pair<InternalSchema, HoodieTableMetaClient> pair = getInternal... | 3.26 |
hudi_BaseHoodieWriteClient_m1_rdh | /**
* Commit changes performed at the given instantTime marker.
*/
public boolean m1(String instantTime, O writeStatuses) {
return commit(instantTime, writeStatuses, Option.empty());
} | 3.26 |
hudi_BaseHoodieWriteClient_addColumn_rdh | /**
* add columns to table.
*
* @param colName
* col name to be added. if we want to add col to a nested filed, the fullName should be specified
* @param schema
* col type to be added.
* @param doc
* col doc to be added.
* @param position
* col position to be added
* @param positionType
* col posi... | 3.26 |
hudi_BaseHoodieWriteClient_scheduleClusteringAtInstant_rdh | /**
* Schedules a new clustering instant with passed-in instant time.
*
* @param instantTime
* clustering Instant Time
* @param extraMetadata
* Extra Metadata to be stored
*/
public boolean scheduleClusteringAtInstant(String instantTime, Option<Map<String, String>>
extraMetadata) throws HoodieIOException {
r... | 3.26 |
hudi_BaseHoodieWriteClient_scheduleCleaningAtInstant_rdh | /**
* Schedules a new cleaning instant with passed-in instant time.
*
* @param instantTime
* cleaning Instant Time
* @param extraMetadata
* Extra Metadata to be stored
*/
protected boolean scheduleCleaningAtInstant(String instantTime, Option<Map<String, String>> extraMetadata) throws HoodieIOException {ret... | 3.26 |
hudi_BaseHoodieWriteClient_doInitTable_rdh | /**
* Performs necessary bootstrapping operations (for ex, validating whether Metadata Table has to be bootstrapped).
*
* <p>NOTE: THIS OPERATION IS EXECUTED UNDER LOCK, THEREFORE SHOULD AVOID ANY OPERATIONS
* NOT REQUIRING EXTERNAL SYNCHRONIZATION
*
* @param metaClient
* instance of {@link HoodieTabl... | 3.26 |
hudi_BaseHoodieWriteClient_savepoint_rdh | /**
* Savepoint a specific commit instant time. Latest version of data files as of the passed in instantTime
* will be referenced in the savepoint and will never be cleaned. The savepointed commit will never be rolledback or archived.
* <p>
* This gives an option to rollback the state to the savepoint anytime. Save... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.