Skip to content

Commit

Permalink
Merge pull request #3 from uavorg/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
zxy0728 authored Nov 17, 2017
2 parents cef50c0 + 14686bf commit cb4737c
Show file tree
Hide file tree
Showing 19 changed files with 956 additions and 1,008 deletions.
37 changes: 17 additions & 20 deletions com.creditease.uav.console.buildComponent/config/web_pro.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<servlet-class>com.creditease.uav.apphub.core.AppHubRestServlet</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>com.creditease.uav.apphub.rest,com.creditease.uav.godeye.rest,com.creditease.uav.manage.rest,com.creditease.uav.appmongo.rest,com.creditease.uav.grafana</param-value>
<param-value>com.creditease.uav.apphub.rest,com.creditease.uav.godeye.rest,com.creditease.uav.manage.rest,com.creditease.uav.appmongo.rest,com.creditease.uav.grafana,com.creditease.uav.opentsdb</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
Expand All @@ -41,17 +41,6 @@
<servlet-name>es-serlvet</servlet-name>
<url-pattern>/es/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>opentsdb-crdu-servlet</servlet-name>
<servlet-class>com.creditease.uav.opentsdb.OpenTSDBRestCRDUServlet</servlet-class>
<load-on-startup>2</load-on-startup>
<async-supported>true</async-supported>
</servlet>

