adrian-wang commented on code in PR #3345:
URL: https://github.com/apache/hive/pull/3345#discussion_r890795140
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ranger/RangerRestClientImpl.java:
##########
@@ -428,9 +428,7 @@ public RangerExportPolicyList
readRangerPoliciesFromJsonFile(Path filePath,
HiveConf conf)
throws SemanticException {
RangerExportPolicyList rangerExportPolicyList = null;
Gson gsonBuilder = new
GsonBuilder().setDateFormat("yyyyMMdd-HH:mm:ss.SSS-Z").setPrettyPrinting().create();
- try {
- FileSystem fs = filePath.getFileSystem(conf);
- InputStream inputStream = fs.open(filePath);
+ try (InputStream inputStream =
filePath.getFileSystem(conf).open(filePath)) {
Reader reader = new InputStreamReader(inputStream,
Charset.forName("UTF-8"));
Review Comment:
thanks, code updated now
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]