2
カッサンドラとJavaを使用してTitanを設定したいと思います。Titanを設定する未解決の参照
私が使用して自分のプロジェクトにライブラリをインポート:
compile group: 'com.thinkaurelius.titan', name: 'titan-cassandra', version: '1.0.0'
を、私は元のソース例をコピー:
しかし、次のものが動作しません:
import com.thinkaurelius.titan.core.TitanKey;
import com.thinkaurelius.titan.core.attribute.Geoshape;
import static com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.INDEX_BACKEND_KEY;
import static com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.STORAGE_DIRECTORY_KEY;
が存在しません
と、次のスローエラー彼は参照を解決することはできませんので:
Configuration storage = config.subset(GraphDatabaseConfiguration.STORAGE_NAME_SPACE);
storage.setProperty(GraphDatabaseConfiguration.STORAGE_BACKEND_KEY, "local");
storage.setProperty(GraphDatabaseConfiguration.STORAGE_DIRECTORY_KEY, directory);
Configuration index = storage.subset(GraphDatabaseConfiguration.INDEX_NAMESPACE).subset(INDEX_NAME);
index.setProperty(INDEX_BACKEND_KEY, "elasticsearch");
index.setProperty(STORAGE_DIRECTORY_KEY, directory + File.separator + "es");
また、 'master'ブランチは古くなっています。 GitHubのデフォルトのブランチは実際には 'titan10'であり、最新の開発は' titan11'ブランチです。 –
私はgradleを使ってチェックアウトしなければならないバージョンはどれですか? titan10はすでに安定していますか? – user2524707
あなたのgradleのインポートは正常に見えます。 'titan10'には' 1.0.0'を超えていくつかの変更があります。一致するソースコードである 'titan-1.0.0.zip'を使用している場合は、' 1.0.0'タグを付けておくことをお勧めします。 –