-1

Cassandra/Astyanax 開発環境で、単一/ローカルの Cassandra ノードを実行しています。この単一の Cassandra ノードが (何らかの理由で) ダウンすると、Astyanax ベースのクライアント コード (ミューテーション バッチ、クエリなど) は次のようなエラーで失敗します。

com.netflix.astyanax.connectionpool.exceptions.NoAvailableHostsException: NoAvailableHostsException: [host=None(0.0.0.0):0, latency=0(0), attempts=0]No hosts to borrow from
at com.netflix.astyanax.connectionpool.impl.RoundRobinExecuteWithFailover.<init>(RoundRobinExecuteWithFailover.java:30)
at com.netflix.astyanax.connectionpool.impl.TokenAwareConnectionPoolImpl.newExecuteWithFailover(TokenAwareConnectionPoolImpl.java:80)
at com.netflix.astyanax.connectionpool.impl.AbstractHostPartitionConnectionPool.executeWithFailover(AbstractHostPartitionConnectionPool.java:248)
at com.netflix.astyanax.thrift.ThriftColumnFamilyQueryImpl$4.execute(ThriftColumnFamilyQueryImpl.java:532)

この例外は、後続の Astyanax ベースのクライアント要求ごとにログに記録され、上記のログ スパムが発生します。基本的に、リクエストの受け入れを停止する方法で Astyanax 接続プールを構成し、理想的には Astyanax ベースのクライアント アプリケーション (サーバー アプリケーションなど) をシャットダウンできる何らかのコールバックを提供する方法があるかどうかを尋ねています。

4

1 に答える 1