You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "xushiyan (via GitHub)" <gi...@apache.org> on 2023/03/21 03:02:21 UTC

[GitHub] [hudi] xushiyan commented on a diff in pull request #8152: [HUDI-5740] Refactor Deltastreamer and schema providers to use HoodieConfig/ConfigProperty

xushiyan commented on code in PR #8152:
URL: https://github.com/apache/hudi/pull/8152#discussion_r1142847225


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/config/BaseSchemaPostProcessorConfig.java:
##########
@@ -7,23 +7,33 @@
  * "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
+ *   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.
+ * 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.hudi.utilities.schema.postprocessor.add;
+package org.apache.hudi.utilities.config;
 
+import org.apache.hudi.common.config.ConfigClassProperty;
+import org.apache.hudi.common.config.ConfigGroups;
 import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.HoodieConfig;
+
+import javax.annotation.concurrent.Immutable;
 
 /**
  * Base configs to describe a primitive type column.
  */
-public class BaseSchemaPostProcessorConfig {
+@Immutable
+@ConfigClassProperty(name = "Schema Post Processor Config Configs",
+    groupName = ConfigGroups.Names.DELTA_STREAMER,
+    description = "Base configs to describe a primitive type column.")
+public class BaseSchemaPostProcessorConfig extends HoodieConfig {

Review Comment:
   not sure why it's called `Base` in the first place. would it better to remove `Base` prefix to avoid implication of subclassing?



##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/config/BaseSchemaPostProcessorConfig.java:
##########
@@ -7,23 +7,33 @@
  * "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
+ *   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.
+ * 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.hudi.utilities.schema.postprocessor.add;
+package org.apache.hudi.utilities.config;
 
+import org.apache.hudi.common.config.ConfigClassProperty;
+import org.apache.hudi.common.config.ConfigGroups;
 import org.apache.hudi.common.config.ConfigProperty;
+import org.apache.hudi.common.config.HoodieConfig;
+
+import javax.annotation.concurrent.Immutable;
 
 /**
  * Base configs to describe a primitive type column.
  */
-public class BaseSchemaPostProcessorConfig {
+@Immutable
+@ConfigClassProperty(name = "Schema Post Processor Config Configs",
+    groupName = ConfigGroups.Names.DELTA_STREAMER,
+    description = "Base configs to describe a primitive type column.")
+public class BaseSchemaPostProcessorConfig extends HoodieConfig {

Review Comment:
   should this be under SchemaProvider subgroup? as it's tightly coupled with SchemaProvider



##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/HoodieMultiTableDeltaStreamer.java:
##########
@@ -442,17 +443,11 @@ public void sync() {
   }
 
   public static class Constants {

Review Comment:
   this class ideally should be private. but for tests, let's make it and its members all package access?



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org