问题标签 [metastore]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
649 浏览

hive - HiveMetaStoreClient 认为是 Derby 但实际上是 Postgres

我正在尝试使用以下代码通过 Oozie Java Action 连接到 Posgres Hive Metastore。

我将 hive-site.xml 传递给操作,因此它应该具有所需的所有信息。

HiveMetaStoreClient client = new HiveMetaStoreClient(conf); log.info("Successfully created the HiveMetaStoreClient"); try { log.info(String.format("Loading the partitions for %s.%s", database, table)); List<Partition> partitions = client.listPartitions(database, table, (short) 200); log.info(String.format("Processing %d partitions", partitions.size())); for (Partition partition : partitions) { StorageDescriptor sd = partition.getSd(); String location = sd.getLocation(); String newLocation = location.replace(from, to); log.info(String.format("Moving from %s to %s", location, newLocation)); sd.setLocation(newLocation); } } catch (TException e) { logExceptionStack(e); }

该日志并不完全错误,但它表明它正在查看其他带有 DERBY 后端的元存储;

我不知道在哪里寻找问题并强制HiveMetaStoreClient指向正确的元存储。

2016-02-08 16:48:05,972 INFO [uber-SubtaskRunner] com.xxxxxxx.PartitionMigrator.Program: Attempting to create the HiveMetaStoreClient 2016-02-08 16:48:06,123 INFO [uber-SubtaskRunner] com.xxxxxxx.PartitionMigrator.Program: hiveconf metastoreURI: null 2016-02-08 16:48:06,194 INFO [uber-SubtaskRunner] org.apache.hadoop.hive.metastore.HiveMetaStore: 0: Opening raw store with implemenation class:org.apache.hadoop.hive.metastore.ObjectStore 2016-02-08 16:48:06,222 INFO [uber-SubtaskRunner] org.apache.hadoop.hive.metastore.ObjectStore: ObjectStore, initialize called 2016-02-08 16:48:06,385 INFO [uber-SubtaskRunner] DataNucleus.Persistence: Property datanucleus.cache.level2 unknown - will be ignored 2016-02-08 16:48:06,385 INFO [uber-SubtaskRunner] DataNucleus.Persistence: Property hive.metastore.integral.jdo.pushdown unknown - will be ignored 2016-02-08 16:48:06,506 WARN [uber-SubtaskRunner] DataNucleus.Connection: BoneCP specified but not present in CLASSPATH (or one of dependencies) 2016-02-08 16:48:06,840 WARN [uber-SubtaskRunner] DataNucleus.Connection: BoneCP specified but not present in CLASSPATH (or one of dependencies) 2016-02-08 16:48:08,339 INFO [uber-SubtaskRunner] org.apache.hadoop.hive.metastore.ObjectStore: Setting MetaStore object pin classes with hive.metastore.cache.pinobjtypes="Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order" 2016-02-08 16:48:09,286 INFO [uber-SubtaskRunner] DataNucleus.Datastore: The class "org.apache.hadoop.hive.metastore.model.MFieldSchema" is tagged as "embedded-only" so does not have its own datastore table. 2016-02-08 16:48:09,286 INFO [uber-SubtaskRunner] DataNucleus.Datastore: The class "org.apache.hadoop.hive.metastore.model.MOrder" is tagged as "embedded-only" so does not have its own datastore table. 2016-02-08 16:48:10,400 INFO [uber-SubtaskRunner] DataNucleus.Datastore: The class "org.apache.hadoop.hive.metastore.model.MFieldSchema" is tagged as "embedded-only" so does not have its own datastore table. 2016-02-08 16:48:10,400 INFO [uber-SubtaskRunner] DataNucleus.Datastore: The class "org.apache.hadoop.hive.metastore.model.MOrder" is tagged as "embedded-only" so does not have its own datastore table. 2016-02-08 16:48:10,676 INFO [uber-SubtaskRunner] org.apache.hadoop.hive.metastore.MetaStoreDirectSql: Using direct SQL, underlying DB is DERBY 2016-02-08 16:48:10,677 INFO [uber-SubtaskRunner] org.apache.hadoop.hive.metastore.ObjectStore: Initialized ObjectStore 2016-02-08 16:48:10,798 WARN [uber-SubtaskRunner] org.apache.hadoop.hive.metastore.ObjectStore: Version information not found in metastore. hive.metastore.schema.verification is not enabled so recording the schema version 1.1.0 2016-02-08 16:48:10,928 WARN [uber-SubtaskRunner] org.apache.hadoop.hive.metastore.ObjectStore: Failed to get database default, returning NoSuchObjectException 2016-02-08 16:48:11,019 INFO [uber-SubtaskRunner] org.apache.hadoop.hive.metastore.HiveMetaStore: Added admin role in metastore 2016-02-08 16:48:11,021 INFO [uber-SubtaskRunner] org.apache.hadoop.hive.metastore.HiveMetaStore: Added public role in metastore 2016-02-08 16:48:11,097 INFO [uber-SubtaskRunner] org.apache.hadoop.hive.metastore.HiveMetaStore: No user is added in admin role, since config is empty 2016-02-08 16:48:11,193 INFO [uber-SubtaskRunner] com.xxxxxxx.PartitionMigrator.Program: Successfully created the HiveMetaStoreClient

