[ 
https://issues.apache.org/jira/browse/HIVE-26291?focusedWorklogId=782565&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-782565
 ]

ASF GitHub Bot logged work on HIVE-26291:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Jun/22 02:56
            Start Date: 18/Jun/22 02:56
    Worklog Time Spent: 10m 
      Work Description: adrian-wang commented on code in PR #3345:
URL: https://github.com/apache/hive/pull/3345#discussion_r900688205


##########
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:
   @slachiewicz Thanks for your review, I've updated the patch





Issue Time Tracking
-------------------

    Worklog Id:     (was: 782565)
    Time Spent: 50m  (was: 40m)

> 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: 50m
>  Remaining Estimate: 0h
>
> Ranger Client has an fd leak



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to