[
https://issues.apache.org/jira/browse/HIVE-26291?focusedWorklogId=778609&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-778609
]
ASF GitHub Bot logged work on HIVE-26291:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Jun/22 13:03
Start Date: 06/Jun/22 13:03
Worklog Time Spent: 10m
Work Description: slachiewicz commented on code in PR #3345:
URL: https://github.com/apache/hive/pull/3345#discussion_r890126773
##########
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:
Reader also should be autoclosed
Issue Time Tracking
-------------------
Worklog Id: (was: 778609)
Time Spent: 20m (was: 10m)
> Ranger client file descriptor leak
> ----------------------------------
>
> Key: HIVE-26291
> URL: https://issues.apache.org/jira/browse/HIVE-26291
> Project: Hive
> Issue Type: Improvement
> Reporter: Adrian Wang
> Assignee: Adrian Wang
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Ranger Client has an fd leak
--
This message was sent by Atlassian Jira
(v8.20.7#820007)