ERROR metastore.ObjectStore: Version information found in metastore differs 3.1.2 from expected sche

ERROR metastore.ObjectStore: Version information found in metastore differs 3.1.2 from expected schema version 1.2.0. Schema verififcation is disabled hive.metastore.schema.verification so setting version.

在这里插入图片描述

解决方案两种
第一种:
登陆mysql,修改hive metastore版本:

进行mysql:mysql -u root -p 123456
use hive; 
select * from version;
update VERSION set SCHEMA_VERSION='3.1.1' where  VER_ID=1;

第二种
简单粗暴:在hive-site.xml中关闭版本验证

<property>
	<name>hive.metastore.schema.verification</name>
	<value>false</value>
</property>

 

  • 2
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
根据你提供的错误信息,函数 `MainWindow::selectFile()` 的定义与其声明的返回类型不一致。 在你的 `mainwindow.h` 文件中,`MainWindow::selectFile()` 函数的声明的返回类型是 `int`,但是在 `mainwindow.cpp` 文件中的函数定义中,返回类型被修改为了 `bool`。 要修正这个问题,你需要确保函数的声明和定义的返回类型是一致的。根据你在 `selectFile()` 函数中的实现,返回类型应该是 `bool`。 将 `mainwindow.h` 文件中的函数声明修改为: ```cpp bool selectFile(); ``` 修正后的代码如下所示: **mainwindow.h** ```cpp #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow(QWidget *parent = nullptr); ~MainWindow(); private slots: bool selectFile(); private: Ui::MainWindow *ui; }; #endif // MAINWINDOW_H ``` **mainwindow.cpp** ```cpp #include "mainwindow.h" #include "ui_mainwindow.h" #include <QDebug> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) { QPushButton *selectButton = new QPushButton("选择文件", this); connect(selectButton, &QPushButton::clicked, this, &MainWindow::selectFile); QVBoxLayout *layout = new QVBoxLayout; layout->addWidget(selectButton); QWidget *centralWidget = new QWidget(this); centralWidget->setLayout(layout); setCentralWidget(centralWidget); ui->setupUi(this); } MainWindow::~MainWindow() { delete ui; } bool MainWindow::selectFile() { QString dir = QFileDialog::getOpenFileName(this, "选择文件", "", "DWG Files (*.dwg)"); if (dir.isEmpty()) { qDebug() << "error: File import failure!"; return false; } else { // 进行导入操作 // ... return true; } } ``` 请确保在 `mainwindow.cpp` 文件中包含了 `#include "mainwindow.h"` 的代码行。这样可以确保函数的定义与声明是一致的。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值