[HUDI-2079] Make CLI command tests functional (#3601)
Make all tests in org.apache.hudi.cli.commands extend org.apache.hudi.cli.functional.CLIFunctionalTestHarness and tag as "functional". This also resolves a blocker where DFS init consistently failed when moving to ubuntu 18.04
This commit is contained in:
@@ -44,7 +44,7 @@ public class HoodieCLI {
|
||||
protected static HoodieTableMetaClient tableMetadata;
|
||||
public static HoodieTableMetaClient syncTableMetadata;
|
||||
public static TimelineLayoutVersion layoutVersion;
|
||||
private static TempViewProvider tempViewProvider;
|
||||
public static TempViewProvider tempViewProvider;
|
||||
|
||||
/**
|
||||
* Enum for CLI state.
|
||||
@@ -114,17 +114,4 @@ public class HoodieCLI {
|
||||
|
||||
return tempViewProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Close tempViewProvider.
|
||||
* <p/>
|
||||
* For test, avoid multiple SparkContexts.
|
||||
*/
|
||||
public static synchronized void closeTempViewProvider() {
|
||||
if (tempViewProvider != null) {
|
||||
tempViewProvider.close();
|
||||
tempViewProvider = null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,6 +56,11 @@ public class SparkTempViewProvider implements TempViewProvider {
|
||||
}
|
||||
}
|
||||
|
||||
public SparkTempViewProvider(JavaSparkContext jsc, SQLContext sqlContext) {
|
||||
this.jsc = jsc;
|
||||
this.sqlContext = sqlContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createOrReplace(String tableName, List<String> headers, List<List<Comparable>> rows) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user