Skip to content
Merged
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Tips:

The Apache Polaris build currently requires Java 21 or later. There are a few tools that help you running the right Java version:

* [SDKMAN!](https://sdkman.io/) follow the installation instructions, then run `sdk list java` to see the available distributions and versions, then run `sdk install java <identifer from list>` using the identifier for the distribution and version (>= 21) of your choice.
* [SDKMAN!](https://sdkman.io/) follow the installation instructions, then run `sdk list java` to see the available distributions and versions, then run `sdk install java <identifier from list>` using the identifier for the distribution and version (>= 21) of your choice.
* [jenv](https://www.jenv.be/) If on a Mac you can use jenv to set the appropriate SDK.

## Code Contribution Guidelines
Expand Down
2 changes: 1 addition & 1 deletion getting-started/spark/notebooks/SparkPolaris.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@
"metadata": {},
"source": [
"# Add another Principal Role to the Engineer Principal\n",
"A principal can belong to multiple Principal Roles. Typically, a call will use the union of all privilages assigned to all of the principal's roles. "
"A principal can belong to multiple Principal Roles. Typically, a call will use the union of all privileges assigned to all of the principal's roles. "
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions helm/polaris/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ line breaks, they will be escaped and a multi-line option will be printed.
Escapes a property key to be used in a configmap, conforming with the Java parsisng rules for
property files: https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/Properties.html#load(java.io.Reader)
- Escapes all backslashes.
- Escapes all key termination charaters: '=', ':' and whitespace.
- Escapes all key termination characters: '=', ':' and whitespace.
*/}}
{{- define "polaris.escapeConfigOptionKey" -}}
{{- $key := . -}}
Expand Down Expand Up @@ -204,7 +204,7 @@ Converts a Kubernetes quantity to a number (int64 if possible or float64 otherwi
It handles raw numbers as well as quantities with suffixes
like m, k, M, G, T, P, E, ki, Mi, Gi, Ti, Pi, Ei.
It also handles scientific notation.
Quantities should be positive, so negative values, zero, or any unparseable number
Quantities should be positive, so negative values, zero, or any unparsable number
will result in a failure.
https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/
*/}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ public void multipleDiffsAgainstMultipleTablesLastFails() {
Transaction t2Transaction = catalog().loadTable(identifier2).newTransaction();
t2Transaction.updateSchema().renameColumn("data", "new-column").commit();

// delete the colum that is being renamed in the above TX to cause a conflict
// delete the column that is being renamed in the above TX to cause a conflict
table2.updateSchema().deleteColumn("data").commit();
Schema updatedSchemaTwo = table2.schema();

Expand Down
2 changes: 1 addition & 1 deletion persistence/nosql/idgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Node IDs are leased by every "JVM running Polaris" for a period of time. The ID
that no IDs will be generated for a timestamp that exceeds the "lease time". Leases can be extended. The implementation
leverages atomic database operations (CAS) for the lease implementation.

ID generators must not use timestamps before or after the lease period nor must they re-use an older timestamp. This
ID generators must not use timestamps before or after the lease period nor must they reuse an older timestamp. This
requirement is satisfied using a monotonic clock implementation.

## Code structure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@
" id int, name string)\n",
"USING delta LOCATION 'file:///tmp/delta_tables/people';\n",
"\"\"\")\n",
"# You can also use cloud storage like s3. For eample: s3://<bucket-name>/<path-to-table>\n",
"# You can also use cloud storage like s3. For example: s3://<bucket-name>/<path-to-table>\n",
"# Make the corresponding credentials are set up correctly"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public void testDataframeSaveOperations() {
List<String> subDirs = listDirs(getTableLocation(deltatb));
assertThat(subDirs).contains("_delta_log");

// verify we can create a table out of the exising delta location
// verify we can create a table out of the existing delta location
sql("CREATE TABLE %s USING DELTA LOCATION '%s'", deltatb, getTableLocation(deltatb));
List<Object[]> tables = sql("SHOW TABLES");
assertThat(tables.size()).isEqualTo(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public static boolean useDelta(String provider) {
}

/**
* For tables whose location is manged by Spark Session Catalog, there will be no location or path
* in the properties.
* For tables whose location is managed by Spark Session Catalog, there will be no location or
* path in the properties.
*/
public static boolean isTableWithSparkManagedLocation(Map<String, String> properties) {
boolean hasLocationClause = properties.containsKey(TableCatalog.PROP_LOCATION);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ public boolean isAuthorized(
* permissions matching {@code privilege} on any entity in the resolvedPath of the resolvedPath.
*
* <p>The caller is responsible for translating these checks into either behavioral actions (e.g.
* returning 404 instead of 403, checking other root privileges that supercede the checked
* returning 404 instead of 403, checking other root privileges that supersede the checked
* privilege, choosing whether to vend credentials) or throwing relevant Unauthorized
* errors/exceptions.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected BehaviorChangeConfiguration(
.key("TABLE_OPERATIONS_MAKE_METADATA_CURRENT_ON_COMMIT")
.description(
"If true, BasePolarisTableOperations should mark the metadata that is passed into"
+ " `commit` as current, and re-use it to skip a trip to object storage to re-construct"
+ " `commit` as current, and reuse it to skip a trip to object storage to re-construct"
+ " the committed metadata again.")
.defaultValue(true)
.buildBehaviorChangeConfiguration();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public Builder<T> catalogConfig(String catalogConfig) {
}

/**
* Used to support backwards compatability before there were reserved properties. Usage of this
* Used to support backwards compatibility before there were reserved properties. Usage of this
* method should be removed over time.
*
* @deprecated Use {@link #catalogConfig()} instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,13 @@ public Builder setCatalogType(String type) {
}

public Builder setDefaultBaseLocation(String defaultBaseLocation) {
// Note that this member lives in the main 'properties' map rather tha internalProperties.
// Note that this member lives in the main 'properties' map rather than internalProperties.
properties.put(DEFAULT_BASE_LOCATION_KEY, defaultBaseLocation);
return this;
}

public Builder setReplaceNewLocationPrefixWithCatalogDefault(String value) {
// Note that this member lives in the main 'properties' map rather tha internalProperties.
// Note that this member lives in the main 'properties' map rather than internalProperties.
properties.put(REPLACE_NEW_LOCATION_PREFIX_WITH_CATALOG_DEFAULT_KEY, value);
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
* direct members should be added to this class; rather, they should reside in the PolarisBaseEntity
* and this class should just contain the relevant builder methods, etc. The intention when using
* this class is to use "immutable" semantics as much as possible, for example constructing new
* copies with the Builder pattern when "mutating" fields rather than ever chaing fields in-place.
* Currently, code that intends to operate directly on a PolarisBaseEntity may not adhere to
* immutability semantics, and may modify the entity in-place.
* copies with the Builder pattern when "mutating" fields rather than directly changing fields
* in-place. Currently, code that intends to operate directly on a PolarisBaseEntity may not adhere
* to immutability semantics, and may modify the entity in-place.
*
* <p>TODO: Combine this fully into PolarisBaseEntity, refactor all callsites to use strict
* immutability semantics, and remove all mutator methods from PolarisBaseEntity.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public interface BasePersistence extends PolicyMappingPersistence {
* or push down the return status enums from PolarisMetaStoreManager into this layer and document
* accordingly.
*
* <p>TODO: Change originalEntity to be just the set of members taht participate in conditions,
* <p>TODO: Change originalEntity to be just the set of members that participate in conditions,
* similar to PolarisEntityCore, and make the callsites in BasePolarisCatalog actually plumb
* through correctly, in particular for values the PolarisMetaStoreManagerImpl doesn't have access
* to such as the original name and parentId in renames.
Expand Down Expand Up @@ -108,7 +108,7 @@ void writeEntity(
* <p>TODO: Push down the multi-entity commit from PolarisMetaStoreManagerImpl to use this instead
* of running single writeEntity actions within a transaction.
*
* <p>TODO: Change originalEntity to be just the set of members taht participate in conditions,
* <p>TODO: Change originalEntity to be just the set of members that participate in conditions,
* similar to PolarisEntityCore, and make the callsites in BasePolarisCatalog actually plumb
* through correctly, in particular for values the PolarisMetaStoreManagerImpl doesn't have access
* to such as the original name and parentId in renames.
Expand Down Expand Up @@ -326,7 +326,7 @@ <T> Page<T> loadEntities(

/**
* Lookup the current entityGrantRecordsVersion for the specified entity. That version is changed
* everytime a grant record is added or removed on a base securable or added to a grantee.
* every time a grant record is added or removed on a base securable or added to a grantee.
*
* @param callCtx call context
* @param catalogId catalog id or NULL_ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public void writeEntities(
// safe to use for entityVersion and grantRecordsVersion right now. Once we refactor
// the writeEntities[] methods to take something like PolarisEntityCore
// for originalEntity and force the callsites such as BasePolarisCatalog to actually
// provide the original values, this will be correct. For now, the API does't support
// provide the original values, this will be correct. For now, the API doesn't support
// bulk renames anyways.
boolean nameOrParentChanged =
originalEntity == null
Expand Down Expand Up @@ -612,7 +612,7 @@ public void writeEntitiesInCurrentTxn(
// safe to use for entityVersion and grantRecordsVersion right now. Once we refactor
// the writeEntities[] methods to take something like PolarisEntityCore
// for originalEntity and force the callsites such as BasePolarisCatalog to actually
// provide the original values, this will be correct. For now, the API does't support
// provide the original values, this will be correct. For now, the API doesn't support
// bulk renames anyways.
boolean nameOrParentChanged =
originalEntity == null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ default void writeToPolicyMappingRecordsInCurrentTxn(
* Helpers to check conditions for writing new PolicyMappingRecords in current transaction.
*
* <p>It should throw a PolicyMappingAlreadyExistsException if the new record conflicts with an
* exising record with same policy type but different policy.
* existing record with same policy type but different policy.
*
* @param callCtx call context
* @param record policy mapping record to write.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void setupTest() {
// polaris call context
protected abstract PolarisCallContext callCtx();

// utility to bootstrap the mata store
// utility to bootstrap the meta store
protected abstract PolarisTestMetaStoreManager tm();

// the meta store manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def test_spark_credentials_can_delete_after_purge(root_client, snowflake_catalog
snowman_catalog_client, test_bucket, aws_bucket_base_location_prefix):
"""
Using snowman, create namespaces and a table. Insert into the table in multiple operations and update existing records
to generate multiple metadata.json files and manfiests. Drop the table with purge=true. Poll S3 and validate all of
to generate multiple metadata.json files and manifests. Drop the table with purge=true. Poll S3 and validate all of
the files are deleted.

Using the reader principal's credentials verify read access. Validate the reader cannot insert into the table.
Expand Down
2 changes: 1 addition & 1 deletion runtime/admin/src/main/docker/Dockerfile.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ENV USER=polaris
ENV UID=10000
ENV HOME=/home/polaris

# We make four distinct layers so if there are application changes the library layers can be re-used
# We make four distinct layers so if there are application changes the library layers can be reused
COPY --chown=polaris:polaris build/quarkus-app/lib/ /deployments/lib/
COPY --chown=polaris:polaris build/quarkus-app/quarkus-run.jar /deployments/polaris-admin-tool.jar
COPY --chown=polaris:polaris build/quarkus-app/app/ /deployments/app/
Expand Down
6 changes: 3 additions & 3 deletions runtime/admin/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# ---- Build-time configuration ----
# Build-time properties take effect when Quarkus processes java classes
# and creates Polaris jars. These properties cannot be overriden in runtime.
# and creates Polaris jars. These properties cannot be overridden in runtime.
# Cf. https://quarkus.io/guides/all-config

quarkus.application.name=Apache Polaris Admin Tool (incubating)
Expand Down Expand Up @@ -53,7 +53,7 @@ quarkus.arc.ignored-split-packages=\
org.apache.polaris.admintool

## Quarkus required setting for third party indexing
# fixed at buildtime
# fixed at build-time
quarkus.index-dependency.avro.group-id=org.apache.avro
quarkus.index-dependency.avro.artifact-id=avro
quarkus.index-dependency.guava.group-id=com.google.guava
Expand All @@ -65,5 +65,5 @@ quarkus.index-dependency.protobuf.artifact-id=protobuf-java
# Set root logging level to WARN to avoid mostly irrelevant Quarkus log messages.
# The Admin tool communicates with the user via STDOUT/STDERR
quarkus.log.level=WARN
# Prevent the 'The Agroal dependency is present but no JDBC datasources have been defined.' built-time warning.
# Prevent the 'The Agroal dependency is present but no JDBC datasources have been defined.' build-time warning.
quarkus.log.category."io.quarkus.agroal.deployment".level=ERROR
6 changes: 3 additions & 3 deletions runtime/defaults/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# ---- Build-time configuration ----
# Build-time properties take effect when Quarkus processes java classes
# and creates Polaris jars. These properties cannot be overriden in runtime.
# and creates Polaris jars. These properties cannot be overridden in runtime.
# Cf. https://quarkus.io/guides/all-config

quarkus.banner.path=/org/apache/polaris/service/banner.txt
Expand Down Expand Up @@ -89,7 +89,7 @@ quarkus.oidc.tenant-enabled=false
# quarkus.oidc.idp1.auth-server-url=https://auth.example.com/realms/polaris2
# quarkus.oidc.idp1.client-id=polaris2

# quarkus.otel.sdk.disabled is set to `true` by default to avoid spuriour errors about
# quarkus.otel.sdk.disabled is set to `true` by default to avoid spurious errors about
# trace collector connections being impossible to establish. This setting can be enabled
# at runtime after configuring other OTel properties for proper trace data collection.
quarkus.otel.sdk.disabled=true
Expand Down Expand Up @@ -269,7 +269,7 @@ quarkus.arc.ignored-split-packages=\
org.apache.polaris.admintool

## Quarkus required setting for third party indexing
# fixed at buildtime
# fixed at build-time
quarkus.index-dependency.avro.group-id=org.apache.avro
quarkus.index-dependency.avro.artifact-id=avro
quarkus.index-dependency.guava.group-id=com.google.guava
Expand Down
2 changes: 1 addition & 1 deletion runtime/server/src/main/docker/Dockerfile.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ENV USER=polaris
ENV UID=10000
ENV HOME=/home/polaris

# We make four distinct layers so if there are application changes the library layers can be re-used
# We make four distinct layers so if there are application changes the library layers can be reused
COPY --chown=polaris:polaris build/quarkus-app/lib/ /deployments/lib/
COPY --chown=polaris:polaris build/quarkus-app/*.jar /deployments/
COPY --chown=polaris:polaris build/quarkus-app/app/ /deployments/app/
Expand Down
2 changes: 1 addition & 1 deletion runtime/server/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# ---- Build-time configuration ----
# Build-time properties take effect when Quarkus processes java classes
# and creates Polaris jars. These properties cannot be overriden in runtime.
# and creates Polaris jars. These properties cannot be overridden in runtime.
# Cf. https://quarkus.io/guides/all-config

quarkus.application.name=Apache Polaris Server (incubating)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
* Namespaces, Tables and Views, abstracted away from Iceberg REST objects, this class represents
* the logical model for managing realm-level Catalogs, Principals, Roles, and Grants.
*
* <p>Different API implementors could expose different REST, gRPC, etc., interfaces that delegate
* <p>Different API implementers could expose different REST, gRPC, etc., interfaces that delegate
* to this logical model without being tightly coupled to a single frontend protocol, and can
* provide different implementations of PolarisEntityManager to abstract away the implementation of
* the persistence layer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ private String applyDefaultLocationObjectStoragePrefix(
if (!optimizedSiblingCheck) {
throw new IllegalStateException(
String.format(
"%s and %s are both disabled, which means that table location overlap checkes are being"
"%s and %s are both disabled, which means that table location overlap checks are being"
+ " performed, but only within each namespace. However, %s is enabled, which indicates"
+ " that tables may be created outside of their parent namespace. This is not a safe"
+ " combination of configurations.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ public Catalog createCallContextCatalog(
* @param cleanupAction If non-null, additional action to run to "undo" a previous success action
* in case the action has side effects. Called before revoking the sufficient privilege;
* either the cleanup privileges must be latent, or the cleanup action could be run with
* PRINCIPAL_ROLE2 while runnint {@code action} with PRINCIPAL_ROLE1.
* PRINCIPAL_ROLE2 while running {@code action} with PRINCIPAL_ROLE1.
* @param principalName the name expected to appear in forbidden errors
* @param grantAction the grantPrivilege action to use for each test privilege that will apply the
* privilege to whatever context is used in the {@code action}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private GenericTableCatalogHandler newWrapper(
* @param cleanupAction If non-null, additional action to run to "undo" a previous success action
* in case the action has side effects. Called before revoking the sufficient privilege;
* either the cleanup privileges must be latent, or the cleanup action could be run with
* PRINCIPAL_ROLE2 while runnint {@code action} with PRINCIPAL_ROLE1.
* PRINCIPAL_ROLE2 while running {@code action} with PRINCIPAL_ROLE1.
*/
private void doTestSufficientPrivileges(
List<PolarisPrivilege> sufficientPrivileges, Runnable action, Runnable cleanupAction) {
Expand Down
Loading