對搭配 Amazon Keyspaces 使用 Spark Cassandra 連接器時的常見錯誤進行故障診斷 - Amazon Keyspaces (適用於 Apache Cassandra)

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

對搭配 Amazon Keyspaces 使用 Spark Cassandra 連接器時的常見錯誤進行故障診斷

如果您使用 Amazon Virtual Private Cloud 並連線至 Amazon Keyspaces,則使用 Spark 連接器時最常見的錯誤是由下列組態問題所造成。

如需詳細的連線疑難排解步驟,請參閱 我的 VPC 端點連線無法正常運作

此外,您可以使用 Amazon CloudWatch 指標來協助您疑難排解 Amazon Keyspaces 中 Spark Cassandra Connector 組態的問題。若要進一步了解如何搭配 CloudWatch 使用 Amazon Keyspaces,請參閱 使用 Amazon CloudWatch 監控 Amazon Keyspaces

下一節說明當您使用 Spark Cassandra 連接器時,應觀察的最有用指標。

PerConnectionRequestRateExceeded

Amazon Keyspaces 的配額為每個連線每秒 3,000 個請求。每個 Spark 執行器都會建立與 Amazon Keyspaces 的連線。執行多次重試可能會耗盡每個連線請求率配額。如果您超過此配額,Amazon Keyspaces 會在 CloudWatch 中發出PerConnectionRequestRateExceeded指標。

如果您看到 PerConnectionRequestRateExceeded 事件與其他系統或使用者錯誤一起出現,則 Spark 可能會執行超過每個連線所分配請求數量的多次重試。

如果您在沒有其他錯誤的情況下看到PerConnectionRequestRateExceeded事件,則可能需要增加驅動程式設定中的連線數目,以允許更多輸送量,或者您可能需要增加 Spark 任務中的執行器數目。

StoragePartitionThroughputCapacityExceeded

Amazon Keyspaces 配額為每個分割區每秒 1,000 WCUs 或 WRUs/每秒 3,000 RCUs 或 RRUs。如果您看到 StoragePartitionThroughputCapacityExceeded CloudWatch 事件,可能表示資料未在載入時隨機化。如需如何隨機播放資料的範例,請參閱 步驟 4:準備 Amazon Keyspaces 中的來源資料和目標資料表

常見錯誤和警告

如果您使用 Amazon Virtual Private Cloud 並連線至 Amazon Keyspaces,Cassandra 驅動程式可能會在 system.peers 資料表中發出有關控制節點本身的警告訊息。如需詳細資訊,請參閱常見錯誤和警告。您可以安全地忽略此警告。