Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Add metastore.client.class option to hive catalog configuration document. #4627

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading