Skip to content
This repository was archived by the owner on Apr 14, 2023. It is now read-only.

Commit 48b5d23

Browse files
committed
Accommodating for hops-util API changes.
1 parent 2233046 commit 48b5d23

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

spark/src/main/java/io/hops/examples/spark/WorkflowExample.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import java.util.logging.Level;
77
import java.util.logging.Logger;
88
import javax.ws.rs.core.Response;
9+
10+
import io.hops.util.exceptions.WorkflowManagerException;
911
import org.apache.spark.sql.SparkSession;
1012

1113
/**
@@ -18,7 +20,8 @@ public class WorkflowExample {
1820

1921
private static final Logger LOG = Logger.getLogger(WorkflowManager.class.getName());
2022

21-
public static void main(String[] args) throws CredentialsNotFoundException, InterruptedException {
23+
public static void main(String[] args)
24+
throws CredentialsNotFoundException, InterruptedException, WorkflowManagerException {
2225

2326
SparkSession spark = SparkSession
2427
.builder()

spark/src/main/java/io/hops/examples/spark/kafka/StreamingKafkaElastic.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import com.google.common.base.Strings;
44
import io.hops.util.exceptions.CredentialsNotFoundException;
55
import io.hops.util.HopsUtil;
6+
import io.hops.util.exceptions.WorkflowManagerException;
67
import io.hops.util.spark.SparkConsumer;
78
import java.io.BufferedReader;
89
import java.io.IOException;
@@ -120,7 +121,8 @@ public void call(JavaRDD<LogEntryFilebeat> rdd, Time time) throws Exception {
120121
HopsUtil.shutdownGracefully(jssc);
121122
}
122123

123-
private static JSONObject parser(String logType, String line, String appId) throws CredentialsNotFoundException {
124+
private static JSONObject parser(String logType, String line, String appId)
125+
throws CredentialsNotFoundException, WorkflowManagerException {
124126
JSONObject jsonLog = new JSONObject(line);
125127
JSONObject index = new JSONObject();
126128
String priority, logger, thread, timestamp;

0 commit comments

Comments
 (0)