hadoop - 是否可以从 hive create external table 命令导出/创建外部表文件到远程服务器

标签 hadoop ftp hive sqoop

是否可以从 hive create external table 命令导出/创建外部表文件到远程服务器。

create external table SOME_TABLE (MY_Coulmns) 
row format delimited fields terminated by ','
lines terminated by '\n' 
stored as textfile location '<Remote server A with IP XXXXX and with username and password>';  

要求:我必须将这个文件/数据从 hive 导出到 Cassandra(在不同的服务器上)。

最佳答案

通过 Hive 使用带有用户名和密码的 IP 进行外部存储不是一个好的做法,因为它可能会成为一个安全问题。在 Hive 中,您可以轻松地使用外部 Amazon S3 storageAzure Blob Storage相反。

编辑:或者,使用 Hive Cassandra Storage Handler (org.apache.hadoop.hive.cassandra.cql.CqlStorageHandler) 作为 Hive 表的存储处理程序,如果您能够直接从 Hive 访问 Cassandra 主机和端口。这将大大简化您的工作,因为 Hive 将能够直接写入 Cassandra 中的外部表。

关于hadoop - 是否可以从 hive create external table 命令导出/创建外部表文件到远程服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38032393/

相关文章:

sql - 配置单元查询 : Matching column Values from Array of string to make Flags

hadoop - Hive 'alter table <table name> concatenate' 是如何工作的?

hadoop - 集群中的Hortonworks沙箱

git - 使用 ftploy 推送完整项目而不仅仅是更改

javascript - 在 FTP 服务器上上传 NodeJS : Error

c# - 使用 FTP 协议(protocol)列出包含大约 2,000,000 个文件的目录

mongodb - 使用日期过滤器传递 Hadoop 作业的输入查询 (mongo.input.query)

scala - 关闭 SparkContext java.lang.NumberFormatException

python - h2o:区分本地实例和hadoop实例

hadoop - 将文件添加到配置单元分区