Github user xubo245 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2256#discussion_r186953529
  
    --- Diff: store/search/src/main/scala/org/apache/spark/rpc/Master.scala ---
    @@ -64,22 +64,39 @@ class Master(sparkConf: SparkConf, port: Int) {
     
       private val scheduler: Scheduler = new Scheduler
     
    -  def this(sparkConf: SparkConf) = {
    -    this(sparkConf, CarbonProperties.getSearchMasterPort)
    -  }
    -
       /** start service and listen on port passed in constructor */
       def startService(): Unit = {
         if (rpcEnv == null) {
           new Thread(new Runnable {
             override def run(): Unit = {
               val hostAddress = InetAddress.getLocalHost.getHostAddress
    -          val config = RpcEnvConfig(
    -            sparkConf, "registry-service", hostAddress, "", 
CarbonProperties.getSearchMasterPort,
    -            new SecurityManager(sparkConf), clientMode = false)
    -          rpcEnv = new NettyRpcEnvFactory().create(config)
    +          var port = CarbonProperties.getSearchMasterPort
    --- End diff --
    
    It's better to ensure there are no intersection between master port and 
worker port, for example. the default master and worker port is 10100, 10200,  
not 10020,10021. Because if master use 10020 fail, master will use 10021, and 
the worker will failed to use 10021.


---

Reply via email to