Я надеялся настроить приспособление pytest, которое будет сеансом Spark с GlueContext. Я надеялся, что смогу сделать это, просто используя зависимости Python, например. pyspark и awsglue-dev, но у меня возникают проблемы.
Моя программа conftest выглядит так:
Код: Выделить всё
@pytest.fixture(scope="session")
def spark_context():
spark_ctx = SparkContext.getOrCreate()
spark_ctx.setLogLevel("WARN")
return spark_ctx
@pytest.fixture
def glue_context(spark_context):
glue_ctx = GlueContext(spark_context)
return glue_ctx
Код: Выделить всё
test setup failed
spark_context =
@pytest.fixture
def glue_context(spark_context):
> glue_ctx = GlueContext(spark_context)
if min_partitions is None:
> return self._jvm.GlueContext(self._jsc.sc())
E TypeError: 'JavaPackage' object is not callable
Спасибо,
Сэм
Подробнее здесь: https://stackoverflow.com/questions/792 ... ata-frames