Github user lresende commented on a diff in the pull request:
https://github.com/apache/spark/pull/11139#discussion_r52381133
--- Diff:
examples/src/main/java/org/apache/spark/examples/streaming/JavaRecoverableNetworkWordCount.java
---
@@ -204,13 +202,25 @@ public static void main(String[] args) {
final int port = Integer.parseInt(args[1]);
final String checkpointDirectory = args[2];
final String outputPath = args[3];
+
+ // Function to create JavaStreamingContext without any output
operations
+ // (used to detect the new context)
+ final AtomicBoolean newContextCreated = new AtomicBoolean(false);
+ Function0<JavaStreamingContext> createContextFunc = new
Function0<JavaStreamingContext>() {
+ @Override
+ public JavaStreamingContext call() {
+ newContextCreated.set(true);
+ return createContext(ip, port, checkpointDirectory, outputPath);
+ }
+ };
+
JavaStreamingContextFactory factory = new
JavaStreamingContextFactory() {
--- End diff --
Thanks @zsxwing , removed on the latest code.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]