name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
open-banking-gateway_Xs2aAdapterConfiguration_xs2aPkcs12KeyStore_rdh
/** * The keystore for QWAC and QSEAL certificates. * * @param keystorePath * Location of the keystore. * @param keystorePassword * Keystore password. */ @Bean @SneakyThrows Pkcs12KeyStore xs2aPkcs12KeyStore(@Value(("${" + XS2A_PROTOCOL_CONFIG_PREFIX) + "pkcs12.keystore}") String keystorePath, @Value(("${" +...
3.26
open-banking-gateway_HeadersBodyMapperTemplate_forExecution_rdh
/** * Converts context object into object that can be used for ASPSP API call. * * @param context * Context to convert * @return Object that can be used with {@code Xs2aAdapter} to perform ASPSP API calls */ public ValidatedHeadersBody<H, B> forExecution(C context) { return new ValidatedHeadersBody<>(toHead...
3.26
open-banking-gateway_BaseDatasafeDbStorageService_write_rdh
/** * Open Datasafe object for writing. * * @param withCallback * Absolute path of the object to write to, including callback hook. I.e. {@code db://storage/deadbeef} * @return Stream to write data to. */ @Override @SneakyThrows @Transactional public OutputStream write(WithCallback<AbsoluteLocation, ? extends R...
3.26
open-banking-gateway_BaseDatasafeDbStorageService_remove_rdh
/** * Delete object within Datasafe storage. * * @param absoluteLocation * Absolute path of the object to remove. I.e. {@code db://storage/deadbeef} */ @Override @Transactional public void remove(AbsoluteLocation absoluteLocation) { handlers.get(deduceTable(absoluteLocation)).delete(m0(absoluteLocation)); }
3.26
open-banking-gateway_BaseDatasafeDbStorageService_m0_rdh
/** * Resolves objects' ID from path. * * @param path * Object path to resolve ID from. * @return ID of the object in the table. */ protected String m0(AbsoluteLocation<?> path) { return path.location().getWrapped().getPath().replaceAll("^/", ""); }
3.26
open-banking-gateway_BaseDatasafeDbStorageService_objectExists_rdh
/** * Checks if object exists within Datasafe storage. * * @param absoluteLocation * Absolute path including protocol to the object. I.e. {@code db://storage/deadbeef} * @return If the object at the {@code absoluteLocation} exists */ @Override @Transactional public boolean objectExists(AbsoluteLocation absolute...
3.26
open-banking-gateway_BaseDatasafeDbStorageService_read_rdh
/** * Open Datasafe object for reading. * * @param absoluteLocation * Absolute path of the object to read. I.e. {@code db://storage/deadbeef} * @return Stream to read data from. */@Override @SneakyThrows @Transactional(noRollbackFor = BaseDatasafeDbStorageService.DbStorageEntityNotFoundException.class) public I...
3.26
open-banking-gateway_BaseDatasafeDbStorageService_deduceTable_rdh
/** * Resolves objects' table name from path. * * @param path * Object path to resolve table from. * @return Table name that contains the object. */ protected String deduceTable(AbsoluteLocation<?> path) {return path.location().getWrapped().getHost(); }
3.26
open-banking-gateway_PaymentAccessFactory_paymentForAnonymousPsu_rdh
/** * Create {@code PaymentAccess} object that is similar to consent facing to anonymous (to OBG) user and ASPSP pair. * * @param fintech * Fintech that initiates the payment * @param aspsp * ASPSP/Bank that is going to perform the payment * @param session * Session that identifies the payment. * @return...
3.26
open-banking-gateway_PaymentAccessFactory_paymentForPsuAndAspsp_rdh
/** * Create {@code PaymentAccess} object that is similar to consent facing to PSU/Fintech user and ASPSP pair. * * @param psu * Payee/authorizer of this payment * @param aspsp * ASPSP/Bank that is going to perform the payment * @param session * Session that identifies the payment. * @return Payment cont...
3.26
open-banking-gateway_PaymentAccessFactory_paymentForFintech_rdh
/** * Create {@code PaymentAccess} object that is similar to consent facing to FinTech. * * @param fintech * Fintech that initiates the payment * @param session * Session that identifies the payment. * @param fintechPassword * FinTech Datasafe/KeyStore password * @return Payment context */ public Paymen...
3.26
open-banking-gateway_EncryptionProviderConfig_psuConsentEncryptionProvider_rdh
/** * PSU/Fintech user consent encryption. * * @param psuKeyPairConfig * Asymmetric encryption key configuration. * @return PSU/Fintech user data encryption */ @Bean PsuEncryptionServiceProvider psuConsentEncryptionProvider(PsuKeyPairConfig psuKeyPairConfig) { return new PsuEncryptionServiceProvider(new Cm...
3.26
open-banking-gateway_EncryptionProviderConfig_fintechOnlyEncryptionProvider_rdh
/** * Fintech data and consent access encryption. * * @param fintechOnlyKeyPairConfig * Asymmetric encryption key configuration. * @return Fintech data encryption */ @Bean FintechOnlyEncryptionServiceProvider fintechOnlyEncryptionProvider(FintechOnlyKeyPairConfig fintechOnlyKeyPairConfig) { return new Finte...
3.26
open-banking-gateway_EncryptionProviderConfig_consentAuthEncryptionProvider_rdh
/** * Consent authorization flow encryption. * * @param specSecretKeyConfig * Secret key based encryption configuration. * @return Consent Authorization encryption */ @Bean ConsentAuthorizationEncryptionServiceProvider consentAuthEncryptionProvider(ConsentSpecSecretKeyConfig specSecretKeyConfig) { return ...
3.26
open-banking-gateway_DatasafeDataStorage_read_rdh
/** * Reads encrypted database entry * * @param path * Path to the entry */ @Override public Optional<byte[]> read(String path) { return txOper.execute(callback -> find.apply(path).map(getData)); }
3.26
open-banking-gateway_DatasafeDataStorage_update_rdh
/** * Updates encrypted database entry * * @param path * Path to the entry * @param data * New entry value */ @Override public void update(String path, byte[] data) { txOper.execute(callback -> { Optional<T> entry = find.apply(path); if (entry.isPresent()) { T toSave = entr...
3.26
open-banking-gateway_DatasafeDataStorage_delete_rdh
/** * Removes encrypted database entry * * @param path * Path to the entry */ @Override public void delete(String path) { throw new IllegalStateException("Not allowed"); }
3.26
open-banking-gateway_FireFlyTransactionExporter_exportAccountsTransactionsToFireFly_rdh
// Method length is mostly from long argument list to API call @SuppressWarnings("checkstyle:MethodLength") private void exportAccountsTransactionsToFireFly(long exportJobId, UUID bankProfileId, String accountIdToExport, LocalDate from, LocalDate to, AtomicInteger numTransactionsExported, AtomicInteger numTransactio...
3.26
open-banking-gateway_FireFlyTransactionExporter_exportToFirefly_rdh
// Method length is mostly from long argument list to API call @Async @SuppressWarnings("checkstyle:MethodLength") public void exportToFirefly(String fireFlyToken, long exportJobId, UUID bankProfileId, List<String> accountsTransactionsToExport, LocalDate from, LocalDate to) {tokenProvider.setToken(fir...
3.26
open-banking-gateway_DatasafeConfigurer_provideBouncyCastle_rdh
/** * Installs BouncyCastle as required by Datasafe. */ @PostConstruct void provideBouncyCastle() { if (null != Security.getProvider(BouncyCastleProvider.PROVIDER_NAME)) { return; } Security.addProvider(new BouncyCastleProvider()); }
3.26
open-banking-gateway_DatasafeConfigurer_fintechDatasafeServices_rdh
/** * Fintech Datasafe storage. * * @param fintechReadStorePass * Datasafe password to open keystore. * @param serde * Serialization/Deserialization handler * @return FinTech Datasafe storage */ @Bean public FintechSecureStorage fintechDatasafeServices(@Value(ENCRYPTION_DATASAFE_READ_KEYSTORE_PREFIX + ".fin...
3.26
open-banking-gateway_DatasafeConfigurer_psuDatasafeServices_rdh
/** * PSU/FinTech user Datasafe storage. * * @param psuReadStorePass * Datasafe password to open keystore. * @param serde * Serialization/Deserialization handler * @return PSU/FinTech user Datasafe storage */ @Bean public PsuSecureStorage psuDatasafeServices(@Value(ENCRYPTION_DATASAFE_READ_KEYSTORE_PREFIX +...
3.26
open-banking-gateway_DatasafeConfigurer_fintechUserDatasafeServices_rdh
/** * FinTech consent specification Datasafe storage. * * @param psuReadStorePass * Datasafe password to open keystore. * @return PSU/FinTech user Datasafe storage */ @Bean public FintechConsentSpecSecureStorage fintechUserDatasafeServices(@Value(ENCRYPTION_DATASAFE_READ_KEYSTORE_PREFIX + ".fintech-user}
3.26
open-banking-gateway_ValidationIssue_toString_rdh
/** * * @return JSON representation of current object. */ @Override public String toString() { return (((((((((((("{" + "\"type\":\"") + type) + "\"") + ", \"scope\":\"") + scope) + "\"") + ", \"code\":\"") + code) + "\"") + ", \"captionMessage\":\"") + captionMessage) + "\"") + "}"; }
3.26
open-banking-gateway_AccountInformationRequestCommon_fintech_calls_list_accounts_for_anton_brueckner_rdh
// Note that anton.brueckner is typically used for REDIRECT (real REDIRECT that is returned by bank, and not REDIRECT approach in table) public SELF fintech_calls_list_accounts_for_anton_brueckner(String bankProfileId) { return m1(bankProfileId, false); }
3.26
open-banking-gateway_AccountInformationRequestCommon_fintech_calls_list_accounts_for_max_musterman_with_expected_balances_rdh
// Note that max.musterman is typically used for EMBEDDED (real EMBEDDED that is returned by bank, and not EMBEDDED approach in table) public SELF fintech_calls_list_accounts_for_max_musterman_with_expected_balances(Boolean withBalance) { ExtractableResponse<Response> response = withAccountsHeaders(MAX_MUSTERMAN).h...
3.26
open-banking-gateway_AccountInformationRequestCommon_fintech_calls_list_accounts_for_max_musterman_rdh
// Note that max.musterman is typically used for EMBEDDED (real EMBEDDED that is returned by bank, and not EMBEDDED approach in table) public SELF fintech_calls_list_accounts_for_max_musterman(String bankProfileId) { ExtractableResponse<Response> response = withAccountsHeaders(MAX_MUSTERMAN, bankProfileId)....
3.26
open-banking-gateway_AccountExportService_exportAccounts_rdh
// This is mostly example code how to use an application @Transactional @SuppressWarnings("CPD-START") public ResponseEntity<Long> exportAccounts(String fireFlyToken, UUID bankProfileId) { ResponseEntity<AccountList> accounts = aisApi.getAccounts(bankingConfig.getUserId(), apiConfig.getRedirectOkUri(UUID.randomUUI...
3.26
open-banking-gateway_ResultBody_getBody_rdh
/** * Body of the results - i.e. account list. */ @JsonIgnore default Object getBody() { return null; }
3.26
open-banking-gateway_ParsingUtil_parseMessageWithoutSensitiveNonSensitiveValidation_rdh
// This is the way original parser works - try - catch if message not matches - continue @SuppressWarnings("PMD.EmptyCatchBlock")public List<Message> parseMessageWithoutSensitiveNonSensitiveValidation(String from) { NodeList list = SYNTAX.getElementsByTagName("MSGdef"); List<Message> result = new ArrayList<>();...
3.26
open-banking-gateway_Xs2aWithBalanceParameters_toParameters_rdh
// TODO - MapStruct? public RequestParams toParameters() { return RequestParams.builder().withBalance(withBalance).build(); }
3.26
hudi_HoodieFlinkWriteClient_startAsyncCleaning_rdh
/** * Starts async cleaning service for finished commits. * * <p>The Flink write client is designed to write data set as buckets * but cleaning action should trigger after all the write actions within a * checkpoint finish. */ public void startAsyncCleaning() { tableServiceClient.startAsyncCleanerService(this...
3.26
hudi_HoodieFlinkWriteClient_insertOverwriteTable_rdh
/** * Removes all existing records of the Hoodie table and inserts the given HoodieRecords, into the table. * * @param records * HoodieRecords to insert * @param instantTime * Instant time of the commit * @return list of WriteStatus to inspect errors and counts */ public List<WriteStatus> insertOverwriteTab...
3.26
hudi_HoodieFlinkWriteClient_upgradeDowngrade_rdh
/** * Upgrade downgrade the Hoodie table. * * <p>This action should only be executed once for each commit. * The modification of the table properties is not thread safe. */ public void upgradeDowngrade(String instantTime, HoodieTableMetaClient metaClient) { new UpgradeDowngrade(metaClient, config, context, Fli...
3.26
hudi_HoodieFlinkWriteClient_preTxn_rdh
/** * Refresh the last transaction metadata, * should be called before the Driver starts a new transaction. */ public void preTxn(WriteOperationType operationType, HoodieTableMetaClient metaClient) { if (txnManager.isLockRequired() && config.needResolveWriteConflict(operationType)) { // refresh the meta ...
3.26
hudi_HoodieFlinkWriteClient_waitForCleaningFinish_rdh
/** * Blocks and wait for the async cleaning service to finish. * * <p>The Flink write client is designed to write data set as buckets * but cleaning action should trigger after all the write actions within a * checkpoint finish. ...
3.26
hudi_HoodieFlinkWriteClient_insertOverwrite_rdh
/** * Removes all existing records from the partitions affected and inserts the given HoodieRecords, into the table. * * @param records * HoodieRecords to insert * @param instantTime * Instant time of the commit * @return list of WriteStatus to inspect errors and counts */ public List<WriteStatus> insertOve...
3.26
hudi_HoodieFlinkWriteClient_initMetadataTable_rdh
/** * Initialized the metadata table on start up, should only be called once on driver. */ public void initMetadataTable() { ((HoodieFlinkTableServiceClient<T>) (tableServiceClient)).initMetadataTable(); }
3.26
hudi_HoodieFlinkWriteClient_cleanHandles_rdh
/** * Clean the write handles within a checkpoint interval. * All the handles should have been closed already. */ public void cleanHandles() { this.bucketToHandles.clear(); }
3.26
hudi_HoodieFlinkWriteClient_getOrCreateWriteHandle_rdh
/** * Get or create a new write handle in order to reuse the file handles. * * @param record * The first record in the bucket * @param config * Write config * @param instantTime * The instant time * @param table * The table * @param recordItr * Record iterator * @param overwrite * Whether this...
3.26
hudi_HoodieFlinkWriteClient_createIndex_rdh
/** * Complete changes performed at the given instantTime marker with specified action. */ @Overrideprotected HoodieIndex createIndex(HoodieWriteConfig writeConfig) { return FlinkHoodieIndexFactory.createIndex(((HoodieFlinkEngineContext) (context)), config); }
3.26
hudi_RepairUtils_m0_rdh
/** * Finds the dangling files to remove for a given instant to repair. * * @param instantToRepair * Instant timestamp to repair. * @param baseAndLogFilesFromFs * A {@link List} of base and log files based on the file system. * @param activeTime...
3.26
hudi_RepairUtils_tagInstantsOfBaseAndLogFiles_rdh
/** * Tags the instant time of each base or log file from the input file paths. * * @param basePath * Base path of the table. * @param allPaths * A {@link List} of file paths to tag. * @return A {@link Map} of instant time in {@link String} to a {@link List} of relative file paths. */ public static Map<Stri...
3.26
hudi_FileStatusDTO_safeReadAndSetMetadata_rdh
/** * Used to safely handle FileStatus calls which might fail on some FileSystem implementation. * (DeprecatedLocalFileSystem) */ private static void safeReadAndSetMetadata(FileStatusDTO dto, FileStatus fileStatus) { try { dto.owner = fileStatus.getOwner(); dto.group = fileStatus.getGroup(); ...
3.26
hudi_RowDataToHoodieFunctions_create_rdh
/** * Creates a {@link RowDataToHoodieFunction} instance based on the given configuration. */ @SuppressWarnings("rawtypes") public static RowDataToHoodieFunction<RowData, HoodieRecord> create(RowType rowType, Configuration conf) { if (conf.getLong(FlinkOptions.WRITE_RATE_LIMIT) > 0) { return new RowDat...
3.26
hudi_TableChanges_updateColumnType_rdh
/** * Update a column in the schema to a new type. * only support update primitive type. * Only updates that widen types are allowed. * * @param name * name of the column to update * @param newType * new type for the column * @...
3.26
hudi_TableChanges_updateColumnComment_rdh
/** * Update a column doc in the schema to a new primitive type. * * @param name * name of the column to update * @param newDoc * new documentation for the column * @return this * @throws IllegalArgumentException */ public ColumnUpdateChange updateColumnComment(String name, String newDoc) { checkColMod...
3.26
hudi_TableChanges_renameColumn_rdh
/** * Rename a column in the schema. * * @param name * name of the column to rename * @param newName * new name for the column * @return this * @throws IllegalArgumentException */ public ColumnUpdateChange renameColumn(String name, String newName) { checkColModifyIsLegal(name); Types.Field field = ...
3.26
hudi_TableChanges_getFullColName2Id_rdh
// expose to test public Map<String, Integer> getFullColName2Id() { return fullColName2Id; }
3.26
hudi_TableChanges_updateColumnNullability_rdh
/** * Update nullable for column. * only support required type -> optional type * * @param name * name of the column to update * @param nullable * nullable for updated name * @return this * @throws IllegalArgumentException */ public ColumnUpdateChange updateColumnNullability(String name, boolean nullable)...
3.26
hudi_HoodieTimelineArchiver_archiveIfRequired_rdh
/** * Check if commits need to be archived. If yes, archive commits. */ public int archiveIfRequired(HoodieEngineContext context, boolean acquireLock) throws IOException { try { if (acquireLock) { // there is no owner or instant time per se for archival. txnManage...
3.26
hudi_HoodieLogCompactionPlanGenerator_isFileSliceEligibleForLogCompaction_rdh
/** * Can schedule logcompaction if log files count is greater than 4 or total log blocks is greater than 4. * * @param fileSlice * File Slice under consideration. * @return Boolean value that determines whether log compaction will be scheduled or not. */ private boolean isFileSliceEligibleForLogCompaction(File...
3.26
hudi_HoodieTableFactory_checkPreCombineKey_rdh
/** * Validate pre_combine key. */ private void checkPreCombineKey(Configuration conf, ResolvedSchema schema) { List<String> fields = schema.getColumnNames(); String preCombineField = conf.get(FlinkOptions.PRECOMBINE_FIELD); if (!fields.contains(preCombineField)) { if (OptionsResolver.isDefaultHoo...
3.26
hudi_HoodieTableFactory_setupWriteOptions_rdh
/** * Sets up the write options from the table definition. */ private static void setupWriteOptions(Configuration conf) { if (FlinkOptions.isDefaultValueDefined(conf, FlinkOptions.OPERATION) && OptionsResolver.isCowTable(conf)) { conf.setBoolean(FlinkOptions.PRE_COMBINE, true); }}
3.26
hudi_HoodieTableFactory_setupHiveOptions_rdh
/** * Sets up the hive options from the table definition. */ private static void setupHiveOptions(Configuration conf, ObjectIdentifier tablePath) { if (!conf.contains(FlinkOptions.HIVE_SYNC_DB)) { conf.setString(FlinkOptions.HIVE_SYNC_DB, tablePath.getDatabaseName()); } if (!conf.contains(FlinkOptions.HIVE_SYNC_TABL...
3.26
hudi_HoodieTableFactory_setupHoodieKeyOptions_rdh
/** * Sets up the hoodie key options (e.g. record key and partition key) from the table definition. */ private static void setupHoodieKeyOptions(Configuration conf, CatalogTable table) { List<String> pkColumns = table.getSchema().getPrimaryKey().map(UniqueConstraint::getColumns).orElse(Collections...
3.26
hudi_HoodieTableFactory_checkTableType_rdh
/** * Validate the table type. */ private void checkTableType(Configuration conf) { String tableType = conf.get(FlinkOptions.TABLE_TYPE); if (StringUtils.nonEmpty(tableType)) { try { HoodieTableType.valueOf(tableType); } catch (IllegalArgumentException e) { throw new...
3.26
hudi_HoodieTableFactory_sanityCheck_rdh
// ------------------------------------------------------------------------- // Utilities // ------------------------------------------------------------------------- /** * The sanity check. * * @param conf * The table options * @param schema * The table schema */ private void sanityCheck(Configuration conf...
3.26
hudi_HoodieTableFactory_checkRecordKey_rdh
/** * Validate the record key. */ private void checkRecordKey(Configuration conf, ResolvedSchema schema) { List<String> v6 = schema.getColumnNames(); if (!schema.getPrimaryKey().isPresent()) { String[] recordKeys = conf.get(FlinkOptions.RECORD_KEY_FIELD).split(","); if (((recordKeys.len...
3.26
hudi_HoodieTableFactory_setupConfOptions_rdh
/** * Sets up the config options based on the table definition, for e.g, the table name, primary key. * * @param conf * The configuration to set up * @param tablePath * The table path * @param table * The catalog table * @param schema * The physical schema */ private static void setupConfOptions(Conf...
3.26
hudi_HoodieTableFactory_inferAvroSchema_rdh
/** * Inferences the deserialization Avro schema from the table schema (e.g. the DDL) * if both options {@link FlinkOptions#SOURCE_AVRO_SCHEMA_PATH} and * {@link FlinkOptions#SOURCE_AVRO_SCHEMA} are not specified. * * @param conf * The configuration * @param rowType * The specified table row type */ privat...
3.26
hudi_HoodieTableFactory_setupSortOptions_rdh
/** * Sets up the table exec sort options. */ private void setupSortOptions(Configuration conf, ReadableConfig contextConfig) { if (contextConfig.getOptional(TABLE_EXEC_SORT_MAX_NUM_FILE_HANDLES).isPresent()) { conf.set(TABLE_EXEC_SORT_MAX_NUM_FILE_HANDLES, contextConfig.get(TABLE_EXEC_SORT_MAX_NUM_FILE_HANDLES)); } ...
3.26
hudi_HoodieHiveUtils_getNthParent_rdh
/** * Gets the n'th parent for the Path. Assumes the path has at-least n components * * @param path * @param n * @return */ public static Path getNthParent(Path path, int n) { Path parent = path; for (int i = 0; i < n; i++) { parent = parent.getParent(); } return parent; }
3.26
hudi_HoodieHiveUtils_getDateWriteable_rdh
/** * Get date writeable object from int value. * Hive3 use DateWritableV2 to build date objects and Hive2 use DateWritable. * So that we need to initialize date according to the version of Hive. */ public static Writable getDateWriteable(int value) { return HIVE_SHIM.getDateWriteable(value); }
3.26
hudi_HoodieHiveUtils_getIncrementalTableNames_rdh
/** * Returns a list of tableNames for which hoodie.<tableName>.consume.mode is set to incremental else returns empty List * * @param job * @return */ public static List<String> getIncrementalTableNames(JobContext job) { Map<String, String> tablesModeMap = job.getConfiguration().getValByRegex(HOODIE_CONSUME_MO...
3.26
hudi_HoodieHiveUtils_getTimestampWriteable_rdh
/** * Get timestamp writeable object from long value. * Hive3 use TimestampWritableV2 to build timestamp objects and Hive2 use TimestampWritable. * So that we need to initialize timestamp according to the version of Hive. */ public static Writable getTimestampWriteable(long value, boolean timestampMillis) { ret...
3.26
hudi_HoodieTableMetaClient_getMarkerFolderPath_rdh
/** * Returns Marker folder path. * * @param instantTs * Instant Timestamp * @return */ public String getMarkerFolderPath(String instantTs) { return String.format("%s%s%s", getTempFolderPath(), Path.SEPARATOR, instantTs); }
3.26
hudi_HoodieTableMetaClient_getCommitsAndCompactionTimeline_rdh
/** * Get the commit + pending-compaction timeline visible for this table. A RT filesystem view is constructed with this * timeline so that file-slice after pending compaction-requested instant-time is also considered valid. A RT * file-system view for reading must then merge the file-slices before and after pending...
3.26
hudi_HoodieTableMetaClient_m4_rdh
/** * Helper method to scan all hoodie-instant metafiles. * * @param fs * The file system implementation for this table * @param metaPath * The meta path where meta files are stored * @param nameFilter * The name filter to filter meta files * @return An array of meta FileStatus * @throws IOException * ...
3.26
hudi_HoodieTableMetaClient_getHeartbeatFolderPath_rdh
/** * * @return Heartbeat folder path. */ public static String getHeartbeatFolderPath(String basePath) { return String.format("%s%s%s", basePath, Path.SEPARATOR, HEARTBEAT_FOLDER_NAME); }
3.26
hudi_HoodieTableMetaClient_initTable_rdh
/** * Init Table with the properties build by this builder. * * @param configuration * The hadoop config. * @param basePath * The base path for hoodie table. */ public HoodieTableMetaClient initTable(Configuration configuration, String basePath) throws IOException { return HoodieTableMetaClient.m3(configurat...
3.26
hudi_HoodieTableMetaClient_getRawFs_rdh
/** * Return raw file-system. * * @return fs */ public FileSystem getRawFs() { return getFs().getFileSystem(); }
3.26
hudi_HoodieTableMetaClient_m1_rdh
/** * * @return Hashing metadata base path */ public String m1() { return new Path(metaPath.get(), HASHING_METADATA_FOLDER_NAME).toString(); }
3.26
hudi_HoodieTableMetaClient_getArchivedTimeline_rdh
/** * Returns the cached archived timeline from startTs (inclusive). * * @param startTs * The start instant time (inclusive) of the archived timeline. * @return the archived timeline. */ public HoodieArchivedTimeline getArchivedTimeline(String startTs) { return m2(startTs, true); }
3.26
hudi_HoodieTableMetaClient_getBootstrapIndexByPartitionFolderPath_rdh
/** * * @return Bootstrap Index By Partition Folder */ public String getBootstrapIndexByPartitionFolderPath() { return (basePath + Path.SEPARATOR) + BOOTSTRAP_INDEX_BY_PARTITION_FOLDER_PATH; }
3.26
hudi_HoodieTableMetaClient_createNewInstantTime_rdh
/** * Returns next instant time in the correct format. * * @param shouldLock * whether the lock should be enabled to get the instant time. */ public String createNewInstantTime(boolean shouldLock) { TimeGenerator timeGenerator = TimeGenerators.getTimeGenerator(timeGeneratorConfig, f0.get()); return Hoodi...
3.26
hudi_HoodieTableMetaClient_getMetaAuxiliaryPath_rdh
/** * * @return Auxiliary Meta path */ public String getMetaAuxiliaryPath() { return (basePath + Path.SEPARATOR) + AUXILIARYFOLDER_NAME; }
3.26
hudi_HoodieTableMetaClient_reloadActiveTimeline_rdh
/** * Reload ActiveTimeline and cache. * * @return Active instants timeline */ public synchronized HoodieActiveTimeline reloadActiveTimeline() { activeTimeline = new HoodieActiveTimeline(this); return activeTimeline; }
3.26
hudi_HoodieTableMetaClient_scanHoodieInstantsFromFileSystem_rdh
/** * Helper method to scan all hoodie-instant metafiles and construct HoodieInstant objects. * * @param timelinePath * MetaPath where instant files are stored * @param includedExtensions * Included hoodie extensions * @param applyLayoutVersionFilters * Depending on Timeline layout version, if there are m...
3.26
hudi_HoodieTableMetaClient_getArchivePath_rdh
/** * * @return path where archived timeline is stored */ public String getArchivePath() { String archiveFolder = tableConfig.getArchivelogFolder(); return (getMetaPath() + Path.SEPARATOR) + archiveFolder; }
3.26
hudi_HoodieTableMetaClient_getFs_rdh
/** * Get the FS implementation for this table. */ public HoodieWrapperFileSystem getFs() { if (fs == null) { FileSystem fileSystem = FSUtils.getFs(metaPath.get(), f0.newCopy()); if (fileSystemRetryConfig.isFileSystemActionRetryEnable()) { fileSystem = new HoodieRetryWrapperFileSystem...
3.26
hudi_HoodieTableMetaClient_getTableConfig_rdh
/** * * @return Table Config */ public HoodieTableConfig getTableConfig() { return tableConfig; }
3.26
hudi_HoodieTableMetaClient_buildFunctionalIndexDefinition_rdh
/** * Builds functional index definition and writes to index definition file. * * @param indexMetaPath * Path to index definition file * @param indexName * Name of the index * @param indexType * Type of the index * @param columns * Columns on which index is built * @param options * Options for the...
3.26
hudi_HoodieTableMetaClient_getMetaPath_rdh
/** * * @return Meta path */ public String getMetaPath() { return metaPath.get().toString();// this invocation is cached }
3.26
hudi_HoodieTableMetaClient_getTempFolderPath_rdh
/** * * @return Temp Folder path */ public String getTempFolderPath() { return (basePath + Path.SEPARATOR) + TEMPFOLDER_NAME; }
3.26
hudi_HoodieTableMetaClient_getActiveTimeline_rdh
/** * Get the active instants as a timeline. * * @return Active instants timeline */ public synchronized HoodieActiveTimeline getActiveTimeline() { if (activeTimeline == null) { activeTimeline = new HoodieActiveTimeline(this); } return activeTimeline; }
3.26
hudi_HoodieTableMetaClient_getCommitActionType_rdh
/** * Gets the commit action type. */public String getCommitActionType() {return CommitUtils.getCommitActionType(this.getTableType()); }
3.26
hudi_HoodieTableMetaClient_getCommitsTimeline_rdh
/** * Get the commit timeline visible for this table. */ public HoodieTimeline getCommitsTimeline() { switch (this.getTableType()) { case COPY_ON_WRITE :return getActiveTimeline().getCommitTimeline(); case MERGE_ON_READ : // We need to include the parquet files written out in delta com...
3.26
hudi_HoodieTableMetaClient_getFunctionalIndexMetadata_rdh
/** * Returns Option of {@link HoodieFunctionalIndexMetadata} from index definition file if present, else returns empty Option. */ public Option<HoodieFunctionalIndexMetadata> getFunctionalIndexMetadata() { if (functionalIndexMetadata.isPresent()) { return functionalIndexMetadata; } if (tableConfi...
3.26
hudi_HoodieTableMetaClient_getCommitTimeline_rdh
/** * Get the compacted commit timeline visible for this table. */ public HoodieTimeline getCommitTimeline() { switch (this.getTableType()) { case COPY_ON_WRITE : case MERGE_ON_READ : // We need to include the parquet files written out in delta commits in tagging return getAct...
3.26
hudi_HoodieTableMetaClient_m2_rdh
/** * Returns the cached archived timeline if using in-memory cache or a fresh new archived * timeline if not using cache, from startTs (inclusive). * <p> * Instantiating an archived timeline is costly operation if really early startTs is * specified. * <p> * This method is not thread safe. * * @param startTs ...
3.26
hudi_HoodieTableMetaClient_validateTableProperties_rdh
/** * Validate table properties. * * @param properties * Properties from writeConfig. */ public void validateTableProperties(Properties properties) { // Once meta fields are disabled, it cant be re-enabled for a given table. if ((!getTableConfig().populateMetaFields()) && Boolean.parseBoolean(((String) (...
3.26
hudi_HoodieTableMetaClient_getTableType_rdh
/** * * @return Hoodie Table Type */ public HoodieTableType getTableType() { return tableType; }
3.26
hudi_HoodieTableMetaClient_isTimelineNonEmpty_rdh
/** * * @return {@code true} if any commits are found, else {@code false}. */ public boolean isTimelineNonEmpty() { return !getCommitsTimeline().filterCompletedInstants().empty(); }
3.26
hudi_HoodieTableMetaClient_readObject_rdh
/** * This method is only used when this object is de-serialized in a spark executor. * * @deprecated */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); fs = null;// will be lazily initialized }
3.26
hudi_HoodieTableMetaClient_getBasePathV2_rdh
/** * Returns base path of the table */ public Path getBasePathV2() { return basePath.get(); }
3.26
hudi_HoodieTableMetaClient_getBootstrapIndexByFileIdFolderNameFolderPath_rdh
/** * * @return Bootstrap Index By Hudi File Id Folder */ public String getBootstrapIndexByFileIdFolderNameFolderPath() { return (basePath + Path.SEPARATOR) + BOOTSTRAP_INDEX_BY_FILE_ID_FOLDER_PATH; }
3.26
hudi_HoodieTableMetaClient_getSchemaFolderName_rdh
/** * * @return schema folder path */ public String getSchemaFolderName() { return new Path(metaPath.get(), SCHEMA_FOLDER_NAME).toString(); }
3.26
hudi_HoodieTableMetaClient_getBasePath_rdh
/** * * @return Base path * @deprecated please use {@link #getBasePathV2()} */ @Deprecated public String getBasePath() { return basePath.get().toString();// this invocation is cached }
3.26
hudi_BulkInsertWriterHelper_addMetadataFields_rdh
/** * Adds the Hoodie metadata fields to the given row type. */ public static RowType addMetadataFields(RowType rowType, boolean withOperationField) { List<RowType.RowField> mergedFields = new ArrayList<>(); LogicalType metadataFieldType = DataTypes.STRING().getLogicalType(); RowType.RowField commitTimeF...
3.26