0 投票
1 回答
547 浏览

hive - 如何将 hive derby 元存储迁移到 postgres 元存储

很长一段时间以来,我一直在使用 derby 作为 hive Metastore。有没有办法将元存储迁移到 Postgresql。

我正在使用 Apache Hive - 0.13

0 投票
3 回答
4172 浏览

java - Hive Metastore 遭受 kerberos“时钟偏差太大”错误

最近我们遇到了一个问题,如标题中所述,每月一次。在 Metastore 节点上,我们已经安装并启动了 ntpd 服务以与 kerberos 服务器同步时间。节点上的 krb5.conf 如下所示:

[libdefaults]
default_realm = EXAMPLE.COM
dns_lookup_realm = true
dns_lookup_kdc = true
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true

因此,metastore 上的时间与 kerberos 服务器(>=5 分钟)不同步导致问题或网络阻塞的可能性似乎较小。
从metastore日志看,“Clock skew too great”异常记录时间是乱序的,比如,

2016-01-16 18:18:48,071 错误 [pool-3-thread-63735]
2016-01-16 19:07:03,699 错误 [pool-3-thread-63798]
2016-01-16 19:06:55,998错误 [pool-3-thread-63796]
2016-01-16 19:06:41,653 错误 [pool-3-thread-63812]
2016-01-16 19:04:28,659 错误 [pool-3-thread-63806]
2016-01-16 19:04:13,937 错误 [pool-3-thread-63804]
2016-01-16 19:02:19,312 错误 [pool-3-thread-63809]
2016-01-16 19:02:13,115错误 [pool-3-thread-63794]
2016-01-16 19:02:06,028 错误 [pool-3-thread-63800]
2016-01-16 19:01:50,767 错误 [pool-3-thread-63795]
2016-01-16 18:59:36,926 错误 [pool-3-thread-63810]
2016-01-16 18:59:36,394 错误 [pool-3-thread-63797]

异常堆栈:

环境:

那么,如果我想找出根本原因,我该怎么办?有什么建议么?非常感谢。

0 投票
2 回答
4538 浏览

mysql - 使用 hive 配置 mysql 后无法启动 hive Metastore 服务或 hive-shell

我知道这个问题已经问过了,但这些答案没有任何帮助。

我花更多时间用 hive 配置 mysql,每次遇到错误,我都不明白哪里出错了.....正如你在这个链接中看到的那样,

hive-site.xml 配置可以看这里的链接

是文件结构

产生这个问题的原因也是如此......希望这有助于我解决。

我关注了这些链接

https://dzone.com/articles/how-configure-mysql-metastore

hive0.13.1 中的 hive-site.xml 路径

https://cwiki.apache.org/confluence/display/Hive/AdminManual+Configuration

如何在 Hive-Site.xml 文件中为配置单元元存储连接设置配置?

https://cwiki.apache.org/confluence/display/Hive/AdminManual+MetastoreAdmin#AdminManualMetastoreAdmin-RemoteMetastoreServer

0 投票
1 回答
10824 浏览

hive - Hadoop Metastore 不会初始化

序言:我是hadoop / hive的新手。已经安装了独立的 hadoop,现在正试图让 hive 工作。我不断收到有关初始化元存储的错误,似乎无法弄清楚如何解决。(hadoop 2.7.2 和 hive 2.0)

HADOOP_HOME 和 HIVE_HOME 已设置

hdfs 正在工作

蜂巢不工作。说我需要初始化我的元存储

所以我尝试使用 postgres 对其进行初始化 - 但 schematool 尝试使用 derby

