Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,15 @@ stages:
inputs:
mavenPomFile: 'pom.xml'
goals: 'test'
options: $(MVN_OPTS_TEST) -Punit-tests -pl $(JOB1_MODULES),hudi-client/hudi-spark-client
publishJUnitResults: false
jdkVersionOption: '1.8'
mavenOptions: '-Xmx4g'
- task: [email protected]
displayName: FT common flink
inputs:
mavenPomFile: 'pom.xml'
goals: 'test'
options: $(MVN_OPTS_TEST) -Pfunctional-tests -pl $(JOB1_MODULES)
options: $(MVN_OPTS_TEST) -Punit-tests -pl hudi-client/hudi-spark-client
publishJUnitResults: false
jdkVersionOption: '1.8'
mavenOptions: '-Xmx4g'
- script: |
grep "testcase" */target/surefire-reports/*.xml */*/target/surefire-reports/*.xml | awk -F'"' ' { print $6,$4,$2 } ' | sort -nr | head -n 100
displayName: Top 100 long-running testcases
- job: UT_FT_2
condition : false
displayName: FT client/spark-client
timeoutInMinutes: '150'
steps:
Expand All @@ -145,6 +137,7 @@ stages:
grep "testcase" */target/surefire-reports/*.xml */*/target/surefire-reports/*.xml | awk -F'"' ' { print $6,$4,$2 } ' | sort -nr | head -n 100
displayName: Top 100 long-running testcases
- job: UT_FT_3
condition : false
displayName: UT FT clients & cli & utilities & sync
timeoutInMinutes: '150'
steps:
Expand Down Expand Up @@ -178,6 +171,7 @@ stages:
grep "testcase" */target/surefire-reports/*.xml */*/target/surefire-reports/*.xml | awk -F'"' ' { print $6,$4,$2 } ' | sort -nr | head -n 100
displayName: Top 100 long-running testcases
- job: UT_FT_4
condition : false
displayName: UT FT other modules
timeoutInMinutes: '150'
steps:
Expand Down Expand Up @@ -211,6 +205,7 @@ stages:
grep "testcase" */target/surefire-reports/*.xml */*/target/surefire-reports/*.xml | awk -F'"' ' { print $6,$4,$2 } ' | sort -nr | head -n 100
displayName: Top 100 long-running testcases
- job: IT
condition : false
displayName: IT modules
timeoutInMinutes: '150'
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@
import org.apache.hudi.common.model.HoodieRecord;
import org.apache.hudi.common.util.Option;
import org.apache.hudi.config.HoodieWriteConfig;
import org.apache.hudi.exception.HoodieIOException;
import org.apache.hudi.testutils.HoodieClientTestBase;

import org.apache.hadoop.fs.Path;
import org.apache.spark.api.java.JavaPairRDD;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.sql.AnalysisException;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand All @@ -48,6 +51,35 @@
*/
public class TestHoodieReadClient extends HoodieClientTestBase {

private String basePathWithoutScheme = null;
private static final String LOCAL_FS_SCHEME = "file://";

/**
* Initializes basePath to use local FS.
*/
protected void initPath() {
try {
java.nio.file.Path basePath = tempDir.resolve("dataset");
java.nio.file.Files.createDirectories(basePath);
basePathWithoutScheme = basePath.toString().contains("//") ? basePath.toString().substring(basePath.toString().indexOf("//") + 2) : basePath.toString();
this.basePath = LOCAL_FS_SCHEME + basePathWithoutScheme;
} catch (IOException ioe) {
throw new HoodieIOException(ioe.getMessage(), ioe);
}
}

/**
* Initializes a file system with the hadoop configuration of Spark context.
*/
protected void initFileSystem() {
super.initFileSystem();
try {
fs.mkdirs(new Path(basePath));
} catch (IOException e) {
throw new HoodieIOException("Failed to create base path " + basePath);
}
}

/**
* Test ReadFilter API after writing new records using HoodieWriteClient.insert.
*/
Expand Down