tengqm commented on code in PR #5791:
URL: https://github.com/apache/gravitino/pull/5791#discussion_r1875283757


##########
core/src/main/java/org/apache/gravitino/connector/WildcardPropertiesMeta.java:
##########
@@ -0,0 +1,178 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.gravitino.connector;
+
+import com.google.common.base.Preconditions;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+
+/**
+ * WildcardPropertiesMeta is a utility class to validate wildcard properties 
in the properties
+ * metadata. <br>
+ * <br>
+ * WildcardPropertiesMeta interface defines: <br>
+ * FirstNode.SecondNode.WildcardNode = "" <br>
+ * FirstNode.SecondNode.*.property-key1 = "" <br>
+ * FirstNode.SecondNode.*.property-key2 = "" <br>
+ * <br>
+ * Use define a WildcardPropertiesMeta object: <br>
+ * FirstNode.SecondNode.WildcardNode = "WildcardValue1,WildcardValue2" <br>
+ * FirstNode.SecondNode.{WildcardValue1}.property-key1 = "WildcardValue1 
property-key1 value" <br>
+ * FirstNode.SecondNode.{WildcardValue1}.property-key2 = "WildcardValue1 
property-key2 value" <br>
+ * FirstNode.SecondNode.{WildcardValue2}.property-key1 = "WildcardValue2 
property-key1 value" <br>
+ * FirstNode.SecondNode.{WildcardValue2}.property-key2 = "WildcardValue2 
property-key2 value" <br>
+ * <br>
+ * Configuration Example: {@link AuthorizationPropertiesMeta} <br>
+ * "authorization.chain.plugins" = "hive1,hdfs1" <br>
+ * "authorization.chain.hive1.provider" = "ranger"; <br>
+ * "authorization.chain.hive1.catalog-provider" = "hive"; <br>
+ * "authorization.chain.hive1.ranger.auth.type" = "simple"; <br>
+ * "authorization.chain.hive1.ranger.admin.url" = "http://localhost:6080";; <br>
+ * "authorization.chain.hive1.ranger.username" = "admin"; <br>
+ * "authorization.chain.hive1.ranger.password" = "admin"; <br>
+ * "authorization.chain.hive1.ranger.service.name" = "hiveDev"; <br>
+ * "authorization.chain.hdfs1.provider" = "ranger"; <br>
+ * "authorization.chain.hdfs1.catalog-provider" = "hadoop"; <br>
+ * "authorization.chain.hdfs1.ranger.auth.type" = "simple"; <br>
+ * "authorization.chain.hdfs1.ranger.admin.url" = "http://localhost:6080";; <br>
+ * "authorization.chain.hdfs1.ranger.username" = "admin"; <br>
+ * "authorization.chain.hdfs1.ranger.password" = "admin"; <br>
+ * "authorization.chain.hdfs1.ranger.service.name" = "hdfsDev"; <br>
+ */
+public interface WildcardPropertiesMeta {
+  class Constants {
+    public static final String WILDCARD = "*";
+    public static final String WILDCARD_CONFIG_VALUES_SPLITTER = ",";
+  }
+
+  /** The FirstNode define name */
+  String firstNodeName();
+  /** The SecondNode define name */
+  String secondNodeName();
+  /** The WildcardNode define name */
+  String wildcardNodeName();
+  /** Generate FirstNode properties key name */
+  default String generateFirstNodePropertyKey(String key) {

Review Comment:
   ```suggestion
     default String firstNodePropertyKey(String key) {
   ```



-- 
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]

Reply via email to