Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Remove @LegacyFileIO and Make DelegationRefreshToken use new cluster.yaml #100

Merged
merged 3 commits into from May 13, 2024

Conversation

HotSushi
Copy link
Collaborator

@HotSushi HotSushi commented May 9, 2024

Summary

Let's start refactoring the old code out πŸ™Œ

There are two refactors:

  1. Remove old FileIO instance provisioned via FsStorageProvider
// old code
public class MainApplicationConfig
  @Bean
  public FileIO provideIcebergFileIO() {
         return new HadoopFileIO(fsStorageProvider.storageClient().getConf())
  }
  1. DelegationTokenRefresher should use the new cluster.yaml
 // new cluster yaml
storages:
  default-type: "hdfs"
  types:
     hdfs:
        rootpath: "/tmp/unittest"
        endpoint: "hdfs://localhost:9000"
        parameters:
           token.refresh.enabled: "true"             <----------- THIS
           token.refresh.schedule.cron: "* * * * * ?"          <----------- THIS

There are no major changes to code otherwise.

Changes

  • Refactoring
  • Tests

Testing Done

βœ… Added unit tests for token refresh that were missing before πŸ₯³
βœ… mint build and existing tests pass
βœ… manually tested token refresh code in docker setup
βœ… manually tested fileIO code in docker setup

@HotSushi HotSushi requested review from sumedhsakdeo, autumnust and jainlavina and removed request for sumedhsakdeo and autumnust May 9, 2024 17:11
@HotSushi
Copy link
Collaborator Author

HotSushi commented May 9, 2024

cc: @ctrezzo

Copy link
Collaborator

@autumnust autumnust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there coordination required when picking up this change internally, since you are making some config changes ?

Copy link
Member

@abhisheknath2011 abhisheknath2011 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@autumnust autumnust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for answering the questions. lgtm

@HotSushi HotSushi merged commit 81c0887 into linkedin:main May 13, 2024
1 check passed
@HotSushi HotSushi deleted the refactor_fileIO branch May 13, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants