kbendick commented on a change in pull request #3326: URL: https://github.com/apache/iceberg/pull/3326#discussion_r739869391
########## File path: core/src/main/java/org/apache/iceberg/CatalogType.java ########## @@ -0,0 +1,57 @@ +/* + * 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.iceberg; + +import java.util.Locale; + +public enum CatalogType { + HIVE("org.apache.iceberg.hive.HiveCatalog"), + HADOOP("org.apache.iceberg.hadoop.HadoopCatalog"), + GLUE("org.apache.iceberg.aws.glue.GlueCatalog"), + NESSIE("org.apache.iceberg.nessie.NessieCatalog"), + DYNAMODB("org.apache.iceberg.aws.dynamodb.DynamoDbCatalog"), + JDBC("org.apache.iceberg.jdbc.JdbcCatalog"); + + private final String catalogImpl; + + CatalogType(String catalogImpl) { + this.catalogImpl = catalogImpl; + } + + public String typeName() { + return this.name().toLowerCase(Locale.ENGLISH); + } + + public String getCatalogImpl() { + return this.catalogImpl; Review comment: @harshm-dev I see you've asked about `this` in a few places. We tend to follow a convention where `this` is only used when the reference is ambiguous. Otherwise, we refer to class fields and methods without qualifying them with `this`. Part of that too is that we don't typically allow for `protected` fields (I think the style checker won't let you), so there's no need to use it outside of instances where it's required. Essentially, it's usually just used in constructors. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
