yihua commented on code in PR #6801:
URL: https://github.com/apache/hudi/pull/6801#discussion_r980668798
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/TestHoodieReadClient.java:
##########
@@ -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();
Review Comment:
The HDFS base path is like this: `hdfs://localhost:51695/user/ethan/src`, so
we need to strip the first level when parsed. Should we use a folder under
`/tmp` instead?
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/TestHoodieReadClient.java:
##########
@@ -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();
Review Comment:
nit: this can be a local variable.
##########
azure-pipelines.yml:
##########
@@ -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
Review Comment:
+1 on saving the CI resources for testing the fix. Don't forget to revert
the changes in yml before merging.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]