Github user kumarvishal09 commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2622#discussion_r208839710 --- Diff: integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonScanRDD.scala --- @@ -463,9 +463,12 @@ class CarbonScanRDD[T: ClassTag]( model.setStatisticsRecorder(recorder) // TODO: rewrite this logic to call free memory in FailureListener on failures. On success, - // no memory leak should be there, resources should be freed on success completion. - val listeners = CarbonReflectionUtils.getField("onCompleteCallbacks", context) + // TODO: no memory leak should be there, resources should be freed on success completion. + val onCompleteCallbacksField = context.getClass.getDeclaredField("onCompleteCallbacks") + onCompleteCallbacksField.setAccessible(true) --- End diff -- ok
---