0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Visual Studio Codeから EMRを使う

Posted at

目的

EMRをリモートサーバーとして手元のVisualStudioCodeからコードをsubmitしたい。

モチベーション

  • Sparkを手元で簡単に検証してからクラスタにSubmitしたい。 (ex. デバッグにクラスタ使うのはもったいない)
  • Jupyter より VSCodeを使いたい(ex. ブラウザの調子が悪い)
  • Notebook より pythonファイルベタ打ちしたい (ex. コードセントリックに書きたい)
  • gitでの管理を入念に行いたい(ex. Juypter notebookの差分は見ずらい)
  • AzureよりAWSが好き(ex. 〇〇が好きだからAWS)

やり方

  • EMR側でクラスタを立ち上げる

 詳細設定でLivyを立ち上げること。

image.png

適切なセキュリティ設定を行う(Livyポート 8998 を開ける)

image.png

 「アプリケーションの履歴」タブからLivyのエンドポイントを確認する。(タブの名前、変ね)

image.png

ご利用は計画的に。

 (おい、それはHDInsight用だろ、と諦めない。)

image.png

  • 上記を少しトリックする

 トリックするといっても、VSCodeのAzure ExtensionにてAzureにログインするだけ。HDInsightのリソースを作る必要はない。Azure側はゼロコスト。ごめんなさいM$様。

image.png

  • Generic Livy Endpointを指定する

 Link a Clusterする。 

image.png

 Generic Livy Endpointを選び、EMRのEndpointを指定する。

 image.png
 
ExtensionのOutputにこういうメッセージが出れば、ひとまずOK。

image.png

もう少しトリックが必要かと思ったけど、HDInsightしばりが緩いようなので、楽々でした。

0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?