All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hydra.cluster.test.InstanceSericeTest.scala Maven / Gradle / Ivy

package hydra.cluster.test

import akka.actor.Address
import hydra.cluster.app.SimpleClusterApp
import hydra.cluster.constent.HydraConfig
import hydra.cluster.deploy.DeployService
import hydra.cluster.deploy.DeployService.DeployedMsg

/**
  * For hydra-cluster-scala
  * Created by TaoZhou([email protected]) on 25/10/2017. 
  */
object InstanceSericeTest {
  def main(args: Array[String]): Unit = {
    val config = HydraConfig.load()
    val systemname =config.getString("hydra.clustername")
    if (args.isEmpty) {
      val systems = SimpleClusterApp.startup(Seq("2551", "2552", "0"))
      val address = Address("akka.tcp", systemname, "127.0.0.1", 2551)
      val actorRef = DeployService.tryToInstanceDeployActor("hydra.cluster.deploy.DeployService", address, systems(0), "aa")
      actorRef.map {
        actorref => actorref ! DeployedMsg(address, "CCCCCC")
      }
    }
    else
      SimpleClusterApp.startup(args)
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy