Skip to content

Commit 2b1ea4f

Browse files
committed
debug
1 parent c9995be commit 2b1ea4f

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

config/checkstyle/checkstyle.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
<property name="severity" value="error"/>
99

1010
<module name="TreeWalker">
11-
<module name="Regexp">
12-
<property name="format" value="System\.(out|err)\.print(ln)?"/>
13-
<property name="message" value="Use logging framework instead of System.out.println"/>
14-
<property name="illegalPattern" value="true"/>
15-
</module>
11+
<!-- <module name="Regexp">-->
12+
<!-- <property name="format" value="System\.(out|err)\.print(ln)?"/>-->
13+
<!-- <property name="message" value="Use logging framework instead of System.out.println"/>-->
14+
<!-- <property name="illegalPattern" value="true"/>-->
15+
<!-- </module>-->
1616

1717
<!-- 其他规则 -->
1818
<module name="UnusedImports"/>
1919
<module name="RedundantImport"/>
2020
<module name="IllegalImport"/>
2121
</module>
22-
</module>
22+
</module>

databend-jdbc/src/main/java/com/databend/jdbc/DatabendClientLoadBalancingPolicy.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ protected URI pickUri(String query_id, DatabendNodes nodes) {
2727
// Use the deterministic value to select a URI
2828
int index = Math.abs(deterministicValue) % uris.size();
2929

30+
System.out.println("rand uri:" + index);
3031
return uris.get(index);
3132
}
3233

@@ -45,9 +46,10 @@ protected URI pickUri(String query_id, DatabendNodes nodes) {
4546
return null;
4647
}
4748

48-
// Use round robin to select a URI
49+
// Use round-robin to select a URI
4950
int index = nodes.index.getAndUpdate(v -> v + 1 >= uris.size() ? 0 : v + 1);
5051

52+
System.out.println("rr get uri " + index + uris.get(index));
5153
return uris.get(index);
5254
}
5355

databend-jdbc/src/test/java/com/databend/jdbc/TestMultiHost.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ public void testAutoDiscovery()
218218
} else {
219219
unknown++;
220220
}
221+
System.out.println(i + "," + j + "" + p);
221222
}
222223
}
223224
}

0 commit comments

Comments
 (0)