[MINOR] Fix a potential NPE and some finer points of hudi cli (#5656)
This commit is contained in:
@@ -22,11 +22,22 @@ import org.apache.hudi.common.util.Option;
|
||||
import org.apache.hudi.cli.utils.SparkUtil;
|
||||
import org.apache.spark.SparkConf;
|
||||
|
||||
import org.apache.spark.launcher.SparkLauncher;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
public class SparkUtilTest {
|
||||
|
||||
@Test
|
||||
public void testInitSparkLauncher() throws URISyntaxException {
|
||||
SparkLauncher sparkLauncher = SparkUtil.initLauncher(null);
|
||||
assertNotNull(sparkLauncher);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetDefaultSparkConf() {
|
||||
SparkConf sparkConf = SparkUtil.getDefaultConf("test-spark-app", Option.of(""));
|
||||
|
||||
Reference in New Issue
Block a user