データ・カタログ・メタストアにアクセスするためのSparkの構成
- Apache Ambariにアクセスします。
- サイド・ツールバーの「サービス」で、Spark3を選択します。
- 「Configs」タブを選択し、「Advanced spark3-defaults」セクションを展開します。
-
次の値を使用して
spark.sql.hive.metastore.jarsキーを追加または更新します:/usr/lib/oci-dcat-metastore-client/lib/integration/*:/usr/lib/oci-dcat-metastore-client/lib/*:/usr/lib/hive/lib/*:{{spark_home}}/jars/* -
管理対象表のオブジェクト・ストレージ・パスを使用して
spark.sql.warehouse.dirキーを追加または更新します。例:oci://bucket-name@tenancy-name-of-bucket/path/to/managed/table/directory。 - 「Custom spark3-defaults」セクションを展開します。
-
次の値を使用して
spark.driver.extraJavaOptionsキーを追加または更新します:-Doracle.dcat.metastore.client.show_provider_details=true -Doracle.dcat.metastore.client.custom.authentication_provider=com.oracle.pic.dcat.metastore.commons.auth.provider.UserPrincipalsCustomAuthenticationDetailsProvider -DOCI_TENANT_METADATA=ocid1.tenancy.oc1.<unique_ID> -DOCI_REGION_METADATA=<region-identifier> -DOCI_USER_METADATA=ocid1.user.oc1.<unique_ID> -DOCI_FINGERPRINT_METADATA=<user-finger-print> -DOCI_PVT_KEY_FILE_PATH=/private <key-file-path.pem> -DOCI_PASSPHRASE_METADATA="<passphase-of-the-key>" -Doci.metastore.uris=https://datacatalog.<region>.oci.oraclecloud.com:443 -Doracle.dcat.metastore.id=ocid1.datacatalogmetastore.oc1.<unique_ID> -
spark.hadoop.fs.AbstractFileSystem.oci.implキーを値com.oracle.bmc.hdfs.Bmcで追加または更新します -
オブジェクト・ストレージURLを使用して
spark.hadoop.fs.oci.client.hostnameキーを追加または更新します。例:https://objectstorage.<region-identifier>.oraclecloud.com。 - 「Custom spark3-hive-site-override」セクションを展開します。
-
メタストアURLを使用して
hive.metastore.urisキーを追加または更新します。例:https://datacatalog.<region-identifier>.oci.oraclecloud.com:443。 -
管理対象表のオブジェクト・ストレージ・パスを使用して
hive.metastore.warehouse.dirキーを追加または更新します。例:oci://bucket-name@tenancy-name-of-bucket/path/to/managed/table/directory。 -
外部表のオブジェクト・ストレージ・パスを使用して
hive.metastore.warehouse.external.dirキーを追加または更新します。例:oci://bucket-name@tenancy-name-of-bucket/path/to/external/table/directory。 - 「Advanced spark3-thrift-sparkconf」セクションを展開します。
-
次の値を使用して
spark.sql.hive.metastore.jarsキーを追加または更新します:/usr/lib/oci-dcat-metastore-client/lib/integration/*:/usr/lib/oci-dcat-metastore-client/lib/*:/usr/lib/hive/lib/*:{{spark_home}}/jars/*ノート
:{{hadoop_home}}/lib/*がないことを確認します。 - 「Custom spark3-thrift-sparkconf」セクションを展開します。
-
次の値を使用して
spark.driver.extraJavaOptionsキーを追加または更新します:-Doracle.dcat.metastore.client.show_provider_details=true -Doracle.dcat.metastore.client.custom.authentication_provider=com.oracle.pic.dcat.metastore.commons.auth.provider.UserPrincipalsCustomAuthenticationDetailsProvider -DOCI_TENANT_METADATA=ocid1.tenancy.oc1.<unique_ID> -DOCI_REGION_METADATA=<region-identifier> -DOCI_USER_METADATA=ocid1.user.oc1.<unique_ID> -DOCI_FINGERPRINT_METADATA=<user-finger-print> -DOCI_PVT_KEY_FILE_PATH=/private <key-file-path.pem> -DOCI_PASSPHRASE_METADATA="<passphase-of-the-key>" -Doci.metastore.uris=https://datacatalog.<region>.oci.oraclecloud.com:443 -Doracle.dcat.metastore.id=ocid1.datacatalogmetastore.oc1.<unique_ID> - 「Restart」を選択して、ビッグ・データ・サービス・クラスタでSparkサービスを再起動します。