com.huawei.gauss200.jdbc.util.ServerlessRestClient.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of huaweicloud-dws-jdbc Show documentation
Show all versions of huaweicloud-dws-jdbc Show documentation
Data Warehouse Service JDBC driver
The newest version!
???? 4
? ? ? ?
? ? ? ? ? ?
^
?
?
-
?
?
!
" -#
$% ?&'( ?)*+
-,-. ? ?/01
23
456 7
$89:
4;
<= ?>?
@ ? ?
^A ? ?B ?CD
FEFG
HE
FH ?I ?J
^KL
OM ?N
OPQ
SR ?S
-T ?U ?VWX ?Y ?Z[ \\]^_
^
^` \a
?bcdefgh
ij
kl
km
?n
?Ao
F
pEp
sE
pq
prs
wE
wrtuv
{w
zxy
?
zz
{|
}8 client BLcom/huawei/shade/org/apache/http/impl/client/CloseableHttpClient; ERROR_MSG Ljava/lang/String;
ConstantValue TRACE_ID AVAILABLE ACTIVE ()V Code LineNumberTable LocalVariableTable this 4Lcom/huawei/gauss200/jdbc/util/ServerlessRestClient; startServerless (Ljava/util/Properties;)V jsonBody 2Lcom/huawei/shade/com/alibaba/fastjson/JSONObject; traceIds *[Lcom/huawei/shade/org/apache/http/Header; errorMsg reqPath endpoint projectId clusterId ak sk
jsonObject stringParam httpRequestBase ALcom/huawei/shade/org/apache/http/client/methods/HttpRequestBase;
sslContext Ljavax/net/ssl/SSLContext; sslSocketFactory FLcom/huawei/shade/org/apache/http/conn/ssl/SSLConnectionSocketFactory; response /Lcom/huawei/shade/org/apache/http/HttpResponse;
statusCode I responseBody e Ljava/lang/Exception; info Ljava/util/Properties; traceId
StackMapTable~?? ??
Exceptions checkClusterStatus (Ljava/util/Properties;)Z status createSignRequest ?(Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;Lcom/huawei/shade/com/cloud/sdk/http/HttpMethodName;)Lcom/huawei/shade/org/apache/http/client/methods/HttpRequestBase; bytes [B ins Ljava/io/InputStream; entry Entry InnerClasses Ljava/util/Map$Entry; jsonParam
httpMethod 4Lcom/huawei/shade/com/cloud/sdk/http/HttpMethodName;
regionName
securityToken url Ljava/net/URL; request (Lcom/huawei/shade/com/cloud/sdk/Request; signer 3Lcom/huawei/shade/com/cloud/sdk/auth/signer/Signer; requestHeaders Ljava/util/Map;
requestConfig >Lcom/huawei/shade/org/apache/http/client/config/RequestConfig; LocalVariableTypeTable ;Ljava/util/Map$Entry; 5Ljava/util/Map;????????
createRequest ?(Ljava/net/URL;Lcom/huawei/shade/org/apache/http/Header;Ljava/lang/String;Lcom/huawei/shade/com/cloud/sdk/http/HttpMethodName;)Lcom/huawei/shade/org/apache/http/client/methods/HttpRequestBase; httpPost :Lcom/huawei/shade/org/apache/http/client/methods/HttpPost; stringEntity 6Lcom/huawei/shade/org/apache/http/entity/StringEntity; header )Lcom/huawei/shade/org/apache/http/Header; param httpGet 9Lcom/huawei/shade/org/apache/http/client/methods/HttpGet; convertStreamToString )(Ljava/io/InputStream;)Ljava/lang/String; ioEX Ljava/io/IOException; is reader Ljava/io/BufferedReader; sb Ljava/lang/StringBuilder; line
SourceFile ServerlessRestClient.java ? ? "https://%s/v1/%s/clusters/%s/start????????????? +com/huawei/gauss200/jdbc/util/PSQLException BPlease confirm that all the parameters needed is added to the url. java/lang/Object?????? ???? 0com/huawei/shade/com/alibaba/fastjson/JSONObject is_cluster_mode true????? ? ? ???? Acom/huawei/shade/org/apache/http/conn/ssl/TrustSelfSignedStrategy??????? Dcom/huawei/shade/org/apache/http/conn/ssl/SSLConnectionSocketFactory Bcom/huawei/shade/org/apache/http/conn/ssl/AllowAllHostnameVerifier ?????????? ? ?????????????? ? ? +com/huawei/shade/org/apache/http/HttpStatus 2com/huawei/gauss200/jdbc/util/ServerlessRestClient??????? error_msg?? java/lang/Exception tranceId: {0} {1}??? ? java/io/IOException Start serverless failed. {0}?? ?? https://%s/v1.0/%s/clusters/%s? ? cluster???????? java/net/URL ?? -com/huawei/shade/com/cloud/sdk/DefaultRequest dws???????? java/io/ByteArrayInputStream ??????? @com/huawei/shade/com/cloud/sdk/auth/credentials/BasicCredentials ???? ? ???????????? java/util/Map$Entry?? java/lang/String ,com/huawei/shade/org/apache/http/HttpHeaders Content-Length??????
X-Language en-us Content-Type application/json Accept X-Security-Token?????????? 8com/huawei/shade/org/apache/http/client/methods/HttpPost 4com/huawei/shade/org/apache/http/entity/StringEntity???? 7com/huawei/shade/org/apache/http/client/methods/HttpGet java/io/BufferedReader java/io/InputStreamReader UTF-8 ?? ?? java/lang/StringBuilder???
java/util/Properties ?com/huawei/shade/org/apache/http/client/methods/HttpRequestBase javax/net/ssl/SSLContext -com/huawei/shade/org/apache/http/HttpResponse java/lang/Throwable 2com/huawei/shade/com/cloud/sdk/http/HttpMethodName &com/huawei/shade/com/cloud/sdk/Request 1com/huawei/shade/com/cloud/sdk/auth/signer/Signer
java/util/Map java/util/Iterator java/net/MalformedURLException java/net/URISyntaxException $java/io/UnsupportedEncodingException #com/huawei/gauss200/jdbc/PGProperty ENDPOINT %Lcom/huawei/gauss200/jdbc/PGProperty; get *(Ljava/util/Properties;)Ljava/lang/String;
PROJECT_ID
CLUSTER_ID
ACCESS_KEY_ID SECRET_ACCESS_KEY com/huawei/gauss200/jdbc/util/GT tr 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; 'com/huawei/gauss200/jdbc/util/PSQLState CONNECTION_REJECTED )Lcom/huawei/gauss200/jdbc/util/PSQLState; >(Ljava/lang/String;Lcom/huawei/gauss200/jdbc/util/PSQLState;)V format put 8(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; toString ()Ljava/lang/String; POST 5com/huawei/shade/org/apache/http/conn/ssl/SSLContexts custom ?()Lcom/huawei/shade/org/apache/http/conn/ssl/SSLContextBuilder; ;com/huawei/shade/org/apache/http/conn/ssl/SSLContextBuilder loadTrustMaterial ?(Ljava/security/KeyStore;Lcom/huawei/shade/org/apache/http/conn/ssl/TrustStrategy;)Lcom/huawei/shade/org/apache/http/conn/ssl/SSLContextBuilder; useTLS build ()Ljavax/net/ssl/SSLContext; ](Ljavax/net/ssl/SSLContext;Lcom/huawei/shade/org/apache/http/conn/ssl/X509HostnameVerifier;)V 8com/huawei/shade/org/apache/http/impl/client/HttpClients B()Lcom/huawei/shade/org/apache/http/impl/client/HttpClientBuilder; >com/huawei/shade/org/apache/http/impl/client/HttpClientBuilder setSSLSocketFactory ?(Lcom/huawei/shade/org/apache/http/conn/socket/LayeredConnectionSocketFactory;)Lcom/huawei/shade/org/apache/http/impl/client/HttpClientBuilder; D()Lcom/huawei/shade/org/apache/http/impl/client/CloseableHttpClient; @com/huawei/shade/org/apache/http/impl/client/CloseableHttpClient execute ?(Lcom/huawei/shade/org/apache/http/client/methods/HttpUriRequest;)Lcom/huawei/shade/org/apache/http/client/methods/CloseableHttpResponse;
getStatusLine /()Lcom/huawei/shade/org/apache/http/StatusLine; +com/huawei/shade/org/apache/http/StatusLine
getStatusCode ()I getEntity /()Lcom/huawei/shade/org/apache/http/HttpEntity; +com/huawei/shade/org/apache/http/HttpEntity
getContent ()Ljava/io/InputStream;
getHeaders >(Ljava/lang/String;)[Lcom/huawei/shade/org/apache/http/Header; 'com/huawei/shade/org/apache/http/Header getValue parseObject F(Ljava/lang/String;)Lcom/huawei/shade/com/alibaba/fastjson/JSONObject; getString &(Ljava/lang/String;)Ljava/lang/String; CONNECTION_UNABLE_TO_CONNECT close
getMessage S(Ljava/lang/String;Lcom/huawei/gauss200/jdbc/util/PSQLState;Ljava/lang/Throwable;)V GET
getJSONObject equals (Ljava/lang/Object;)Z REGION_NAME SECURITY_TOKEN (Ljava/lang/String;)V toURI ()Ljava/net/URI; setEndpoint (Ljava/net/URI;)V
setHttpMethod 7(Lcom/huawei/shade/com/cloud/sdk/http/HttpMethodName;)V getBytes ()[B ([B)V
setContent (Ljava/io/InputStream;)V 8com/huawei/shade/com/cloud/sdk/auth/signer/SignerFactory getSigner Y(Ljava/lang/String;Ljava/lang/String;)Lcom/huawei/shade/com/cloud/sdk/auth/signer/Signer; '(Ljava/lang/String;Ljava/lang/String;)V sign h(Lcom/huawei/shade/com/cloud/sdk/Request;Lcom/huawei/shade/com/cloud/sdk/auth/credentials/Credentials;)V ()Ljava/util/Map; entrySet ()Ljava/util/Set;
java/util/Set iterator ()Ljava/util/Iterator; hasNext ()Z next ()Ljava/lang/Object; getKey equalsIgnoreCase (Ljava/lang/String;)Z addHeader