Zeppelin和Spark外壳中的VORA表 [英] VORA Tables in Zeppelin and Spark shell

查看:114
本文介绍了Zeppelin和Spark外壳中的VORA表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经从Spark Shell和Zepellin创建了测试表.但是当我们显示单个表上的表时,它们在相应的环境中是可见的.通过Spark Shell创建的表未显示在Zepellin show table命令中. 这两个表有什么区别?有人可以解释一下吗.

We have created test table from spark shell as well as from Zepellin. But when we do show tables on single table is visible in respective environment. Table created via spark shell is not displayed in Zepellin show table command. What is the difference between these two tables ? can anybody please explain.

推荐答案

show tables命令仅显示当前会话中定义的表.

The show tables command only shows the tables defined in the current session.

在当前会话以及Zookeeper的(持久)目录中创建一个表.您可以通过以下命令显示Vora保存在Zookeeper中的所有表:

A table is created in a current session and also in a (persistent) catalog in Zookeeper. You can show all tables that Vora saved in Zookeeper via this command:

SHOW DATASOURCETABLES 
    USING com.sap.spark.vora 
    OPTIONS(zkurls "<zookeeper_server>:2181")  

您还可以通过以下命令在当前会话中注册所有或单个表:

You can also register all or single tables in the current session via this command:

REGISTER ALL TABLES 
    USING com.sap.spark.vora 
    OPTIONS(zkurls "<zookeeper_server>:2181")  
REGISTER TABLE <tablename> 
    USING com.sap.spark.vora 
    OPTIONS(zkurls "<zookeeper_server>:2181")

因此,如果要从Zookeeper访问在Spark Shell中创建的表,反之亦然,则需要首先注册它.

So if you want to access the table that you created in the Spark Shell from Zookeeper and vice versa you need to register it first.

如果需要清除Zookeeper目录,则可以使用这些命令.请注意,然后需要重新创建表:

You can use those commands if you need to clear the Zookeeper Catalog. Be aware that tables then need to be recreated:

import com.sap.spark.vora.client._
ClusterUtils.clearZooKeeperCatalog("<zookeeper_server>:2181")

此(以及更多)信息可以在

This (and more) information can be found in the Vora Installation and Developer Guide

这篇关于Zeppelin和Spark外壳中的VORA表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