所以我将 hive-site.xml 更改为使用 postgres 驱动程序等,但是因为我没有安装驱动程序,所以它失败了

所以然后我尝试使用 derby 首先将 hive-site.xml 再次移开,所以默认是 derby

然后我尝试用 derby 再次初始化,但它似乎已经根据错误“错误:FUNCTION 'NUCLEUS_ASCII'已经存在”进行了初始化

我已经在这两天了。任何帮助将不胜感激。

0 投票
0 回答
188 浏览

hive - Hive 1.0 - 远程 MySQL Metastore 配置

在 EMR 4.2 - Hive 1.0 版本上,我想连接到远程 mysql 元存储。

这个 remorte 元存储在 Hive .12 上,我仍然想从新集群连接到同一个元存储。由于新的 hive-site.xml 格式,我无法为 metastore-uris 赋予适当的价值。由于遥控器上不存在 9083 deo。我给本地然后配置单元不知道所有数据库。

有人遇到过这个问题并解决了吗?

谢谢!

0 投票
0 回答
934 浏览

mysql - 以 ORC“SNAPPY”格式连接两个表时发生 Hive 错误“不是 SequenceFile”

执行外连接时出现“不是 SequenceFile 错误”。它曾经在相同的设置和类似的表下工作,但现在我不知道发生了什么变化,因此在大键空间上加入相当大的表时出现此错误。

我正在使用 YARN 运行 Hive 0.13.1 Cloudera 5.3.0。两个表都存储为 orc tblproperties ("orc.compress" = "SNAPPY")。

存储信息:

此任务的诊断消息:

在我的 .hiverc

我尝试将两个表都声明为序列文件,但在全尺寸表上存在不同的错误,但在小样本上却没有:IndexOutOfBound。

Metastore 是 MySQL。

Hive / Hadoop 设置的完整列表很长,但我会查找它 - 只是不知道要查找什么。

如果这与 IO 或损坏的 HDFS 有关,我该如何检查 HDFS 的运行状况?

0 投票
1 回答
219 浏览

hive - 如何使用 hive-common-1.2.1.jar 配置使用 HiveConf 类访问 HDFS(namenode HA)?

谁知道为什么类HiveConf现在没有HADOOPCONF枚举类型hive-common jar

我使用 hive-common-1.2.1.jar HiveConf 类编写代码来访问 HDFS(HA namenode),我在下面收到错误。

我意识到我的代码没有配置HADOOPCONF所以它无法连接到 HDFS,但是HADOOPCONFhive-common-1.2.1.jar 中没有了,我发现以前版本的 hive-common 有 HADOOPCONF。

http://www.docjar.com/html/api/org/apache/hadoop/hive/conf/HiveConf.java.html

我的问题是如何使用 hive-common-1.2.1.jar 配置使用 HiveConf 类访问 HDFS(namenode HA)?

这是错误:

我的代码是:

0 投票
2 回答
1872 浏览

hive - Hive Metastore 存储锁信息在哪里?

我正在尝试在一个配置单元表上创建索引并出现错误:

FAILED: 获取锁时出错:LockRequest(component:[LockComponent(type:EXCLUSIVE, level:PARTITION, dbname:, tablename: jobs_indx_jobs_title , partitionname:year=2016/month=1/sourcecd=BYD), LockComponent(type :SHARED_READ, level:TABLE, dbname:, tablename:jobs), LockComponent(type:SHARED_READ, level:PARTITION, dbname:, tablename:jobs, partitionname:year=2016/month=1/sourcecd=BD)], txnid: 0,用户:hadoop,主机名:Hortorn-NN-2.b2vheq12ivkfdsjdskdf3nba.dx.internal.cloudapp.net)在 5504043 毫秒后超时。LockResponse(lockid:58318, state:WAITING)

我想知道它在执行“show locks”命令时显示的哪个表配置单元元存储锁定信息?

0 投票
1 回答
711 浏览

hadoop - 无法连接到 sparkSQL

我正在为 hive 使用远程 mysql 元存储。当我运行 hive 客户端时,它运行完美。但是当我尝试通过 spark-shell 或 spark-submit 使用 spark-sql 时,我无法连接到 hive。并出现以下错误:

当我使用 mysql 数据库进行元存储时,我不明白为什么 spark 尝试连接 derby 数据库。

我正在使用 apache spark 1.3 版和 cloudera 版 CDH 5.4.8