<servlet-mapping>
<servlet-name>opentsdb-crdu-servlet</servlet-name>
<url-pattern>/db/*</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>opentsdb-agent-servlet</servlet-name>
Expand Down Expand Up @@ -130,6 +119,10 @@
<param-name>uav.app.godeye.redis.store.addr</param-name>
<param-value>127.0.0.1:26379</param-value>
</context-param>
<context-param>
<param-name>uav.app.opentsdb.redis.store.addr</param-name>
<param-value>127.0.0.1:26379</param-value>
</context-param>
<context-param>
<param-name>uav.app.gui.redis.store.params</param-name>
<param-value>{"min":50,"max":300,"queue":10}</param-value>
Expand All @@ -146,6 +139,14 @@
<param-name>uav.app.godeye.redis.store.params</param-name>
<param-value>{"min":30,"max":100,"queue":5,"cacheaccess":5}</param-value>
</context-param>
<context-param>
<param-name>uav.app.opentsdb.redis.store.params</param-name>
<param-value>{"min":30,"max":100,"queue":5,"cacheaccess":5}</param-value>
</context-param>
<context-param>
<param-name>uav.app.opentsdb.http.client.params</param-name>
<param-value>{"max.con":50,"max.tot.con":200,"sock.time.out":10000,"con.time.out":10000,"req.time.out":10000}</param-value>
</context-param>
<context-param>
<param-name>uav.app.gui.http.client.params</param-name>
<param-value>{"max.con":5,"max.tot.con":20,"sock.time.out":10000,"con.time.out":10000,"req.time.out":10000}</param-value>
Expand Down Expand Up @@ -178,19 +179,19 @@
<param-name>@url:uav.app.godeye.notify.view.http.addr</param-name>
<param-value>http://127.0.0.1:9011,http://127.0.0.1:9011</param-value>
</context-param>
<context-param>
<context-param>
<param-name>@url:uav.app.godeye.notify.strategy.http.addr</param-name>
<param-value>http://127.0.0.1:9004,http://127.0.0.1:9004</param-value>
</context-param>
<context-param>
<param-name>@url:uav.app.manage.apphubmanager.http.addr</param-name>
<param-value>http://127.0.0.1:8031,http://127.0.0.1:8031</param-value>
</context-param>
<context-param>
<context-param>
<param-name>@url:uav.app.upgrade.server.http.addr</param-name>
<param-value>http://127.0.0.1:8888</param-value>
</context-param>
<context-param>
<context-param>
<param-name>@url:uav.app.apm.ivc.http.addr</param-name>
<param-value>http://127.0.0.1:7799,http://127.0.0.1:7799</param-value>
</context-param>
Expand Down Expand Up @@ -222,7 +223,7 @@
<param-name>uav.apphub.sso.guest.password</param-name>
<param-value>guestAbc23781ADSKHbnwe</param-value>
</context-param>
<context-param>
<context-param>
<param-name>uav.apphub.sso.implclass</param-name>
<param-value>com.creditease.uav.apphub.sso.GUISSOLdapClient</param-value>
</context-param>
Expand All @@ -234,10 +235,6 @@
<param-name>uav.apphub.sso.grafana.connection.info</param-name>
<param-value>{"api.url":"http://127.0.0.1:3000","web.url":"http://uav.creditease.corp/datacenter","datasource.opentsdb.url":"http://127.0.0.1:4242","datasource.elasticsearch.url":"http://127.0.0.1:9300","authorization.loginId":"apiuser","authorization.loginPwd":"Uav!630admin","authorization.register.defPwd":"1q@W3e","authorization.register.sleep.time":"2000"}</param-value>
</context-param>
<context-param>
<param-name>uav.app.opentsdb.http.client.params</param-name>
<param-value>{"max.con":50,"max.tot.con":200,"sock.time.out":10000,"con.time.out":10000,"req.time.out":10000}</param-value>
</context-param>
<context-param>
<param-name>uav.apphub.sso.white.list</param-name>
<!--
Expand Down
30 changes: 14 additions & 16 deletions com.creditease.uav.console.buildComponent/config/web_test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<servlet-class>com.creditease.uav.apphub.core.AppHubRestServlet</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>com.creditease.uav.apphub.rest,com.creditease.uav.godeye.rest,com.creditease.uav.manage.rest,com.creditease.uav.appmongo.rest,com.creditease.uav.grafana</param-value>
<param-value>com.creditease.uav.apphub.rest,com.creditease.uav.godeye.rest,com.creditease.uav.manage.rest,com.creditease.uav.appmongo.rest,com.creditease.uav.grafana,com.creditease.uav.opentsdb</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
Expand All @@ -41,17 +41,6 @@
<servlet-name>es-serlvet</servlet-name>
<url-pattern>/es/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>opentsdb-crdu-servlet</servlet-name>
<servlet-class>com.creditease.uav.opentsdb.OpenTSDBRestCRDUServlet</servlet-class>
<load-on-startup>2</load-on-startup>
<async-supported>true</async-supported>
</servlet>

<servlet-mapping>
<servlet-name>opentsdb-crdu-servlet</servlet-name>
<url-pattern>/db/*</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>opentsdb-agent-servlet</servlet-name>
Expand Down Expand Up @@ -130,6 +119,10 @@
<param-name>uav.app.godeye.redis.store.addr</param-name>
<param-value>127.0.0.1:6379</param-value>
</context-param>
<context-param>
<param-name>uav.app.opentsdb.redis.store.addr</param-name>
<param-value>127.0.0.1:6379</param-value>
</context-param>
<context-param>
<param-name>uav.app.gui.redis.store.params</param-name>
<param-value>{"min":50,"max":300,"queue":10,"pwd":"Uav!1227Admin"}</param-value>
Expand All @@ -146,6 +139,14 @@
<param-name>uav.app.godeye.redis.store.params</param-name>
<param-value>{"min":30,"max":100,"queue":5,"cacheaccess":5,"pwd":"Uav!1227Admin"}</param-value>
</context-param>
<context-param>
<param-name>uav.app.opentsdb.redis.store.params</param-name>
<param-value>{"min":30,"max":100,"queue":5,"cacheaccess":5,"pwd":"Uav!1227Admin"}</param-value>
</context-param>
<context-param>
<param-name>uav.app.opentsdb.http.client.params</param-name>
<param-value>{"max.con":50,"max.tot.con":200,"sock.time.out":10000,"con.time.out":10000,"req.time.out":10000}</param-value>
</context-param>
<context-param>
<param-name>uav.app.gui.http.client.params</param-name>
<param-value>{"max.con":5,"max.tot.con":20,"sock.time.out":10000,"con.time.out":10000,"req.time.out":10000}</param-value>
Expand All @@ -166,6 +167,7 @@
<param-name>uav.app.es.http.client.params</param-name>
<param-value>{"max.con":50,"max.tot.con":200,"sock.time.out":10000,"con.time.out":10000,"req.time.out":10000}</param-value>
</context-param>

<context-param>
<param-name>@url:uav.app.godeye.hbquery.http.addr</param-name>
<param-value>http://127.0.0.1:8020,http://127.0.0.1:8020</param-value>
Expand Down Expand Up @@ -238,10 +240,6 @@
<param-name>uav.apphub.sso.grafana.connection.info</param-name>
<param-value>{"api.url":"http://127.0.0.1:3000","web.url":"http://127.0.0.1:3000","datasource.opentsdb.url":"http://127.0.0.1:4243","datasource.elasticsearch.url":"http://127.0.0.1:9200","authorization.loginId":"apiuser","authorization.loginPwd":"apiuser","authorization.register.defPwd":"1q@W3e","authorization.register.sleep.time":"2000"}</param-value>
</context-param>
<context-param>
<param-name>uav.app.opentsdb.http.client.params</param-name>
<param-value>{"max.con":50,"max.tot.con":200,"sock.time.out":10000,"con.time.out":10000,"req.time.out":10000}</param-value>
</context-param>
<context-param>
<param-name>uav.apphub.sso.white.list</param-name>
<!--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*-
* <<
* UAVStack
* ==
* Copyright (C) 2016 - 2017 UAVStack
* ==
* Licensed 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 com.creditease.uav.opentsdb;

import java.io.IOException;
Expand Down Expand Up @@ -28,22 +48,15 @@ public class OpenTSDBRestAgentServlet extends HttpServlet {

private static final long serialVersionUID = 1441879223883391706L;

private static Map<String, String> info = null;

private static String url;

@SuppressWarnings("unchecked")
@Override
public void init() throws ServletException {

if (null == info) {
String esInfo = this.getInitParameter("db.info");
info = JSONHelper.toObject(esInfo, Map.class);
}

if (null == httpAsyncClient) {
Map<String, Integer> httpParamsMap = JSONHelper
.toObject(getServletContext().getInitParameter("uav.app.es.http.client.params"), Map.class);
.toObject(getServletContext().getInitParameter("uav.app.opentsdb.http.client.params"), Map.class);
httpAsyncClient = HttpAsyncClientFactory.build(httpParamsMap.get("max.con"),
httpParamsMap.get("max.tot.con"), httpParamsMap.get("sock.time.out"),
httpParamsMap.get("con.time.out"), httpParamsMap.get("req.time.out"));
Expand Down
Loading

0 comments on commit cb4737c

Please sign in to comment.