Skip to content

HIVE-29713 : maintain properties package, update JEXL dependency to JEXL 3.7.0#6592

Open
henrib wants to merge 1 commit into
apache:masterfrom
henrib:HIVE-29713
Open

HIVE-29713 : maintain properties package, update JEXL dependency to JEXL 3.7.0#6592
henrib wants to merge 1 commit into
apache:masterfrom
henrib:HIVE-29713

Conversation

@henrib

@henrib henrib commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

The properties package needed a bit of refresh and some documentation.
JEXL version needed an update.

Why are the changes needed?

Proactive maintenance especially wrt JEXL / security.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Unit tests

… update property management documentation;

- Updates JEXL dependency to 3.7.0
Copilot AI review requested due to automatic review settings July 9, 2026 17:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR performs maintenance on the standalone metastore “properties” package and updates the Apache Commons JEXL dependency to 3.7.0, alongside small code modernizations and documentation additions to make the properties subsystem easier to understand and maintain.

Changes:

  • Bump Apache Commons JEXL dependency to 3.7.0 and adjust JEXL engine initialization accordingly.
  • Modernize/cleanup properties package code (e.g., Java 21 language features, @Serial annotation).
  • Add new top-level documentation for the properties package and refresh/adjust existing Javadocs.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
standalone-metastore/pom.xml Updates the JEXL version property to 3.7.0.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/SerializationProxy.java Adds @Serial annotation for serialVersionUID.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/PropertyType.java Refactors casts using pattern matching for instanceof.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/PropertyStore.java Javadoc refresh (notably around bulk save semantics).
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/PropertyMap.java Minor Javadoc correction in the deserialization constructor comment.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/PropertyManager.java Updates JEXL feature initialization for compatibility with newer JEXL.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/HMSPropertyManager.java Updates documentation and maintenance-operation enums; modernizes switch usage.
PROPERTIES_PACKAGE.md Adds new package-level documentation and usage examples.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/**
* Persists an iterator property map.
* <p>May be useful to override to use one transaction.</p>
* <p>Maybe useful to override to use one transaction.</p>
Comment thread PROPERTIES_PACKAGE.md
### Serialization
- Custom `SerializationProxy` handles transient field safety
- Transient fields prevent accidental Java serialization of internal state
- Both XML (DataInput/DataOutput) and Java object serialization supported
Comment on lines 53 to +57
public enum MaintenanceOpType {
COMPACTION,
SNAPSHOT_EXPIRY,
STATS_REBUILD,
MV_BUILD,
MV_REFRESH,
SHUFFLE_TO_NEW_PART,
RECOMPRESS,
REORG
EXPIRE_SNAPSHOT,
REWRITE_DATA_FILES,
COMPRESS_DATA_FILES,
REWRITE_MANIFEST,
Comment thread PROPERTIES_PACKAGE.md
Comment on lines +28 to +31
PropertySchema tableSchema = new PropertySchema("table-schema", 1, new TreeMap<>());
tableSchema.declareProperty("owner", PropertyType.STRING, "system");
tableSchema.declareProperty("created_date", PropertyType.DATETIME);
tableSchema.declareProperty("tags", PropertyType.JSON);
Comment thread PROPERTIES_PACKAGE.md
Comment on lines +101 to +124
```java
// 1. Define a schema (typically done at startup)
PropertySchema tableSchema = new PropertySchema("table-schema", 1, new TreeMap<>());
tableSchema.declareProperty("owner", PropertyType.STRING, "admin");
tableSchema.declareProperty("is_external", PropertyType.BOOLEAN, false);
tableSchema.declareProperty("created_time", PropertyType.DATETIME);

// 2. Create a property manager
PropertyManager manager = new PropertyManager("my-namespace");

// 3. Load or create a property map for a table
PropertyMap tableProps = manager.newPropertyMap(tableSchema);

// 4. Set values
tableProps.put("owner", "alice");
tableProps.put("is_external", true);

// 5. Persist
manager.persistProperties(tableProps);

// 6. Later, retrieve and use
PropertyMap loaded = manager.loadProperties(objectId);
String owner = (String) loaded.get("owner");
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants