[
https://issues.apache.org/jira/browse/HIVE-26291?focusedWorklogId=782148&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-782148
]
ASF GitHub Bot logged work on HIVE-26291:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Jun/22 19:16
Start Date: 16/Jun/22 19:16
Worklog Time Spent: 10m
Work Description: slachiewicz commented on code in PR #3345:
URL: https://github.com/apache/hive/pull/3345#discussion_r899441832
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ranger/RangerRestClientImpl.java:
##########
@@ -428,10 +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);
- Reader reader = new InputStreamReader(inputStream,
Charset.forName("UTF-8"));
+ try (Reader reader = new
InputStreamReader(filePath.getFileSystem(conf).open(filePath),
Charset.forName("UTF-8"))) {
Review Comment:
still leaks InputStream - in try should be line for InputStream and Reader
Issue Time Tracking
-------------------
Worklog Id: (was: 782148)
Time Spent: 40m (was: 0.5h)
> 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: 40m
> Remaining Estimate: 0h
>
> Ranger Client has an fd leak
--
This message was sent by Atlassian Jira
(v8.20.7#820007)