-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replication job to trigger setup and carbon flow for replica tables […
…WIP] (#276) ## Summary New job workflow to run Replication setup process on Airflow. Applies to primary tables with defined ReplicationConfig. Design decisions: 1. The Replication job does not use JobsClient to trigger a job. Instead it will use Airflow client to trigger and manage lifecycle of a Airflow job. 2. Replication will have the task definition in Li-Openhouse side since it needs to leverage AirflowClient. 3. As there can be multiple ReplicationConfigs for a table. The ReplicationTask goes over each config sequentially to trigger a setup job corresponding to the config. Future work: 1. Develop AirflowClient which will allow triggering, managing state of Airflow jobs and integrate with Replication job run. 2. Develop CarbonClient which can trigger carbon jobs to setup scheduled replication flows. 3. Integrate CarbonClient with Replica table setup job ## Changes - [ ] Client-facing API Changes - [ ] Internal API Changes - [ ] Bug Fixes - [x] New Features - [ ] Performance Improvements - [ ] Code Style - [ ] Refactoring - [ ] Documentation - [ ] Tests For all the boxes checked, please include additional details of the changes made in this pull request. ## Testing Done <!--- Check any relevant boxes with "x" --> - [x] Manually Tested on local docker setup. Please include commands ran, and their output. - [ ] Added new tests for the changes made. - [ ] Updated existing tests to reflect the changes made. - [ ] No tests added or updated. Please explain why. If unsure, please feel free to ask for help. - [ ] Some other form of testing like staging or soak time in production. Please explain. Tested on Local docker setup: Ran the new Replication Job with Local Docker setup. Added a table with replicationConfig. Observed: 1. The new job gets picked up by the JobScheduler and follows the task flow 2. Only Primary tables with defined replicationConfig are considered and others are filtered out <img width="1900" alt="Screenshot 2025-01-08 at 10 17 11 PM" src="https://github.com/user-attachments/assets/e46b210a-650c-43f5-9759-840257206595" /> <img width="1598" alt="Screenshot 2025-01-08 at 3 30 15 PM" src="https://github.com/user-attachments/assets/8ae869c1-5ebc-4fd0-b95a-ae5af2c03b74" /> For all the boxes checked, include a detailed description of the testing done for the changes made in this pull request. # Additional Information - [ ] Breaking Changes - [ ] Deprecations - [ ] Large PR broken into smaller PRs, and PR plan linked in the description. For all the boxes checked, include additional details of the changes made in this pull request.
- Loading branch information
1 parent
3e8d387
commit 3c58268
Showing
6 changed files
with
116 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
apps/spark/src/main/java/com/linkedin/openhouse/jobs/util/ReplicationConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.linkedin.openhouse.jobs.util; | ||
|
||
import lombok.Builder; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.ToString; | ||
|
||
/** Table retention config class. This is app side representation of /tables policies->retention */ | ||
@Builder | ||
@Getter | ||
@EqualsAndHashCode | ||
@ToString | ||
public class ReplicationConfig { | ||
private final String schedule; | ||
private final String tableOwner; | ||
private final String cluster; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters