Closed vijaykramesh closed 7 years ago
Thanks alot @vijaykramesh, incidentally that is exactly where I got the envhacker code from
I will deploy this later this evening
I somewhat guessed that's where you pulled the EnvHacker stuff from after looking through that thread on stackoverflow
Also in other small world/big data news, I've been following the airflow testing discussions that you've been leading, thanks for trying to corral people around that!
thanks again!
You are absolutely welcome, we def need some sort of industry standard and this is our humble attempt at trying to create something. I added you to the email thread so please get involved!
This fixes https://github.com/samelamin/spark-bigquery/issues/16
There were two issues:
First, you were running a
map.clear()
that caused things to lose aSPARK_YARN_MODE
ENV var that is used by spark to tell things it's in YARN mode.Second, by converting the ENV vars to strings (instead of the internal Variable type) subsequent calls to
sys.env.get
would break, e.g. in the spark UIThis PR fixes both, following the basic idea in this stackoverflow answer. I've verified the library now works in both YARN mode and in non-YARN mode (the former running on Qubole, the latter running spark locally via docker).
Tests also pass locally for me: