-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StreamingLens Insights always showing "Streaming Query State: NONEWBATCHES" in Logs. #5
Comments
Someone kindly help. Or suggest if is thr any other support channel is available for the same. |
@abhishekd0907 kindly help. |
Can you attach full driver logs? |
@abhishekd0907 let me know if I need to share any other logs also. Thanks. |
Streaminglens was build and tested with Spark 2.4 Application is using Spark 2.2 There has been change in some internal APIs between Spark 2.2 and Spark 2.4 which Streaminglens uses, so present code is not working with Spark 2.2 and leading to following error.
|
@abhishekd0907 but this warning is not showing when I have removed the checkpoint location.all other details are same when I am removing checkpoint Location .I am attaching Fresh Location with new CheckPoint Location. Kindly Suggest. |
In the new logs2.txt without checkpoint location, new batches are not even being created. I can see only
but no logs for micro batches 1,2,3,.... and so on. This is because of removing checkpoint location. Since new batches are not being created, Streaminglens has nothing to analyze so there are no logs, |
@abhishekd0907 Okay Thanks a lot .So there Is no other way to Use StreamingLens with Spark 2.2 ryt? or is there any workaround we can do to use StreamingLens with Spark 2.2.? I am trying to do it I will Share some more logs by tomorrow morning |
Hi @abhishekd0907 , I am able to Remove this warning ,was getting this warning because my application batch interval was 4 min which was less than the default analysis Interval of StreamingLense i.e. 5 min. So currentTime - lastAnalyzedTimeMills >= streamingLensConfig.analysisIntervalMinutes * 60 * 1000 this condition was giving false as boolean value and 'logWarning(s"Streaming Lens failed " + e.getMessage)' and this line was giving warning.I was debugging the issue and observed below points.
if (insights.streamingCriticalPathResults.streamingQueryState.equals(StreamingState.ERROR)) { This value always will be insights.streamingCriticalPathResults.streamingQueryState 'NONEWBATCHES' as in StreamingCriticalPathResults only 'NONEWBATCHES' state specific code is available. and it is always giving no new batch and taking expectedMicroBatchSLA: Long = 0, batchRunningTime: Long = 0, criticalTime: Long = 0, streamingQueryState: StreamingState.Value = StreamingState.NONEWBATCHES) as default values from StreamingCriticalPathResults. case class StreamingCriticalPathResults(expectedMicroBatchSLA: Long = 0, private def startStreamingAnalysis(queryProgress: QueryProgress): Unit = { This Block is always taking Values from StreamingCriticalPathResults.streamingQueryState which is NONEWBATCHES. Kindly see the below logs and Suggest.QueryInsightsManager.analysis block results: value of queryProgress : QueryProgress(22,12900529-7063-4446-a4b8-b58a94194e89,2021-10-04T21:07:43.483Z,3,0.22653477308766895) StreamingQueryAnalyzer.scala Results : QueryInsightsManager.analysisTask() results: value of queryProgress : QueryProgress(23,12900529-7063-4446-a4b8-b58a94194e89,2021-10-04T21:10:00.000Z,0,0.0) Note: here also if batchrunningtime is '0' (no data is available to process) then only its printing the insights by calling (StreamingCriticalPathResults(300000,0,0,NONEWBATCHES)) and generating logs. and if batch running time is greater then 0(data is available to process) then is not giving the insights.StreamingQueryAnalyzer.scala Results : Insides form startStreamingAnalysis method of QueryInsightManager StreamingLensResults(23,0,StreamingCriticalPathResults(120000,0,0,NONEWBATCHES)) value of queryProgress : QueryProgress(23,12900529-7063-4446-a4b8-b58a94194e89,2021-10-04T21:15:00.000Z,0,0.0) lastProgress.batchId=23 StreamingQueryAnalyzer.scala Results : Results : Insides form startStreamingAnalysis method of QueryInsightsManager.scala*
| |||||||||||||||||| StreamingLens Inisights ||||||||||||||||||||||||| expectedMicroBatchSLA,batchRunningTime,criticalTime,streamingQueryState are taking from streamingCriticalPathResults which are hardcoded for NONEWBATCHES. Kindly suggest if Any Changes are required. |
Have you made the changes I suggested you? |
@abhishekd0907 yes |
Hi All,
I am using StreamingLens in my spark structure streaming application but it's always showing same logs .BatchId is getting updated but Streaming Query State: NONEWBATCHES remains same.
can someone suggest why the State and recommendations are not updating in logs.
|||||||||||||||||| StreamingLens Insights |||||||||||||||||||||||||
BatchId: 344
Analysis Time: 00s 000ms
Expected Micro Batch SLA: 120s 000ms
Batch Running Time: 00s 000ms
Critical Time: 00s 000ms
Streaming Query State: NONEWBATCHES
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
21/10/01 15:50:04 WARN QueryInsightsManager: Streaming Lens failed key not found: BatchDescription(e68c3c2c-6d5f-469e-864a-)
Spark Submit Command:
spark-submit
--verbose
--name SparkStreamingLens
--num-executors 1
--conf streamingLens.reporter.intervalMinutes=1
--jars /home/abc/jars/spark-streaminglens_2.11-0.5.3.jar,
/home/abc/jars/kafka-clients-0.10.2.1.jar,
--master yarn
--deploy-mode cluster
--driver-cores 1 --driver-memory 2G --executor-cores 1 --executor-memory 2G
--supervise --class com.data.datalake.SparkStreamingLens
/home/abc/jar/SparkStreamingLens-spark-utility_2.11-1.0.jar
@abhishekd0907 @itsvikramagr @shubhamtagra @jsensarma @mjose007 @akumarb2010 @itsvikramagr @Indu-sharma
@akumarb2010 @iamrohit @beriaanirudh @mayurdb @michaelmior @rishitesh @emlyn @vrajat @fdemesmaeker @indit-qubole Kindly Suggest.
Kindly Guide if is there anything needs to change here.
https://github.com/qubole/streaminglens/blob/master/src/main/scala/com/qubole/spark/streaminglens/common/results/AggregateStateResults.scala
https://github.com/qubole/streaminglens/blob/master/src/main/scala/com/qubole/spark/streaminglens/common/results/StreamingCriticalPathResults.scala
As in Project (com.qubole.spark.streaminglens.QueryInsightsManager) below code is available to fetch the insights.
| |||||||||||||||||| StreamingLens Inisights |||||||||||||||||||||||||
| BatchId: ${results.batchId}
| Analysis Time: ${pd(results.analysisTime)}
| Expected Micro Batch SLA: ${pd(results.streamingCriticalPathResults.expectedMicroBatchSLA)}
| Batch Running Time: ${pd(results.streamingCriticalPathResults.batchRunningTime)}
| Critical Time: ${pd(results.streamingCriticalPathResults.criticalTime)}
| Streaming Query State: ${results.streamingCriticalPathResults.streamingQueryState.toString}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
""".stripMargin)
Here we are taking all the details from streamingCriticalPathResults and here only code available for NONEWBATCH State
case class StreamingCriticalPathResults(expectedMicroBatchSLA: Long = 0,
batchRunningTime: Long = 0,
criticalTime: Long = 0,
streamingQueryState: StreamingState.Value = StreamingState.NONEWBATCHES)
Also in com.qubole.spark.streaminglens.common.results AggregateStateResults.scala below code is available.
**package com.qubole.spark.streaminglens.common.results
case class AggregateStateResults(state: String = "NO NEW BATCHES",
KIndly Suggest.
The text was updated successfully, but these errors were encountered: