Skip to content

Conversation

@Manjesh80
Copy link

Added JSON support by method QNL.getStats_json.
Usage shown below

******** SET-UP **************
QNL = sc._jvm.com.qubole.sparklens.QuboleNotebookListener.registerAndGet(sc._jsc.sc())
import time
if (QNL.estimateSize() > QNL.getMaxDataSize()):
QNL.purgeJobsAndStages()
startTime = int(round(time.time() * 1000))
******** SET-UP **************

SPARK-CODE

******** END **************
endTime = int(round(time.time() * 1000))
time.sleep(QNL.getWaiTimeInSeconds())
stats_json = QNL.getStats_json(startTime, endTime)
print(stats_json)

Save to FIle, Print will truncate the data

******** END **************

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant