LoginSignup
1
0

More than 5 years have passed since last update.

ApacheBeamSDKのアップデートで詰まったところと対処法

Posted at

ApacheBeamSDK for Pythonをv2.1.1からv2.4.0にアップデートした際に起きた問題と対処法

やったこと

元々 2.1.1を入れていたため、それをupgradeした。

pip install --upgrade apache-beam
pip install --upgrade apache-beam[gcp]
pip install six==1.10

apache-beamをupgradeした際に入る、sixのバージョンが1.11で、

Can't import apache_beam · Issue #46 · GoogleCloudPlatform/DataflowPythonSDK · GitHub

と同様の問題に直面したため、1.10を入れ直した。

実行時のエラー

Dataflowでの実行時、以下ログが出たきり10分経っても、先に進まなかった。

JOB_MESSAGE_DETAILED: Workers have started successfully.

Stackdriver Loggingで確認したところ、worker-startupのINFOログで

ValueError: apache_beam.metrics.execution.MetricsContainer has the wrong size, try recompiling. Expected 40, got 48
/usr/bin/python failed with exit status 1

と出ていて、これが怪しい?

対処法

既存のものをupgradeするのではなく、1からライブラリを入れ直す。

Dataflowを動かすために必要なもの
pip install apache-beam
pip install apache-beam[gcp]
pip install nose

ライブラリの依存関係の問題っぽい。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0