|
29 | 29 | import org.apache.hadoop.hdfs.web.URLConnectionFactory; |
30 | 30 | import org.apache.hadoop.util.JsonSerialization; |
31 | 31 | import org.apache.hadoop.util.Timer; |
| 32 | + |
32 | 33 | import org.apache.http.HttpEntity; |
33 | 34 | import org.apache.http.HttpStatus; |
34 | | - |
35 | | -import static org.apache.hadoop.hdfs.client.HdfsClientConfigKeys.OAUTH_CLIENT_ID_KEY; |
36 | | -import static org.apache.hadoop.hdfs.client.HdfsClientConfigKeys.OAUTH_REFRESH_URL_KEY; |
37 | | -import static org.apache.hadoop.hdfs.web.oauth2.OAuth2Constants.ACCESS_TOKEN; |
38 | | -import static org.apache.hadoop.hdfs.web.oauth2.OAuth2Constants.CLIENT_ID; |
39 | | -import static org.apache.hadoop.hdfs.web.oauth2.OAuth2Constants.EXPIRES_IN; |
40 | | -import static org.apache.hadoop.hdfs.web.oauth2.OAuth2Constants.GRANT_TYPE; |
41 | | -import static org.apache.hadoop.hdfs.web.oauth2.OAuth2Constants.REFRESH_TOKEN; |
42 | | -import static org.apache.hadoop.hdfs.web.oauth2.Utils.notNull; |
43 | | - |
44 | 35 | import org.apache.http.client.config.RequestConfig; |
45 | 36 | import org.apache.http.client.entity.EntityBuilder; |
46 | 37 | import org.apache.http.client.methods.CloseableHttpResponse; |
|
51 | 42 | import org.apache.http.impl.client.HttpClientBuilder; |
52 | 43 | import org.apache.http.message.BasicNameValuePair; |
53 | 44 |
|
| 45 | +import static org.apache.hadoop.hdfs.client.HdfsClientConfigKeys.OAUTH_CLIENT_ID_KEY; |
| 46 | +import static org.apache.hadoop.hdfs.client.HdfsClientConfigKeys.OAUTH_REFRESH_URL_KEY; |
| 47 | +import static org.apache.hadoop.hdfs.web.oauth2.OAuth2Constants.ACCESS_TOKEN; |
| 48 | +import static org.apache.hadoop.hdfs.web.oauth2.OAuth2Constants.CLIENT_ID; |
| 49 | +import static org.apache.hadoop.hdfs.web.oauth2.OAuth2Constants.EXPIRES_IN; |
| 50 | +import static org.apache.hadoop.hdfs.web.oauth2.OAuth2Constants.GRANT_TYPE; |
| 51 | +import static org.apache.hadoop.hdfs.web.oauth2.OAuth2Constants.REFRESH_TOKEN; |
| 52 | +import static org.apache.hadoop.hdfs.web.oauth2.Utils.notNull; |
| 53 | + |
54 | 54 | /** |
55 | 55 | * Supply a access token obtained via a refresh token (provided through the |
56 | 56 | * Configuration using the second half of the |
|
0 commit comments