1
0

[MINOR] Fix a potential NPE and some finer points of hudi cli (#5656)

This commit is contained in:
luoyajun
2022-05-25 02:13:18 +08:00
committed by GitHub
parent 18635b533e
commit f30b3aef3e
5 changed files with 26 additions and 12 deletions

View File

@@ -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(""));