livy-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-livy] yiheng commented on a change in pull request #189: [LIVY-616] Livy Server discovery
Date Mon, 02 Sep 2019 09:10:52 GMT
yiheng commented on a change in pull request #189: [LIVY-616] Livy Server discovery
URL: https://github.com/apache/incubator-livy/pull/189#discussion_r319871211
 
 

 ##########
 File path: server/src/main/scala/org/apache/livy/server/discovery/LivyDiscoveryManager.scala
 ##########
 @@ -0,0 +1,65 @@
+/*
+ * 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 org.apache.livy.server.discovery
+
+import java.net.URI
+
+import org.apache.curator.framework.CuratorFramework
+
+import org.apache.livy.LivyConf
+
+/**
+  * Livy Server Discovery manager.
+  * Stores information about Livy Server location in ZooKeeper.
+  * The address will be stored in
+  * "/{@code LIVY_ZOOKEEPER_NAMESPACE}/{@code LIVY_SERVER_ZOOKEEPER_NAMESPACE}" znode
+  * By default, the full path to znode is /livy/server.uri.
+  * Need to set {@code livy.zookeeper.url} to be able to get information from ZooKeeper.
+  *
+  * @param livyConf - Livy configurations
+  * @param mockCuratorClient - used for testing
+  */
+class LivyDiscoveryManager(val livyConf: LivyConf,
 
 Review comment:
   Should we consider providing a generic method to publishing configuration key/value to
zookeeper?
   
   In some other scenario, e.g. this PR https://github.com/apache/incubator-livy/pull/193
, a bunch of hive related configurations need to be published. 
   
   If we have a generic method publish configuration key/value, it may be easier to let other
components to leverage the code.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Mime
View raw message