Back to home page

OSCL-LXR

 
 

    


0001 #
0002 # Licensed to the Apache Software Foundation (ASF) under one or more
0003 # contributor license agreements.  See the NOTICE file distributed with
0004 # this work for additional information regarding copyright ownership.
0005 # The ASF licenses this file to You under the Apache License, Version 2.0
0006 # (the "License"); you may not use this file except in compliance with
0007 # the License.  You may obtain a copy of the License at
0008 #
0009 #    http://www.apache.org/licenses/LICENSE-2.0
0010 #
0011 # Unless required by applicable law or agreed to in writing, software
0012 # distributed under the License is distributed on an "AS IS" BASIS,
0013 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014 # See the License for the specific language governing permissions and
0015 # limitations under the License.
0016 #
0017 
0018 __all__ = ["StreamingListener"]
0019 
0020 
0021 class StreamingListener(object):
0022 
0023     def __init__(self):
0024         pass
0025 
0026     def onStreamingStarted(self, streamingStarted):
0027         """
0028         Called when the streaming has been started.
0029         """
0030         pass
0031 
0032     def onReceiverStarted(self, receiverStarted):
0033         """
0034         Called when a receiver has been started
0035         """
0036         pass
0037 
0038     def onReceiverError(self, receiverError):
0039         """
0040         Called when a receiver has reported an error
0041         """
0042         pass
0043 
0044     def onReceiverStopped(self, receiverStopped):
0045         """
0046         Called when a receiver has been stopped
0047         """
0048         pass
0049 
0050     def onBatchSubmitted(self, batchSubmitted):
0051         """
0052         Called when a batch of jobs has been submitted for processing.
0053         """
0054         pass
0055 
0056     def onBatchStarted(self, batchStarted):
0057         """
0058         Called when processing of a batch of jobs has started.
0059         """
0060         pass
0061 
0062     def onBatchCompleted(self, batchCompleted):
0063         """
0064         Called when processing of a batch of jobs has completed.
0065         """
0066         pass
0067 
0068     def onOutputOperationStarted(self, outputOperationStarted):
0069         """
0070         Called when processing of a job of a batch has started.
0071         """
0072         pass
0073 
0074     def onOutputOperationCompleted(self, outputOperationCompleted):
0075         """
0076         Called when processing of a job of a batch has completed
0077         """
0078         pass
0079 
0080     class Java:
0081         implements = ["org.apache.spark.streaming.api.java.PythonStreamingListener"]