0

我正在使用 OpenDaylight 并尝试用 Apache Ignite 替换默认的分布式数据库。我这里使用的是源代码获得的jar。 https://github.com/Romeh/akka-persistance-ignite

但是,IgniteWriteJournal 类似乎没有加载,我通过在其构造函数中放置一些打印语句进行了检查。

.conf 文件有问题吗?

以下是我在 OpenDaylight 中使用的 akka.conf 文件的一部分。

odl-cluster-data {
  akka {
    remote {
      artery {
    enabled = off
    canonical.hostname = "10.145.59.38"
    canonical.port = 2550
  }
  netty.tcp {
    hostname = "10.145.59.38"
    port = 2550
  }
  # when under load we might trip a false positive on the failure detector
  # transport-failure-detector {
    # heartbeat-interval = 4 s
    # acceptable-heartbeat-pause = 16s
  # }
}

cluster {
  # Remove ".tcp" when using artery.
  seed-nodes = ["akka.tcp://opendaylight-cluster-data@10.145.59.38:2550"]

  roles = ["member-1"]

}

   extensions = ["akka.persistence.ignite.extension.IgniteExtensionProvider"]


akka.persistence.journal.plugin = "akka.persistence.journal.ignite"
akka.persistence.snapshot-store.plugin = "akka.persistence.snapshot.ignite"

  persistence {
    # Ignite journal plugin
    journal {
      ignite {
        # Class name of the plugin
    class = "akka.persistence.ignite.journal.IgniteWriteJournal"
    cache-prefix = "akka-journal"
    // Should be based into the the dara grid topology
    cache-backups = 1
     // if ignite is already started in a separate standalone grid where journal cache is already created
    cachesAlreadyCreated = false
  }
}

# Ignite snapshot plugin
snapshot {
  ignite {
    # Class name of the plugin
    class = "akka.persistence.ignite.snapshot.IgniteSnapshotStore"
    cache-prefix = "akka-snapshot"
    // Should be based into the the dara grid topology
    cache-backups = 1
    // if ignite is already started in a separate standalone grid where snapshot cache is already created
    cachesAlreadyCreated = false
  }
    }
  }

  }
ignite {
  //to start client or server node to connect to Ignite data cluster 
  isClientNode = false
  // for ONLY testing we use localhost
   // used for grid cluster connectivity
      tcpDiscoveryAddresses = "localhost"
  metricsLogFrequency = 0
  // thread pools used by Ignite , should based into target machine specs
  queryThreadPoolSize = 4
  dataStreamerThreadPoolSize = 1
  managementThreadPoolSize = 2
  publicThreadPoolSize = 4
  systemThreadPoolSize = 2
  rebalanceThreadPoolSize = 1
  asyncCallbackPoolSize = 4
  peerClassLoadingEnabled = false
  // to enable or disable durable memory persistance
  enableFilePersistence = true
  // used for grid cluster connectivity, change it to suit your configuration 
  igniteConnectorPort = 11211
  // used for grid cluster connectivity , change it to suit your configuration 
  igniteServerPortRange = "47500..47509"
      //durable memory persistance storage file system path , change it to suit your     configuration 
    ignitePersistenceFilePath = "./data"
    }

    }
4

1 回答 1

1

我假设你修改了配置/initial/akka.conf。首先,这些部分需要位于 odl-cluster-data 部分中(不能仅从您的代码段中看出)。此外,它看起来应该是:

akka.persistence.journal.plugin = "akka.persistence.journal.ignite"
akka.persistence.snapshot-store.plugin = "akka.persistence.snapshot.ignite"
于 2018-06-20T13:39:32.550 回答