附註:
- 此教學課程需要存取 Oracle Cloud。若要註冊免費帳戶,請參閱 Oracle Cloud Infrastructure Free Tier 入門。
- 它使用 Oracle Cloud Infrastructure 證明資料、租用戶及區間的範例值。完成實驗室時,請將這些值取代為您雲端環境特定的值。
從 Oracle Big Data Service 叢集存取跨區域 Oracle Cloud Infrastructure 儲存桶
簡介
在本教學課程中,我們將引導您完成從 Oracle Big Data Service 叢集存取跨區域 Oracle Cloud Infrastructure (OCI) 儲存桶的程序。OCI 中的跨區域儲存桶存取可讓 Oracle Big Data Service 叢集與位於不同區域的儲存桶緊密互動。此功能對於具有多重區域架構的組織而言至關重要,可有效共用資料、備份及管理資料。
目標
-
在 Oracle Big Data Service 叢集中啟用跨區域儲存桶存取。
-
設定並測試跨區域儲存桶設定。
-
針對處理期間的常見問題進行疑難排解。
必要條件
-
部署並執行 Oracle Big Data Service 叢集。
-
要存取的跨區域 Oracle Cloud Infrastructure 儲存桶。
-
存取 Oracle Big Data Service 節點和 Apache Ambari。
作業 1:在 Oracle Big Data Service 中啟用跨區域儲存桶存取
-
移至 Apache Ambari 主控台,瀏覽至服務、 HDFS 、組態然後按 進階。
-
在自訂核心網站區段中,新增下列 HDFS 自訂核心網站組態特性。
fs.oci.client.multiregion.enabled=true
-
儲存組態並重新啟動 Apache Ambari 中的所有必要服務。
作業 2:測試跨區域儲存桶存取
-
SSH 至 Oracle Big Data Service 叢集的任何節點。
-
使用下列 HDFS 命令測試跨區域儲存桶的存取權。
hdfs dfs -ls oci://<bucket name>@<namespace>.<region-code>/
將
<bucket name>
、<namespace>
及<region-code>
分別取代為您的儲存桶名稱、命名空間及目標區域的程式碼。例如us-phoenix-1
。
疑難排解與秘訣
-
驗證核心 - site.xml:如果無法存取儲存桶內容,請確定已使用
fs.oci.client.multiregion.enabled=true
特性正確更新core-site.xml
檔案。 -
Ambari Restart:變更組態後,重新啟動 Apache Ambari 中的所有相關服務。
接下來的步驟
考慮使用 Apache Hadoop 分散式複製 (DistCp) 等工具將跨區域同步自動化,以進行備份或災害復原。
相關連結
致謝
- 作者 - Pavan Upadhyay (Principal Cloud Engineer)、Saket Bihari (Principal Cloud Engineer)
其他學習資源
探索 docs.oracle.com/learn 上的其他實驗室,或存取 Oracle Learning YouTube 頻道上的更多免費學習內容。此外,請造訪 education.oracle.com/learning-explorer 以成為 Oracle Learning Explorer。
如需產品文件,請造訪 Oracle Help Center 。
Access Cross-Region Oracle Cloud Infrastructure Buckets from Oracle Big Data Service Cluster
G25409-01
January 2025