GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #21 from uavorg/master · windgoogle/uavstack@43919ad

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • com.creditease.uav.agent.buildComponent/bin
    • run4docker.sh
    • run4k8s.sh
    • start_ma_pro_docker.sh
    • start_ma_pro_k8s.sh
    • start_ma_test_docker.sh
    • start_ma_test_k8s.sh
  • com.creditease.uav.base/src/main/java/com/creditease/agent
    • SystemStarter.java
  • com.creditease.uav.cache.redis
    • pom.xml
    • src/main/java/com/creditease/uav/cache
      • api
        • CacheManager.java
      • redis
        • LettuceAsyncService.java
        • api
          • CacheFactory.java
  • com.creditease.uav.console/src/main/webapp
    • apphub/js/common
      • helper.js
    • uavapp_godeye/appmonitor/js
      • uav.log.js
  • com.creditease.uav.healthmanager/src/main/java/com/creditease/uav/feature
    • healthmanager/datastore/adaptors
      • NodeInfoDataAdapter.java
    • runtimenotify
      • StrategyJudgement.java
      • scheduler
        • NodeInfoWatcher.java
        • RuntimeNotifyStrategyMgr.java
  • com.creditease.uav.helper/src/main/java/com/creditease/agent/helpers
    • JVMToolHelper.java
  • com.creditease.uav.monitorframework.apm/src/main/java/com/creditease/uav/apm
    • RewriteIvcOutputStream.java
    • invokechain/span
      • SpanFactory.java
  • com.creditease.uav.monitorframework/src/main/java/com/creditease/uav/util
    • TransformWrapperUtil.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎com.creditease.uav.agent.buildComponent/bin/run4docker.sh‎

Copy file name to clipboardExpand all lines: com.creditease.uav.agent.buildComponent/bin/run4docker.sh
-57Lines changed: 0 additions & 57 deletions
This file was deleted.
Collapse file

‎com.creditease.uav.agent.buildComponent/bin/run4k8s.sh‎

Copy file name to clipboardExpand all lines: com.creditease.uav.agent.buildComponent/bin/run4k8s.sh
-52Lines changed: 0 additions & 52 deletions
This file was deleted.
Collapse file

‎com.creditease.uav.agent.buildComponent/bin/start_ma_pro_docker.sh‎

Copy file name to clipboardExpand all lines: com.creditease.uav.agent.buildComponent/bin/start_ma_pro_docker.sh
-4Lines changed: 0 additions & 4 deletions
This file was deleted.
Collapse file

‎com.creditease.uav.agent.buildComponent/bin/start_ma_pro_k8s.sh‎

Copy file name to clipboardExpand all lines: com.creditease.uav.agent.buildComponent/bin/start_ma_pro_k8s.sh
-5Lines changed: 0 additions & 5 deletions
This file was deleted.
Collapse file

‎com.creditease.uav.agent.buildComponent/bin/start_ma_test_docker.sh‎

Copy file name to clipboardExpand all lines: com.creditease.uav.agent.buildComponent/bin/start_ma_test_docker.sh
-5Lines changed: 0 additions & 5 deletions
This file was deleted.
Collapse file

‎com.creditease.uav.agent.buildComponent/bin/start_ma_test_k8s.sh‎

Copy file name to clipboardExpand all lines: com.creditease.uav.agent.buildComponent/bin/start_ma_test_k8s.sh
-5Lines changed: 0 additions & 5 deletions
This file was deleted.
Collapse file

‎com.creditease.uav.base/src/main/java/com/creditease/agent/SystemStarter.java‎

