λ°˜μ‘ν˜•

livy-env.sh

export SPARK_HOME=/usr/lib/spark

export HADOOP_CONF_DIR=/etc/hadoop/conf

 

livy start

./bin/livy-server start

 

livy μ •μƒλ™μž‘ν•˜λŠ”μ§€ sparkμ—μ„œ ν…ŒμŠ€νŠΈν•˜λŠ” 예제

sudo pip install requests

 

import json, pprint, requests, textwrap

host = 'http://localhost:8998'

data = {'kind': 'spark'}

headers = {'Content-Type': 'application/json'}

r = requests.post(host + '/sessions', data=json.dumps(data), headers=headers)

r.json() {u'state': u'starting', u'id': 0, u'kind': u'spark'}

728x90
λ°˜μ‘ν˜•

+ Recent posts