@@ -146,19 +146,18 @@ private[thriftserver] trait ReflectedCompositeService { this: AbstractService =>
146146 service.start()
147147 serviceStartCount += 1
148148 }
149+ // Emulating `AbstractService.start`
150+ val startTime = new java.lang.Long (System .currentTimeMillis())
151+ setAncestorField(this , 3 , " startTime" , startTime)
152+ invoke(classOf [AbstractService ], this , " ensureCurrentState" , classOf [STATE ] -> STATE .INITED )
153+ invoke(classOf [AbstractService ], this , " changeState" , classOf [STATE ] -> STATE .STARTED )
154+ logInfo(s " Service: $getName is started. " )
149155 } catch {
150156 case NonFatal (e) =>
151157 logError(s " Error starting services $getName" , e)
152158 invoke(classOf [CompositeService ], this , " stop" ,
153159 classOf [Int ] -> new Integer (serviceStartCount))
154160 throw new ServiceException (" Failed to Start " + getName, e)
155161 }
156-
157- // Emulating `AbstractService.start`
158- val startTime = new java.lang.Long (System .currentTimeMillis())
159- setAncestorField(this , 3 , " startTime" , startTime)
160- invoke(classOf [AbstractService ], this , " ensureCurrentState" , classOf [STATE ] -> STATE .INITED )
161- invoke(classOf [AbstractService ], this , " changeState" , classOf [STATE ] -> STATE .STARTED )
162- logInfo(s " Service: $getName is started. " )
163162 }
164163}
0 commit comments