나는 Cassandra의 독립 실행 형 버전이 있습니다. 다음 명령을 사용하여 실행합니다 :
./cassandra -f
타이탄 그래프 라이브러리가 설치된 Java 응용 프로그램도 있습니다. TitanGraph 객체를 얻으려면 다음 코드를 사용하십시오.
BaseConfiguration configuration = new BaseConfiguration();
configuration.setProperty("storage.backend", "cassandra");
configuration.setProperty("storage.hostname", "127.0.0.1");
TitanGraph graph = TitanFactory.open(configuration);
이 후에 필자는 Vertices/Edges를 추가하고 쿼리 할 수 있습니다. 나는 로컬 카산드라 데이터베이스에 추가 검사를하고 확인할 수 있습니다 생성되는 레코드가 그리고 내가 rexster 서버를 시작할 때 문제가 발생
cqlsh> select count(*) from titan.edgestore;
count
--------
185050
(1 rows)
을 지속. 다음 명령을 사용하여 독립 실행 형 모드로 실행합니다.
./rexster.sh -s -c ../config/rexster.xml
그런 다음 렉스 스타 콘솔을 시작하고 그래프를로드합니다. 문제는 그래프에 데이터가없는 것 같습니다. 나는 정말로 여기서 무슨 일이 일어나고 있는지 잘 모르겠습니다. 카산드라를 실행하는 인스턴스는 단 1 개뿐입니다. 다음은
(l_(l
(_______(0 0
( (-Y-) <woof>
l l-----l l
l l,, l l,,
opening session [127.0.0.1:8184]
?h for help
rexster[groovy]> ?h
-= Console Specific =-
?<language-name>: jump to engine
?l: list of available languages on Rexster
?b: print available bindings in the session
?r: reset the rexster session
?e <file-name>: execute a script file
?q: quit
?h: displays this message
-= Rexster Context =-
rexster.getGraph(graphName) - gets a Graph instance
:graphName - [String] - the name of a graph configured within Rexster
rexster.getGraphNames() - gets the set of graph names configured within Rexster
rexster.getVersion() - gets the version of Rexster server
rexster[groovy]> rexster.getGraphNames()
==>kpdlp
rexster[groovy]> rexster.getGraph('graph')
==>titangraph[cassandrathrift:[127.0.0.1]]
rexster[groovy]> g = rexster.getGraph('graph')
==>titangraph[cassandrathrift:[127.0.0.1]]
rexster[groovy]> g.V.count()
==>0
rexster[groovy]>
아마도 Rexster의 역할 단지 약간의 혼동이 내가
<?xml version="1.0" encoding="UTF-8"?>
<rexster>
<http>
<server-port>8182</server-port>
<server-host>0.0.0.0</server-host>
<base-uri>http://localhost</base-uri>
<web-root>public</web-root>
<character-set>UTF-8</character-set>
<enable-jmx>false</enable-jmx>
<enable-doghouse>true</enable-doghouse>
<max-post-size>2097152</max-post-size>
<max-header-size>8192</max-header-size>
<upload-timeout-millis>30000</upload-timeout-millis>
<thread-pool>
<worker>
<core-size>8</core-size>
<max-size>8</max-size>
</worker>
<kernal>
<core-size>4</core-size>
<max-size>4</max-size>
</kernal>
</thread-pool>
<io-strategy>leader-follower</io-strategy>
</http>
<rexpro>
<server-port>8184</server-port>
<server-host>0.0.0.0</server-host>
<session-max-idle>1790000</session-max-idle>
<session-check-interval>3000000</session-check-interval>
<read-buffer>65536</read-buffer>
<enable-jmx>false</enable-jmx>
<thread-pool>
<worker>
<core-size>8</core-size>
<max-size>8</max-size>
</worker>
<kernal>
<core-size>4</core-size>
<max-size>4</max-size>
</kernal>
</thread-pool>
<io-strategy>leader-follower</io-strategy>
</rexpro>
<shutdown-port>8183</shutdown-port>
<shutdown-host>127.0.0.1</shutdown-host>
<config-check-interval>10000</config-check-interval>
<script-engines>
<script-engine>
<name>gremlin-groovy</name>
<reset-threshold>-1</reset-threshold>
<init-scripts>config/init.groovy</init-scripts>
<imports>com.tinkerpop.rexster.client.*</imports>
<static-imports>java.lang.Math.PI</static-imports>
</script-engine>
</script-engines>
<security>
<authentication>
<type>none</type>
<configuration>
<users>
<user>
<username>rexster</username>
<password>rexster</password>
</user>
</users>
</configuration>
</authentication>
</security>
<metrics>
<reporter>
<type>jmx</type>
</reporter>
<reporter>
<type>http</type>
</reporter>
<reporter>
<type>console</type>
<properties>
<rates-time-unit>SECONDS</rates-time-unit>
<duration-time-unit>SECONDS</duration-time-unit>
<report-period>10</report-period>
<report-time-unit>MINUTES</report-time-unit>
<includes>http.rest.*</includes>
<excludes>http.rest.*.delete</excludes>
</properties>
</reporter>
</metrics>
<graphs>
<graph>
<graph-name>graph</graph-name>
<graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
<graph-location></graph-location>
<graph-read-only>false</graph-read-only>
<properties>
<storage.backend>cassandrathrift</storage.backend>
<storage.hostname>127.0.0.1</storage.hostname>
</properties>
<extensions>
<allows>
<allow>tp:gremlin</allow>
</allows>
</extensions>
</graph>
</graphs>
</rexster>
그건 의미가 있습니다. Rexster Graph의 이름은 Graph에 연결하는 것과 아무 관련이 없습니다. Rexster가 API를 통해 연결하는 인스턴스에 액세스하는 고유 키입니까? 그것은 많은 도움이됩니다. Rexster를 통해 연결할 때 Java 응용 프로그램에서 생성하는 데이터가 표시되지 않는 문제가 여전히 있습니다. – NCALSTEVE
그 반대가 될 수 있습니까? rexster 콘솔에서 vertex/commit을 추가하고 응용 프로그램 코드 (또는 Gremlin Console)의'TitanGraph' 인스턴스에서 액세스 할 수 있는지 확인하십시오. 종종 이런 문제는 트랜잭션을 커밋하지 않거나 잘못된 데이터베이스 인스턴스를 가리키는 것과 관련이 있습니다. 그 중 어떤 것도 문제는 아니지만 다시 검토 할 가치가 있다는 것을 확인한 것 같습니다. –
rexster-server에서이 오류가 발생했습니다. 원인 : com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException : PoolTimeoutException : [host = 127.0.0.1 (127.0.0.1) : 6534, latency = 10004 (10004), attempts = 1] 연결 대기 시간이 초과되었습니다. 최신 버전의 cassandra를 사용하고 있습니다. 카산드라에게 연결하는 데 문제가 될 수 있습니까? 괴괴 망측 한 점은 비록 자바 애플리케이션에서 데이터를 볼 수 없지만 여전히 버텍스와 에지를 생성 할 수 있으며 계속 유지되는 것처럼 보입니다. 그것들은 카산드라 데이터베이스에 저장되지 않은 것처럼 보입니다. – NCALSTEVE