백 엔드가 카산드라이고 프런트 엔드가 j2ee 인 poc를 작성하려고합니다. 내 Java ID (일식)에 cassandra lib 폴더에있는 jar 파일을 추가했습니다. 그러나 여러 가지 api 메소드가이 컨텍스트에서 인식되지 않습니다!cassandra 데이터베이스에 연결하는 데 필요한 드라이버 항아리가 있습니까
oracle 또는 sybase의 경우처럼 추가해야하는 cassandra 용 드라이버 jar가 있습니까?
백 엔드가 카산드라이고 프런트 엔드가 j2ee 인 poc를 작성하려고합니다. 내 Java ID (일식)에 cassandra lib 폴더에있는 jar 파일을 추가했습니다. 그러나 여러 가지 api 메소드가이 컨텍스트에서 인식되지 않습니다!cassandra 데이터베이스에 연결하는 데 필요한 드라이버 항아리가 있습니까
oracle 또는 sybase의 경우처럼 추가해야하는 cassandra 용 드라이버 jar가 있습니까?
j2ee에는 cassandra jars가 필요하지 않습니다. 공식 클라이언트 측 API는 드리프트이며, 여기에 사용 중고품을 연결하는 방법에 대한 자바 예제 - http://wiki.apache.org/cassandra/ThriftExamples
카산드라와 연결 드리프트에 사용할 수있는 몇 가지 자바 래퍼가 (드리프트 API는 친절한 매우 사용자가 아니므로). - 내가보기 엔 헥터을 추천 할 수 있습니다 그 중 http://prettyprint.me/2010/02/23/hector-a-java-cassandra-client/
왜 헥터 시도하지 않습니다 https://github.com/rantav/hector
import me.prettyprint.cassandra.serializers.StringSerializer;
import me.prettyprint.cassandra.service.CassandraHostConfigurator;
import me.prettyprint.hector.api.Cluster;
import me.prettyprint.hector.api.Keyspace;
import me.prettyprint.hector.api.beans.HColumn;
import me.prettyprint.hector.api.factory.HFactory;
import me.prettyprint.hector.api.mutation.MutationResult;
import me.prettyprint.hector.api.mutation.Mutator;
import me.prettyprint.hector.api.query.ColumnQuery;
import me.prettyprint.hector.api.query.QueryResult;
// sample connect method in Java
private static void connect() {
Cluster cluster;
Keyspace keyspace;
StringSerializer se = new StringSerializer();
cluster = HFactory.getOrCreateCluster("TestCluster", new CassandraHostConfigurator("localhost:9160"));
keyspace = HFactory.createKeyspace("Twissandra", cluster);
Mutator<String> mutator = HFactory.createMutator(keyspace, se)
MutationResult rs = mutator.insert("some-name-key", "User",
HFactory.createStringColumn("first", "some value"));