'Hanging pyspark with Apache Spark

from pyspark.sql import SparkSession
spark = SparkSession.builder.appName('my_first_app').enableHiveSupport().getOrCreate()

The command is hanging forever and does not return. The message in the console is

WARN: client cannot authenticate via:[TOKEN, KERBEROS].

Setting spark.network.timeout does not help. How can we make the command to return after X seconds. Please note that I purposely did not set the kerberos token via kinit command.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source