You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/10/04 22:46:44 UTC

[GitHub] tysonnorris commented on a change in pull request #2833: MesosContainerFactory

tysonnorris commented on a change in pull request #2833: MesosContainerFactory
URL: https://github.com/apache/incubator-openwhisk/pull/2833#discussion_r142812631
 
 

 ##########
 File path: common/scala/src/main/scala/whisk/core/mesos/MesosContainerFactory.scala
 ##########
 @@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package whisk.core.mesos
+
+import akka.actor.ActorSystem
+import akka.pattern.ask
+import com.adobe.api.platform.runtime.mesos.MesosClient
+import com.adobe.api.platform.runtime.mesos.Subscribe
+import com.adobe.api.platform.runtime.mesos.SubscribeComplete
+import com.adobe.api.platform.runtime.mesos.Teardown
+import scala.concurrent.Await
+import scala.concurrent.ExecutionContext
+import scala.concurrent.Future
+import scala.concurrent.duration._
+import whisk.common.Logging
+import whisk.common.TransactionId
+import whisk.core.WhiskConfig
+import whisk.core.containerpool.Container
+import whisk.core.containerpool.ContainerFactory
+import whisk.core.containerpool.ContainerFactoryProvider
+import whisk.core.entity.ByteSize
+import whisk.core.entity.ExecManifest
+import whisk.core.entity.InstanceId
+import whisk.core.entity.UUID
+
+class MesosContainerFactory(config: WhiskConfig,
+                            actorSystem: ActorSystem,
+                            logging: Logging,
+                            parameters: Map[String, Set[String]])
+    extends ContainerFactory {
+
+  val subscribeTimeout = 30.seconds
+
+  //init mesos framework:
+  implicit val as: ActorSystem = actorSystem
+  implicit val ec: ExecutionContext = actorSystem.dispatcher
+
+  val akkaConfig = actorSystem.settings.config
+  //mesos master url to subscribe the framework to
+  val mesosMaster = akkaConfig.getString("whisk.mesos.master-url")
+  //public mesos url where developers can browse logs (till there is way to delegate log retrieval to an external system)
+  val mesosMasterPublic = akkaConfig.getString("whisk.mesos.master-url-public")
 
 Review comment:
   Yes, since there is not yet any external log store possible, it shows them a link to the mesos ui. 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services