Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
nijanthanvijayakumar authored Jul 16, 2024
2 parents cb09c9c + 209895f commit 6f384a8
Show file tree
Hide file tree
Showing 29 changed files with 592 additions and 83 deletions.
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This is a CODEOWNERS file for unitycatalog
# See https://help.github.com/articles/about-codeowners/ for more information

docs/ @MrPowers
mkdocs.yml @MrPowers
4 changes: 2 additions & 2 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Build tarball
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tarball-gen-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Build tarball
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tutorial-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Set up Python
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Run tests with coverage
Expand All @@ -36,10 +36,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Generate OpenAPI Client and Server Model classes
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ api/.openapi-generator
build/sbt-launch-*
venv
server_pid.txt
site
site
python_engine.log
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Let's take Unity Catalog for spin. In this guide, we are going to do the followi
### Prerequisites
You have to ensure that your local environment has the following:
- Clone this repository.
- Ensure the `JAVA_HOME` environment variable your terminal is configured to point to JDK11+.
- Ensure the `JAVA_HOME` environment variable your terminal is configured to point to JDK17+.
- Compile the project using `build/sbt package`

### Run the UC Server
Expand Down Expand Up @@ -125,11 +125,11 @@ SELECT * from unity.default.numbers;
You should see the tables listed and the contents of the `numbers` table printed.
To quit DuckDB, run the command `Ctrl+D` or type `.exit` in the DuckDB shell.

## Full Tutorial
## CLI tutorial

You can read Delta Uniform tables from Spark via Iceberg REST Catalog APIs,
You can interact with a Unity Catalog server to create and manage catalogs, schemas and tables,
operate on volumes and functions from the CLI, and much more.
See the full [tutorial](docs/tutorial.md) for more details.
See the [cli usage](docs/usage/cli.md) for more details.

## APIs and Compatibility
- Open API specification: The Unity Catalog Rest API is documented [here](api).
Expand All @@ -143,7 +143,7 @@ See the full [tutorial](docs/tutorial.md) for more details.
This will create a tarball in the `target` directory. See the full [deployment guide](docs/deployment.md) for more details.

## Compiling and testing
- Install JDK 11 by whatever mechanism is appropriate for your system, and
- Install JDK 17 by whatever mechanism is appropriate for your system, and
set that version to be the default Java version (e.g., by setting env variable
JAVA_HOME)
- To compile all the code without running tests, run the following:
Expand Down
29 changes: 23 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ lazy val commonSettings = Seq(
organization := orgName,
// Compilation configs
initialize := {
// Assert that the JVM is at least Java 11
// Assert that the JVM is at least Java 17
val _ = initialize.value // ensure previous initializations are run
assert(
sys.props("java.specification.version").toDouble >= 11,
"Java 11 or above is required to run this project.")
sys.props("java.specification.version").toDouble >= 17,
"Java 17 or above is required to run this project.")
},
Compile / compile / javacOptions ++= Seq(
"-Xlint:deprecation",
"-Xlint:unchecked",
"-source", "1.8",
"-target", "1.8",
"-source", "17",
"-target", "17",
"-g:source,lines,vars",
),
resolvers += Resolver.mavenLocal,
Expand Down Expand Up @@ -187,13 +187,30 @@ lazy val server = (project in file("server"))

// Iceberg REST Catalog dependencies
"org.apache.iceberg" % "iceberg-core" % "1.5.2",
"org.apache.iceberg" % "iceberg-aws" % "1.5.2",
"software.amazon.awssdk" % "s3" % "2.24.0",
"io.vertx" % "vertx-core" % "4.3.5",
"io.vertx" % "vertx-web" % "4.3.5",
"io.vertx" % "vertx-web-client" % "4.3.5",

// Test dependencies
"junit" % "junit" % "4.13.2" % Test,
"junit" % "junit" % "4.13.2" % Test, // TODO: update tests to junit5 and remove this
"org.junit.jupiter" % "junit-jupiter" % "5.10.1" % Test,
"org.mockito" % "mockito-core" % "4.11.0" % Test,
"org.mockito" % "mockito-inline" % "4.11.0" % Test,
"org.mockito" % "mockito-junit-jupiter" % "4.11.0" % Test,
"com.github.sbt" % "junit-interface" % "0.13.3" % Test,
"com.adobe.testing" % "s3mock-junit5" % "2.11.0" % Test
exclude("ch.qos.logback", "logback-classic")
exclude("org.apache.logging.log4j", "log4j-to-slf4j")
// the following are runtime test dependencies we exclude here
// in order to not to set off the licences check, but then
// add back below as provided
exclude("jakarta.annotation", "jakarta.annotation-api")
exclude("jakarta.servlet", "jakarta.servlet-api")
exclude("jakarta.websocket", "jakarta.websocket-api"),
"jakarta.servlet" % "jakarta.servlet-api" % "4.0.4" % Provided,
"javax.xml.bind" % "jaxb-api" % "2.3.1" % Provided
),

Compile / compile / javacOptions ++= Seq(
Expand Down
Binary file added docs/assets/images/uc-3-level.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/uc_java_version.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Change into the `unitycatalog` directory and run `bin/start-uc-server` to instan

Well, that was pretty easy!

To run Unity Catalog, you need Java 11 installed on your machine. You can always run the `java --version` command to verify that you have the right version of Java installed.
To run Unity Catalog, you need Java 17 installed on your machine. You can always run the `java --version` command to verify that you have the right version of Java installed.

![UC Java Version](./assets/images/uc_java_version.png)

Expand All @@ -42,6 +42,8 @@ Unity Catalog stores all assets in a 3-level namespace:
2. schema
3. assets like tables, volumes, functions, etc.

![UC 3 Level](./assets/images/uc-3-level.png)

Here's an example Unity Catalog instance:

![UC Example Catalog](./assets/images/uc_example_catalog.png)
Expand Down
Loading

0 comments on commit 6f384a8

Please sign in to comment.