Giter Club home page Giter Club logo

hs2-embedded's Introduction

Hiveserver2 Embedded

A project for building and using a docker image of Hiveserver2, pre-configured to run with Tez in local mode as the underlying execution engine and in-memory Derby as the metastore.

Use mvn install to build the project and create the docker image for HS2.

You can use the docker image by managing containers explicitly via the docker CLI or by exploiting the dependency on https://www.testcontainers.org/.

Create HS2 container using Docker CLI:

docker run -p "10000:10000" -d com.github.zabetak/hs2-embedded:1.0.4.7.2.3.0-SNAPSHOT

(Optional) Use the schema-loader utility to create some tables and start playing around:

docker exec CONTAINER_NAME schema-loader tpcds

Create HS2 container using testcontainers:

public class TestHS2Container {

  @Rule
  public HS2Container hs2 = new HS2Container();

  @Test
  public void testSimpleDDL() throws Exception {
    try (Connection c = DriverManager.getConnection(hs2.getJdbcURL())) {
      try (PreparedStatement ps = c
          .prepareStatement("CREATE TABLE test1 (uid VARCHAR(64), link STRING, source STRING)")) {
        ps.executeUpdate();
      }
    }
  }
}

Release

This section contains information for developers who would like to release the project.

The manual steps to perform a release are shown below:

  1. Pick a concrete version for the release (freeze -SNAPSHOT) and commit the changes.
mvn versions:set -DnewVersion=1.0.4.7.2.3.0-220
  1. Verify that build using the release profile finishes successfully.
mvn package -Prelease
  1. Upload the artifacts to the nexus staging repository
mvn deploy -Prelease
  1. Visit the nexus staging repository and verify the content (sha, asc, jar, sources, etc.).
  2. Close and then release the staging repository.
  3. Create a tag corresponding to the newly release version in the git repository.
git tag 1.0.4.7.2.3.0-220
  1. Push tag to the remote repository
git push origin 1.0.4.7.2.3.0-220
  1. Prepare for next depelopment iteration 8a. Change version in pom files
mvn versions:set -DnewVersion=1.0.5.7.2.3.0-SNAPSHOT

8b. Update release instructions in README.md to reflect version changes 8c. Commit 9. Push master to the remote repository

git push origin master

More details about the release steps can be found here.

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.