1
0

[MINOR] Remove the declaration of thrown RuntimeException (#1305)

This commit is contained in:
lamber-ken
2020-02-05 23:23:20 +08:00
committed by GitHub
parent 425e3e6c78
commit 46842f4e92
8 changed files with 23 additions and 39 deletions

View File

@@ -217,7 +217,7 @@ public class HDFSParquetImporter implements Serializable {
List<String> validCommands = Arrays.asList("insert", "upsert", "bulkinsert");
@Override
public void validate(String name, String value) throws ParameterException {
public void validate(String name, String value) {
if (value == null || !validCommands.contains(value.toLowerCase())) {
throw new ParameterException(
String.format("Invalid command: value:%s: supported commands:%s", value, validCommands));
@@ -230,7 +230,7 @@ public class HDFSParquetImporter implements Serializable {
List<String> validFormats = Collections.singletonList("parquet");
@Override
public void validate(String name, String value) throws ParameterException {
public void validate(String name, String value) {
if (value == null || !validFormats.contains(value)) {
throw new ParameterException(
String.format("Invalid format type: value:%s: supported formats:%s", value, validFormats));

View File

@@ -90,7 +90,7 @@ public class HoodieWithTimelineServer implements Serializable {
Preconditions.checkArgument(gotMessages.equals(messages), "Got expected reply from Server");
}
public String sendRequest(String driverHost, int port) throws RuntimeException {
public String sendRequest(String driverHost, int port) {
String url = String.format("http://%s:%d/", driverHost, port);
try (CloseableHttpClient client = HttpClientBuilder.create().build()) {