Skip to content

Commit

Permalink
[hive] Add metastore.client.class option to hive catalog configuratio…
Browse files Browse the repository at this point in the history
…n document. (apache#4627)
  • Loading branch information
zhuangchong authored Dec 3, 2024
1 parent 79602cd commit 11cebd4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,12 @@
you can set this option to true.
</td>
</tr>
<tr>
<td><h5>metastore.client.class</h5></td>
<td style="word-wrap: break-word;">"org.apache.hadoop.hive.metastore.HiveMetaStoreClient"</td>
<td>String</td>
<td>Class name of Hive metastore client.
NOTE: This class must directly implements org.apache.hadoop.hive.metastore.IMetaStoreClient.</td>
</tr>
</tbody>
</table>
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ public static Catalog createHiveCatalog(CatalogContext context) {
return new HiveCatalog(
fileIO,
hiveConf,
options.get(HiveCatalogFactory.METASTORE_CLIENT_CLASS),
options.get(HiveCatalogOptions.METASTORE_CLIENT_CLASS),
options,
warehouse.toUri().toString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,12 @@
import org.apache.paimon.catalog.Catalog;
import org.apache.paimon.catalog.CatalogContext;
import org.apache.paimon.catalog.CatalogFactory;
import org.apache.paimon.options.ConfigOption;
import org.apache.paimon.options.ConfigOptions;

import static org.apache.paimon.hive.HiveCatalogOptions.IDENTIFIER;

/** Factory to create {@link HiveCatalog}. */
public class HiveCatalogFactory implements CatalogFactory {

public static final ConfigOption<String> METASTORE_CLIENT_CLASS =
ConfigOptions.key("metastore.client.class")
.stringType()
.defaultValue("org.apache.hadoop.hive.metastore.HiveMetaStoreClient")
.withDescription(
"Class name of Hive metastore client.\n"
+ "NOTE: This class must directly implements "
+ "org.apache.hadoop.hive.metastore.IMetaStoreClient.");

@Override
public String identifier() {
return IDENTIFIER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,15 @@ public final class HiveCatalogOptions {
+ "If not configured, try to load from 'HADOOP_CONF_DIR' or 'HADOOP_HOME' system environment.\n"
+ "Configure Priority: 1.from 'hadoop-conf-dir' 2.from HADOOP_CONF_DIR 3.from HADOOP_HOME/conf 4.HADOOP_HOME/etc/hadoop.\n");

public static final ConfigOption<String> METASTORE_CLIENT_CLASS =
ConfigOptions.key("metastore.client.class")
.stringType()
.defaultValue("org.apache.hadoop.hive.metastore.HiveMetaStoreClient")
.withDescription(
"Class name of Hive metastore client.\n"
+ "NOTE: This class must directly implements "
+ "org.apache.hadoop.hive.metastore.IMetaStoreClient.");

public static final ConfigOption<Boolean> LOCATION_IN_PROPERTIES =
ConfigOptions.key("location-in-properties")
.booleanType()
Expand Down

0 comments on commit 11cebd4

Please sign in to comment.