Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
FANNG1 committed Oct 30, 2024
1 parent e130cda commit bf65dcc
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ cp ${gravitino_home}/bundles/aws-bundle/build/libs/gravitino-aws-bundle-*.jar bu

iceberg_gcp_bundle="iceberg-gcp-bundle-1.5.2.jar"
if [ ! -f "bundles/${iceberg_gcp_bundle}" ]; then
wget -P bundles https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-gcp-bundle/1.5.2/${iceberg_gcp_bundle}
curl -L -s -o bundles/${iceberg_gcp_bundle} https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-gcp-bundle/1.5.2/${iceberg_gcp_bundle}
fi

iceberg_aws_bundle="iceberg-aws-bundle-1.5.2.jar"
if [ ! -f "bundles/${iceberg_aws_bundle}" ]; then
wget -P bundles https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-aws-bundle/1.5.2/${iceberg_aws_bundle}
curl -L -s -o bundles/${iceberg_aws_bundle} https://repo1.maven.org/maven2/org/apache/iceberg/iceberg-aws-bundle/1.5.2/${iceberg_aws_bundle}
fi

# download jdbc driver
wget -P bundles https://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.42.0.0/sqlite-jdbc-3.42.0.0.jar
curl -L -s -o bundles/sqlite-jdbc-3.42.0.0.jar https://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.42.0.0/sqlite-jdbc-3.42.0.0.jar

cp bundles/*jar ${iceberg_rest_server_dir}/packages/gravitino-iceberg-rest-server/libs/

Expand Down
19 changes: 12 additions & 7 deletions dev/docker/iceberg-rest-server/rewrite_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
"GRAVITINO_S3_EXTERNAL_ID" : "s3-external-id"
}

init_config = {
"catalog-backend" : "jdbc",
"jdbc-driver" : "org.sqlite.JDBC",
"uri" : "jdbc:sqlite::memory:",
"jdbc-user" : "iceberg",
"jdbc-password" : "iceberg",
"jdbc-initialize" : "true",
"jdbc.schema-version" : "V1"
}


def parse_config_file(file_path):
config_map = {}
Expand All @@ -52,13 +62,8 @@ def update_config(config, key, value):
config_file_path = 'conf/gravitino-iceberg-rest-server.conf'
config_map = parse_config_file(config_file_path)

update_config(config_map, "catalog-backend", "jdbc")
update_config(config_map, "jdbc-driver", "org.sqlite.JDBC")
update_config(config_map, "uri", "jdbc:sqlite::memory:")
update_config(config_map, "jdbc-user", "iceberg")
update_config(config_map, "jdbc-password", "iceberg")
update_config(config_map, "jdbc-initialize", "true")
update_config(config_map, "jdbc.schema-version", "V1")
for k, v in init_config.items():
update_config(config_map, k, v)

for k, v in env_map.items():
if k in os.environ:
Expand Down
8 changes: 7 additions & 1 deletion docs/docker-image-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,17 @@ You can deploy the standalone Gravitino Iceberg REST server with the Docker imag
Container startup commands

```shell
docker run --rm -d -p 9001:9001 apache/gravitino-iceberg-rest:0.6.1-incubating
docker run --rm -d -p 9001:9001 apache/gravitino-iceberg-rest:0.7.0-incubating
```

Changelog

- apache/gravitino-iceberg-rest:0.7.0-incubating
- Using JDBC catalog backend.
- Supports S3 and GCS storage.
- Supports credential vending.
- Supports changing configuration by environment variables.

- apache/gravitino-iceberg-rest:0.6.1-incubating
- Based on Gravitino 0.6.1-incubating, you can know more information from 0.6.1-incubating release notes.

Expand Down
2 changes: 1 addition & 1 deletion docs/iceberg-rest-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ You could run Gravitino Iceberg REST server though docker container:
docker run -d -p 9001:9001 apache/gravitino-iceberg-rest:0.7.0-incubating
```

Gravitino Iceberg REST server in docker image could access local storage, you could change the configuration by environment variables to access S3 or GCS storage, please refer to storage section for more details.
Gravitino Iceberg REST server in docker image could access local storage by default, you could set the following environment variables if the storage is cloud/remote storage like S3, please refer to [storage section](#storage) for more details.

| Environment variables | Configuration items | Since version |
|--------------------------------------|---------------------------------------------------|-------------------|
Expand Down

0 comments on commit bf65dcc

Please sign in to comment.