齐柏林飞艇上未解决的关系

时间:2019-02-08 02:20:37

标签: apache-spark hive apache-spark-sql apache-zeppelin

当我在齐柏林飞艇上运行查询时,它将为所有表返回此错误。当我在蜂巢上运行相同的查询时,没有问题。蜂巢返回结果。 我使用火花解释器。 此代码也返回相同的错误

<table style="width:100%">
    <col width="100">
    <col>
    <col width="100">
    <tr class="red">
      <td height='100'> </td> <td>
      </td><td></td>
    </tr>
    <tr>
      <td colspan='3'> </td>
    </tr>
    <tr class="green">
      <td height='200'> </td>
      <td></td>
      <td> </td>
    </tr>
  </table>

但是当我尝试通过spark-shell运行它时,它会起作用。

我使用spark 2.1.0,齐柏林飞艇0.7.3

我想问,我可能会错过什么配置


import praw
import json
import urllib

import settingslocal

REDDIT_USERNAME = ''
REDDIT_PASSWORD = ''

try:
    from settingslocal import *
except ImportError:
    pass

def main():
    print ('starting')

    url = "http://api.ihackernews.com/page"
    try:
        result = json.load(urllib.urlopen(url))
    except Exception, e:
    return

    items = result['items'][:-1]

    reddit = praw.Reddit(user_agent='HackerNews bot by /u/mpdavis')
    reddit.login(REDDIT_USERNAME, REDDIT_PASSWORD)
    link_submitted = False
    for link in items:
        if link_submitted:
            return
        try:
            #Check to make sure the post is a link and not a post to another HN page. 
            if not 'item?id=' in link['url'] and not '/comments/' in link['url']:
                submission = list(reddit.get_info(url=str(link['url'])))
                if not submission:
                    subreddit = get_subreddit(str(link['title']))
                    print "Submitting link to %s: %s" % (subreddit, link['url'])
                    resp = reddit.submit(subreddit, str(link['title']), url=str(link['url']))
                    link_submitted = True

        except Exception, e:
            print e
            pass


0 个答案:

没有答案