Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,27 @@ curl "${curlArgs[@]}" -XGET http://localhost:8000/v1/databases/d3/tables/t1

#### Update a Table

The PUT request requires two values from a prior GET response:

- **`baseTableVersion`** — use the `tableVersion` field from GET (after the first update this becomes a metadata file path, not `"INITIAL_VERSION"`)
- **`tableProperties`** — must include all `openhouse.*` properties from the GET response merged with any user-defined properties; omitting them causes a 500 in the server's cross-cluster eligibility check

First GET the current state:

```
curl "${curlArgs[@]}" -XGET http://localhost:8000/v1/databases/d3/tables/t1
```

Then PUT with the returned `tableVersion` and `tableProperties`:

```
curl "${curlArgs[@]}" -XPUT http://localhost:8000/v1/databases/d3/tables/t1 \
--data-raw '{
"tableId": "t1",
"databaseId": "d3",
"baseTableVersion":<fill in previous version>
"clusterId": "<fill in cluster id>",
"clusterId": "<clusterId from GET response>",
"tableType": "PRIMARY_TABLE",
"baseTableVersion": "<tableVersion from GET response>",
"schema": "{\"type\": \"struct\", \"fields\": [{\"id\": 1,\"required\": true,\"name\": \"id\",\"type\": \"string\"},{\"id\": 2,\"required\": true,\"name\": \"name\",\"type\": \"string\"},{\"id\": 3,\"required\": true,\"name\": \"ts\",\"type\": \"timestamp\"}, {\"id\": 4,\"required\": true,\"name\": \"country\",\"type\": \"string\"}]}",
"timePartitioning": {
"columnName": "ts",
Expand All @@ -191,6 +205,7 @@ curl "${curlArgs[@]}" -XPUT http://localhost:8000/v1/databases/d3/tables/t1 \
}
],
"tableProperties": {
"<copy all key/value pairs from tableProperties in GET response, including openhouse.* keys>": "...",
"key": "value"
}
}'
Expand Down
10 changes: 10 additions & 0 deletions buildSrc/src/main/groovy/openhouse.springboot-conventions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,23 @@ configurations {
// Standardizing on slf4j + log4j2 as implementation.
all*.exclude module : 'spring-boot-starter-logging'
all*.exclude module : 'logback-classic'
// Exclude Log4j 1.x and its SLF4J bridge so Hadoop transitive deps don't introduce
// a competing SLF4J binding alongside log4j-slf4j-impl. log4j-1.2-api below provides
// the Log4j 1.x API compatibility layer that routes to Log4j2 instead.
all*.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
all*.exclude group: 'log4j', module: 'log4j'
}

dependencies {
api 'io.micrometer:micrometer-registry-prometheus:1.12.3'
api 'org.springframework.boot:spring-boot-starter-web:' + springVersion

implementation 'org.springframework.boot:spring-boot-starter-log4j2:' + springLog4jVersion
// Bridge Log4j 1.x API calls (from Hadoop) to Log4j2, completing the logging unification.
// With slf4j-log4j12 and log4j:log4j excluded above, this is the sole provider of the
// Log4j 1.x API and routes all calls through Log4j2, making them visible to Spring
// Boot Actuator's /actuator/loggers endpoint.
implementation 'org.apache.logging.log4j:log4j-1.2-api:2.25.3'
api 'org.springframework.boot:spring-boot-starter-actuator:2.7.8'
api 'org.springframework.boot:spring-boot-starter-validation:' + springVersion
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor:' + springVersion
Expand Down
3 changes: 2 additions & 1 deletion services/tables/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ server.tomcat.accesslog.enabled=true
server.tomcat.accesslog.rename-on-rotate=false
server.tomcat.accesslog.request-attributes-enabled=false
server.tomcat.accesslog.rotate=true
management.endpoints.web.exposure.include=health, shutdown, prometheus, beans
management.endpoints.web.exposure.include=health, shutdown, prometheus, beans, loggers
management.endpoint.health.enabled=true
management.endpoint.shutdown.enabled=true
management.endpoint.prometheus.enabled=true
management.endpoint.beans.enabled=true
management.endpoint.loggers.enabled=true
management.metrics.distribution.percentiles-histogram.all=true
management.metrics.distribution.maximum-expected-value.catalog_metadata_retrieval_latency=600s
server.shutdown=graceful
Expand Down
Loading