Copy file name to clipboardExpand all lines: com.creditease.uav.base/src/main/java/com/creditease/agent/SystemStarter.java
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,15 @@ private void checkNetworkReady() {
197197

198198
isReady = true;
199199

200-
StringBuffer ipmsg = new StringBuffer("List NetCardIndex and IP Address:");
200+
StringBuffer ipmsg = new StringBuffer("List NetCardIndex NetCardName and IP Address:");
201201

202202
int index = 0;
203203

204204
for (InetAddress addr : NetworkHelper.getAllIP()) {
205205

206-
ipmsg.append("\n").append(index++).append(" ----- ").append(addr.getHostAddress());
206+
String ip = addr.getHostAddress();
207+
208+
ipmsg.append("\n").append(index++).append(" ----- ").append(NetworkHelper.getNetCardName(ip)).append(" ----- ").append(ip);
207209
}
208210

209211
log.info(this, ipmsg.toString());
Collapse file

‎com.creditease.uav.cache.redis/pom.xml‎

Copy file name to clipboardExpand all lines: com.creditease.uav.cache.redis/pom.xml
+37-1Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,42 @@
3737
<groupId>commons-logging</groupId>
3838
<artifactId>commons-logging</artifactId>
3939
<version>1.2</version>
40-
</dependency>
40+
</dependency>
41+
<dependency>
42+
<groupId>io.netty</groupId>
43+
<artifactId>netty-all</artifactId>
44+
<version>4.1.11.Final</version>
45+
</dependency>
46+
<dependency>
47+
<groupId>io.lettuce</groupId>
48+
<artifactId>lettuce-core</artifactId>
49+
<version>5.0.5.RELEASE</version>
50+
<exclusions>
51+
<exclusion>
52+
<groupId>io.netty</groupId>
53+
<artifactId>netty-common</artifactId>
54+
</exclusion>
55+
<exclusion>
56+
<groupId>io.netty</groupId>
57+
<artifactId>netty-transport</artifactId>
58+
</exclusion>
59+
<exclusion>
60+
<groupId>io.netty</groupId>
61+
<artifactId>netty-buffer</artifactId>
62+
</exclusion>
63+
<exclusion>
64+
<groupId>io.netty</groupId>
65+
<artifactId>netty-resolver</artifactId>
66+
</exclusion>
67+
<exclusion>
68+
<groupId>io.netty</groupId>
69+
<artifactId>netty-handler</artifactId>
70+
</exclusion>
71+
<exclusion>
72+
<groupId>io.netty</groupId>
73+
<artifactId>netty-codec</artifactId>
74+
</exclusion>
75+
</exclusions>
76+
</dependency>
4177
</dependencies>
4278
</project>
Collapse file

‎com.creditease.uav.cache.redis/src/main/java/com/creditease/uav/cache/api/CacheManager.java‎

Copy file name to clipboardExpand all lines: com.creditease.uav.cache.redis/src/main/java/com/creditease/uav/cache/api/CacheManager.java
+47-13Lines changed: 47 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,20 @@ public static void build(String cacheServerAddress, int minConcurrent, int maxCo
430430
private CacheService service;
431431

432432
private L1Cache l1cache;
433-
433+
434+
private static CacheClientMode clientMode;
435+
434436
protected CacheManager(String cacheServerAddress, int minConcurrent, int maxConcurrent, int queueSize,
435437
String password) {
436-
service = CacheFactory.instance().createCacheService(CacheClientMode.AREDIS, cacheServerAddress, minConcurrent,
438+
439+
if (cacheServerAddress.contains(",")) {
440+
clientMode = CacheClientMode.LETTUCE;
441+
}
442+
else {
443+
clientMode = CacheClientMode.AREDIS;
444+
}
445+
446+
service = CacheFactory.instance().createCacheService(clientMode, cacheServerAddress, minConcurrent,
437447
maxConcurrent, queueSize, password);
438448
l1cache = new L1Cache();
439449
}
@@ -1239,7 +1249,8 @@ public void putHash(String region, String key, Map<String, String> fieldValues,
12391249
* @param fieldNames
12401250
* @return
12411251
*/
1242-
public Map<String, String> getHash(String region, String key, String... fieldNames) {
1252+
@SuppressWarnings("unchecked")
1253+
public Map<String, String> getHash(String region, String key, String... fieldNames) {
12431254

12441255
if (null == fieldNames) {
12451256
Collections.emptyMap();
@@ -1253,8 +1264,13 @@ public Map<String, String> getHash(String region, String key, String... fieldNam
12531264

12541265
if (null != results && results.length > 0) {
12551266

1256-
Map<String, String> value = genHMGetResults(fieldNames, results);
1257-
1267+
Map<String, String> value = new HashMap<String, String>();
1268+
if (clientMode.equals(CacheClientMode.LETTUCE) && results[0] instanceof Map) {
1269+
value = (Map<String, String>) results[0];
1270+
}
1271+
else {
1272+
value = genHMGetResults(fieldNames, results);
1273+
}
12581274
return value;
12591275
}
12601276

@@ -1321,8 +1337,13 @@ public Map<String, String> getHashAll(String region, String key) {
13211337

13221338
if (null != results && results.length > 0) {
13231339

1324-
Map<String, String> value = genHMGetResults(null, results);
1325-
1340+
Map<String, String> value = new HashMap<String, String>();
1341+
if (clientMode.equals(CacheClientMode.LETTUCE) && results[0] instanceof Map) {
1342+
value = (Map<String, String>) results[0];
1343+
}
1344+
else {
1345+
value = genHMGetResults(null, results);
1346+
}
13261347
this.l1cache.put(rkey, value);
13271348

13281349
return value;
@@ -1362,7 +1383,14 @@ public void getHashAll(String region, String key, AsyncCacheCallback<Map<String,
13621383
public void process(CommandInfo[] command, Object[] result, Throwable throwable) {
13631384

13641385
if (fcallback != null && null != result && result.length > 0) {
1365-
Map<String, String> mresult = genHMGetResults(null, result);
1386+
Map<String, String> mresult = new HashMap<String, String>();
1387+
1388+
if (clientMode.equals(CacheClientMode.LETTUCE) && result[0] instanceof Map) {
1389+
mresult = (Map<String, String>) result[0];
1390+
}
1391+
else {
1392+
mresult = genHMGetResults(null, result);
1393+
}
13661394

13671395
/**
13681396
* get hash all是可以放L1Cache
@@ -1403,12 +1431,18 @@ public void getHash(String region, String key, AsyncCacheCallback<Map<String, St
14031431

14041432
doCacheCommand(ci, new AbstractAsyncHandler<CommandInfo>() {
14051433

1406-
@Override
1434+
@SuppressWarnings("unchecked")
1435+
@Override
14071436
public void process(CommandInfo[] command, Object[] result, Throwable throwable) {
14081437

1409-
if (fcallback != null && null != result && result.length > 0) {
1410-
Map<String, String> mresult = genHMGetResults(ffieldname, result);
1411-
1438+
if (fcallback != null && null != result && result.length > 0) {
1439+
Map<String, String> mresult = new HashMap<String, String>();
1440+
if (clientMode.equals(CacheClientMode.LETTUCE) && result[0] instanceof Map) {
1441+
mresult = (Map<String, String>) result[0];
1442+
}
1443+
else {
1444+
mresult = genHMGetResults(ffieldname, result);
1445+
}
14121446
fcallback.onResult(mresult);
14131447
}
14141448
}
@@ -1795,7 +1829,7 @@ public List lrange(String region, String key, int start, int end) {
17951829
Object[] results = service.submitCommands(
17961830
new CommandInfo(CommandInfo.RedisCommand.LRANGE, rkey, String.valueOf(start), String.valueOf(end)));
17971831

1798-
if (null != results && results.length > 0) {
1832+
if (null != results && results.length > 0 && results[0] != null) {
17991833

18001834
Object[] objs = (Object[]) results[0];
18011835

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.