xunliu commented on code in PR #6698:
URL: https://github.com/apache/gravitino/pull/6698#discussion_r2012208939
##########
authorizations/authorization-common/src/main/java/org/apache/gravitino/authorization/common/PathBasedMetadataObject.java:
##########
@@ -27,20 +27,48 @@
public class PathBasedMetadataObject implements AuthorizationMetadataObject {
/**
* The type of metadata object in the underlying system. Every type will map
one kind of the
- * entity of the Gravitino type system.
+ * entity of the Gravitino type system. When we store a Hive table, first,
we will store the
+ * metadata in the JDBC database like MySQL, and then we will store the data
in the HDFS location.
+ * For Hive, there is a default location for the cluster level. We can also
specify other
+ * locations for schema and table levels. So a path may not be fileset
*/
- public enum Type implements AuthorizationMetadataObject.Type {
- /** A path is mapped the path of storages like HDFS, S3 etc. */
- PATH(MetadataObject.Type.FILESET);
+ public static final class PathType implements
AuthorizationMetadataObject.Type {
+
private final MetadataObject.Type metadataType;
- Type(MetadataObject.Type type) {
+ public static PathType get(MetadataObject.Type type) {
+ return new PathType(type);
+ }
+
+ private PathType(MetadataObject.Type type) {
this.metadataType = type;
Review Comment:
Maybe we need to check type if the `Fileset`, `SCHEMA`, `xxxx`, ...?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]