All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.huawei.opengauss.jdbc.QueryCNListUtils.class Maven / Gradle / Ivy

The newest version!
????4?*com/huawei/opengauss/jdbc/QueryCNListUtilsjava/lang/ObjectQueryCNListUtils.java1com/huawei/opengauss/jdbc/QueryCNListUtils$CNListCNList
clusterCNListLjava/util/Map;VLjava/util/Map;firstConnectMap6Ljava/util/Map;LOGGER#Lcom/huawei/opengauss/jdbc/log/Log;()V
this,Lcom/huawei/opengauss/jdbc/QueryCNListUtils;	setLOGGER$com/huawei/opengauss/jdbc/log/LoggerisUsingJDKLogger()Z
java/lang/ClassgetName()Ljava/lang/String; 
!	getLogger7(Ljava/lang/String;)Lcom/huawei/opengauss/jdbc/log/Log;#$
%	'	getCNListU(Ljava/lang/String;Ljava/util/Properties;Z)[Lcom/huawei/opengauss/jdbc/util/HostSpec;java/lang/InterruptedException+java/lang/String-java/util/Properties/	
	1
java/util/Map3get&(Ljava/lang/Object;)Ljava/lang/Object;5647list*[Lcom/huawei/opengauss/jdbc/util/HostSpec;9:	;java/lang/Throwable=java/lang/Thread?sleep(J)VAB
@CeInterruptedException. This caused by: "Thread.sleep", waiting for refreshing CN List from connection.E!com/huawei/opengauss/jdbc/log/LogGinfo(Ljava/lang/Object;)VIJHK6Blocking time exceeds 2 seconds need to pay attention.M com/huawei/opengauss/jdbc/DriverOGetHostSpecsB(Ljava/util/Properties;)[Lcom/huawei/opengauss/jdbc/util/HostSpec;QR
PScoordinationNodeList3Lcom/huawei/opengauss/jdbc/QueryCNListUtils$CNList;e Ljava/lang/InterruptedException;iIkeyLjava/lang/String;
propertiesLjava/util/Properties;blockZintervalWaitHasRefreshedCNListtimesWaitHasRefreshedCNList
keyFromURL*(Ljava/util/Properties;)Ljava/lang/String;getURLHostSpecseR
Pfjava/util/Arrayshsort([Ljava/lang/Object;)Vjk
iltoString'([Ljava/lang/Object;)Ljava/lang/String;no
ipprops	hostSpecsrefreshProperties(Ljava/util/Properties;)V
vcd
x
	zjava/lang/Boolean|valueOf(Z)Ljava/lang/Boolean;~
}?getOrDefault8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;??4?booleanValue?
}?put??4?)*
?:java/lang/StringBuilder?
?J[AUTOBALANCE] The cluster obtains CNList from the user thread. | Cluster: ?append-(Ljava/lang/String;)Ljava/lang/StringBuilder;??
?? | CNList: ?n 
??'com/huawei/opengauss/jdbc/util/HostSpec?getHost? 
??(C)Ljava/lang/StringBuilder;??
??getPort()I??
??(I)Ljava/lang/String;~?
.?PGHOST?length??
??	substring(II)Ljava/lang/String;??
??setProperty8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;??
0?PGPORT?coordinatorNode)Lcom/huawei/opengauss/jdbc/util/HostSpec;coordinatorNodeListhostsLjava/lang/StringBuilder;portsgetTimeToRefrshCNList(Ljava/util/Properties;)JrefreshCNIpListTime?10?getProperty8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;??
0?[0-9]+?java/util/regex/Pattern?compile-(Ljava/lang/String;)Ljava/util/regex/Pattern;??
??matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;??
??java/util/regex/Matcher?matches?
??0?
startsWith(Ljava/lang/String;)Z??
.?
.?java/lang/Integer?parseInt(Ljava/lang/String;)I??
???'patternLjava/util/regex/Pattern;
isConnectToDN(Ljava/util/Properties;)Z$com/huawei/opengauss/jdbc/PGProperty?
CONNECT_TO_DN&Lcom/huawei/opengauss/jdbc/PGProperty;??	??
getBoolean??
??runRereshCNListQueryiesG(Lcom/huawei/opengauss/jdbc/core/QueryExecutor;Ljava/util/Properties;)Vjava/sql/SQLException?java/io/IOException?java/lang/System?currentTimeMillis()J
??
-([Lcom/huawei/opengauss/jdbc/util/HostSpec;)V
,com/huawei/opengauss/jdbc/core/QueryExecutor
lastUpdatedJ
	java/util/ArrayList
	USING_EIP?	???
?select node_host1,node_port1 from pgxc_node where (node_type='D' or node_type='S') and node_name='dn_6001_6002_6003' and nodeis_active = true order by node_host1;mselect node_host1,node_port1 from pgxc_node where node_type='C' and nodeis_active = true order by node_host1;?select node_host,node_port from pgxc_node where (node_type='D' or node_type='S') and node_name='dn_6001_6002_6003' and nodeis_active = true order by node_host;jselect node_host,node_port from pgxc_node where node_type='C' and nodeis_active = true order by node_host;isTraceEnabled H!connectToDN = #(Z)Ljava/lang/StringBuilder;?%
?&
; query = (trace*JH+/com/huawei/opengauss/jdbc/core/SetupQueryRunner-
runForListS(Lcom/huawei/opengauss/jdbc/core/QueryExecutor;Ljava/lang/String;Z)Ljava/util/List;/0
.1java/util/List3iterator()Ljava/util/Iterator;5647java/util/Iterator9hasNext;:<next()Ljava/lang/Object;>?:@[[BBgetEncoding+()Lcom/huawei/opengauss/jdbc/core/Encoding;DEF'com/huawei/opengauss/jdbc/core/EncodingHdecode([B)Ljava/lang/String;JK
IL(Ljava/lang/String;I)VN
?Oadd(Ljava/lang/Object;)ZQR
S6[AUTOBALANCE] Try to refreshing CN list, the cluster: U-(Ljava/lang/Object;)Ljava/lang/StringBuilder;?W
?X
 connect To: ZgetHostSpec+()Lcom/huawei/opengauss/jdbc/util/HostSpec;\]^toArray(([Ljava/lang/Object;)[Ljava/lang/Object;`a
b3[AUTOBALANCE] For refreshing CN list, the cluster: d???????cnListcheckLatestUpdatequeryhostportresult
queryExecutor.Lcom/huawei/opengauss/jdbc/core/QueryExecutor;clusterlatestAllowedUpdatecnListRefreshed@Ljava/util/ArrayList;Ljava/util/ArrayList;usingEipLjava/lang/Boolean;resultsLjava/util/List<[[B>;Ljava/util/List;java/util/HashMap{
|&java/util/concurrent/ConcurrentHashMap~
	SignatureCodeLocalVariableTableLineNumberTable
StackMapTableLocalVariableTypeTable
Exceptions
SourceFileInnerClasses!
	
?

?

	?/*????
?;???"?&?(??#$&?
)*??	
>?66?]?2Y:²2*?8?:???a	?.0?1.0?.0>?.0G,?
	cd?J*?gL+?m+?q??r^	s:?HI	J	tu?&
?w*?yL?{YN²{+?????}??=?{+????W-ç
:-??+*??N-????(??Y?????+?????-?q?????L??Y??:??Y??:-:?66?M2:	??Y??	????,??????W??Y??	??????,??????W????*???d????W*???d????W?25595?R"_`?=??	r^?[\<?_`C??:y????????VTUXY"Z0[<]C^H_Ibbdkbpgyh?i?j?k?i?m?no?I?50.>?0.???C	0.?????P
????=*?Ŷ?L˸?M+?),+?նڙ+ܶ??+???
+???i??? =r^	4?\.???r	su!v/w9y??9.?
???2??*????r^?~	???R?+?yM?+?eB?2Y:²2,?8?:??Y?	:?2,??W?!??ñ???7ç:	?	??Y?:?+????:		???+??:
?:
?+??:
?:
?(?"?-?(??Y??$??+??')??
?????,*
?2:?8:?=?D?A?C:
*?G
2?M:*?G
2?M:??Y??P?TW????(??Y??V???Y[??*?_?Y???L?2Y:????ñ???c???hV[i
?j\
?j\
?j\
#k\,l\2mB
?no?I^?p\?q
i?hVi?i
rzrt~nuv	?;j\
??wy?rzrs??wx??(????#?(?2?>?L?T?[?i?r?~???????????????????????,?@?C?_?j?o?v??????????????????>0.
?0.>?0.?+}?.4?4:?J?A?Q?0.}.4H>????z?@ ?|Y?}?2?Y???{?"?&?(??
??





© 2015 - 2024 Weber Informatics LLC | Privacy Policy