-
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.
- Loading branch information
Showing
8 changed files
with
142 additions
and
41 deletions.
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
37 changes: 37 additions & 0 deletions
37
.../test/java/com/linkedin/openhouse/jobs/spark/DataLayoutStrategyGeneratorSparkAppTest.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,37 @@ | ||
package com.linkedin.openhouse.jobs.spark; | ||
|
||
import com.linkedin.openhouse.jobs.util.OtelConfig; | ||
import com.linkedin.openhouse.tablestest.OpenHouseSparkITest; | ||
import io.opentelemetry.api.metrics.Meter; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.junit.jupiter.api.Test; | ||
|
||
@Slf4j | ||
public class DataLayoutStrategyGeneratorSparkAppTest extends OpenHouseSparkITest { | ||
private final Meter meter = OtelConfig.getMeter(this.getClass().getName()); | ||
|
||
@Test | ||
public void testDataLayoutStrategyGeneratorSparkApp() throws Exception { | ||
final String tableName = "db.test_dlo_strategy_sql"; | ||
try (Operations ops = Operations.withCatalog(getSparkSession(), meter)) { | ||
// TODO: use the below style of testing to create delete files, execute DLO, and validate the | ||
// DLO table was created and the contents of it | ||
// val rowsBatchSize = 10 | ||
// val startDayLookback = 0 | ||
// val numExpectedDeleteFiles = 1 | ||
// val numExpectedDataFiles = 1 | ||
// createTable(fqtn) | ||
// appendRows(fqtn, rowsBatchSize, startDayLookback) | ||
// verifyInitialFiles(fqtn, numExpectedDataFiles) | ||
// verifyInitialRows(fqtn, rowsBatchSize) | ||
// deleteFirstRecordWithoutSpark(fqtn) | ||
// verifyFilesAfterDelete(fqtn, numExpectedDeleteFiles) | ||
// verifyRowsAfterDelete(fqtn, rowsBatchSize - 1) | ||
// appendRows(fqtn, rowsBatchSize, startDayLookback) | ||
// val jobId = submitCompactionJob(fqtn) | ||
// assert(waitJobSucceeded(jobId), "Compaction job didn't succeed") | ||
// touchTable(fqtn) | ||
// verifyDeleteFilesRemovedByCompaction(fqtn, numExpectedDeleteFiles) | ||
} | ||
} | ||
} |
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
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