是否可以从 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 storage或 Azure 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/