Hello @manish verma ,
Azure HDInsight’s Livy endpoint should be https://<spark_cluster_name>.azurehdinsight.net/livy/
instead of clusterhost:8998
.
Hope this helps. Do let us know if you any further queries.
----------------------------------------------------------------------------------------
Do click on "Accept Answer" and Upvote on the post that helps you, this can be beneficial to other community members.