1

Cassandra Triggers にエラーがあるコードをデバッグするにはどうすればよいですか?

エラーが発生する可能性のあるコードは次のとおりです。

このコードは、更新を別のアプリケーションに送信します SampleConsumer()

public Collection<Mutation> augment(ByteBuffer key, ColumnFamily update) {

    LinkedList<Mutation> dummyReturn = new LinkedList<Mutation>();
    SampleConsumer cons = new SampleConsumer();

    String payload = "key="+key.toString()+"&";

    // get the column names and their values in a string
    for (CellName columnName : update.getColumnNames()) {
        payload += (columnName.toString()+"="+update.getColumn(columnName).value().toString()+"&");
    }

    // This publishing to the consumer works perfectly if i hardcode a payload instead of calculating it.
    cons.write(payload);

    return dummyReturn;
}

cqlsh を使用して列ファミリーを更新しているときにこのエラーが発生します

[cqlsh 4.1.1 | Cassandra 2.0.7.31 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
cqlsh> create TABLE store.users(user_name varchar PRIMARY KEY, password varchar);
cqlsh> CREATE TRIGGER ctrigger ON store.users USING 'com.castrigger.casNotify';
cqlsh> INSERT INTO store.users (user_name, password) VALUES ('sampleuser','samplepass');
**TSocket read 0 bytes**
4

2 に答える 2

1

カサンドラのログを見ることができます。デフォルトでは、次の場所にあります

/var/log/cassandra/system.log

于 2014-06-25T08:49:19.020 に答える