dse.yamlファイルでのGremlin Serverの構成

dse.yamlファイルでのGremlin Serverの構成方法。

Gremlin Serverは、dse.yamlファイルにApache TinkerPop仕様を使用して構成されます。構成オプションの全リストについては、TinkerPopのドキュメントを参照してください。

DSE Graphの場合、Gremlin Serverの最上位レベルの構成は、gremlin_serverというキーに組み込まれています。Gremlin Serverのほとんどの構成オプションがこれらの設定によるものですが、以下のオプションは無視されオーバーライドされます。

  • authentication:Gremlin ServerがすべてのセキュリティをDSEに委任すると、この設定は無視されます。
  • channelizer:Gremlin ServerのChannelizer実装は、常に、DSE監査へのフックや認証機能などを含むDseWebSocketChannelizerに設定されます。
  • graphs:グラフの一覧が完全に無視されます。グラフ・インスタンスは要求時に作成されます。
  • host:ホストが無視され、常にcassandra.yamlのrpc_addressと等しくなります。
  • processors:Gremlin Serverに標準装備されているStandardOpProcessorおよびSessionOpProcessorは、内部で上書きされます。DataStaxでは、追加のOpProcessor実装を含めることを推奨していません。
  • scriptEvaluationTimeout:多数のタイムアウト設定が、このdse.yamlと、特に個々のグラフ探索ソース・インスタンスでグローバルに構成されます。
  • ssl:Gremlin Serverは、DataStax Enterpriseと同じSSLコンテキストを使用します。
  • strictTransactionManagement:DataStax Enterpriseへのすべての要求でトランザクション管理が有効になります。
以下の例は、構成される基本機能を示しています。
# This is the default configuration for Gremlin Server.For more information about these 
# configuration options, see the TinkerPop documentation:
  #
# http://tinkerpop.apache.org/docs/3.2.0-incubating/reference/#_configuring_2
  #
# Note that for DSE Graph, the top-level configurations in Gremlin Server are embedded in a key called
# gremlin_server.It is further important to understand that while most configuration options for
# Gremlin Server come from these settings, there are some that are ignored and overridden:
  #
# - authentication:This setting is ignored as Gremlin Server delegates all security to DSE.
# - channelizer:The Channelizer implementation for Gremlin Server is always set to
#   DseWebSocketChannelizer which includes hooks into DSE audit and authentication features.
# - graphs:The list of graphs are completely ignored.Graph instances are created when they are
#   requested.
# - host:The host is ignored, it is always equal to rpc_address from cassandra.yaml
gremlin_server:
port: 8182  
threadPoolWorker: 1   
gremlinPool: 8
maxContentLength: 65536000
maxChunkSize: 4096000
serializers:
- { className:org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config:{ ioRegistries:[org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistry], classResolverSupplier:com.datastax.bdp.graph.impl.tinkerpop.io.DseClassResolverProvider }}
- { className:org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config:{ serializeResultToString:true }}
- { className:org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config:{ ioRegistries:[org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistry] }}
- { className:org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config:{ ioRegistries:[org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistry] }}
scriptEngines:
gremlin-groovy:
config:
compilerCustomizerProviders:
"org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.ThreadInterruptCustomizerProvider": []
"org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.InterpreterModeCustomizerProvider": []

maxContentLengthおよびmaxChunkSizeパラメーターは、コンテンツのブロックの最大長と、Gremlin ConsoleとGremlin Serverの間で渡される最大チャンク・サイズを設定します。serializersは、DataStax EnterpriseドライバーおよびGremlinドライバーによるGremlin Serverとの通信を許可するserializersのクラスと構成を識別します。

Gremlin Serverは、Gremlinのさまざまな言語バリアントを使用して通信できます。dse.yamlファイルでは、デフォルトでgremlin-groovyが構成されます。

dse.yamlファイルの場所は、インストールのタイプによって異なります。
Installer-Services /etc/dse/dse.yaml
パッケージ・インストール /etc/dse/dse.yaml
Installer-No Services install_location/resources/dse/conf/dse.yaml
tarボール・インストール install_location/resources/dse/conf/dse.yaml