Code Monkey home page Code Monkey logo

apijsonboot_hive's Introduction

APIJSONBoot_Hive

APIJSON + SpringBoot连接Hive使用的Demo

安装&使用

JDK: 1.8+

Maven: 3.0+

数据库:Hive 3.1.2 Hadoop 3.1.3

JDBC 驱动:

<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>3.1.2</version>

1.导入项目

IntelliJ IDEA导入:

顶部菜单File > Open > Browse

2.导入表文件到数据库,修改数据库配置

后端需要Hive,安装之后可以使用hive.sql脚本建表和导入数据。 安装参考官方文档

修改DemoSQLConfig源码,配置自己的数据库

需要配置Hive支持事务

image-20211221175137970

    <property>
            <name>hive.support.concurrency</name>
            <value>true</value>
    </property>
    <property>
            <name>hive.exec.dynamic.partition.mode</name>
            <value>nonstrict</value>
    </property>
    <property>
            <name>hive.txn.manager</name>
            <value>org.apache.hadoop.hive.ql.lockmgr.DbTxnManager</value>
    </property>

运行

右键 DemoApplication > Run As > Java Application

SpringBoot默认端口8110

测试

完成查询,删除,修改,增加测试

通过启动校验

image-20211221174153088

请求

image-20211221174324083

image-20211221174344143

image-20211221174426051

image-20211221174523432

image-20211221174603741

image-20211221174659499

APIAUTO回归测试

APIAUTO截图

apijsonboot_hive's People

Contributors

chenyanlann avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.