[jira] [Work logged] (HIVE-26291) Ranger client file descriptor leak
[ https://issues.apache.org/jira/browse/HIVE-26291?focusedWorklogId=812300=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-812300 ] ASF GitHub Bot logged work on HIVE-26291: - Author: ASF GitHub Bot Created on: 27/Sep/22 00:28 Start Date: 27/Sep/22 00:28 Worklog Time Spent: 10m Work Description: github-actions[bot] commented on PR #3345: URL: https://github.com/apache/hive/pull/3345#issuecomment-1258818618 This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reach out on the d...@hive.apache.org list if the patch is in need of reviews. Issue Time Tracking --- Worklog Id: (was: 812300) Time Spent: 1h 10m (was: 1h) > 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: 1h 10m > Remaining Estimate: 0h > > Ranger Client has an fd leak -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (HIVE-26291) Ranger client file descriptor leak
[ https://issues.apache.org/jira/browse/HIVE-26291?focusedWorklogId=782923=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-782923 ] ASF GitHub Bot logged work on HIVE-26291: - Author: ASF GitHub Bot Created on: 20/Jun/22 10:00 Start Date: 20/Jun/22 10:00 Worklog Time Spent: 10m Work Description: adrian-wang commented on PR #3345: URL: https://github.com/apache/hive/pull/3345#issuecomment-1160236604 @kgyrtkirk Could you please re-trigger the tests? Issue Time Tracking --- Worklog Id: (was: 782923) Time Spent: 1h (was: 50m) > 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: 1h > Remaining Estimate: 0h > > Ranger Client has an fd leak -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (HIVE-26291) Ranger client file descriptor leak
[ https://issues.apache.org/jira/browse/HIVE-26291?focusedWorklogId=782565=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("MMdd-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)
[jira] [Work logged] (HIVE-26291) Ranger client file descriptor leak
[ https://issues.apache.org/jira/browse/HIVE-26291?focusedWorklogId=782148=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("MMdd-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)
[jira] [Work logged] (HIVE-26291) Ranger client file descriptor leak
[ https://issues.apache.org/jira/browse/HIVE-26291?focusedWorklogId=778845=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-778845 ] ASF GitHub Bot logged work on HIVE-26291: - Author: ASF GitHub Bot Created on: 07/Jun/22 06:00 Start Date: 07/Jun/22 06:00 Worklog Time Spent: 10m Work Description: 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("MMdd-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 Issue Time Tracking --- Worklog Id: (was: 778845) Time Spent: 0.5h (was: 20m) > 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: 0.5h > Remaining Estimate: 0h > > Ranger Client has an fd leak -- This message was sent by Atlassian Jira (v8.20.7#820007)
[jira] [Work logged] (HIVE-26291) Ranger client file descriptor leak
[ https://issues.apache.org/jira/browse/HIVE-26291?focusedWorklogId=778609=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("MMdd-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)
[jira] [Work logged] (HIVE-26291) Ranger client file descriptor leak
[ https://issues.apache.org/jira/browse/HIVE-26291?focusedWorklogId=778421=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-778421 ] ASF GitHub Bot logged work on HIVE-26291: - Author: ASF GitHub Bot Created on: 05/Jun/22 03:46 Start Date: 05/Jun/22 03:46 Worklog Time Spent: 10m Work Description: adrian-wang opened a new pull request, #3345: URL: https://github.com/apache/hive/pull/3345 ### What changes were proposed in this pull request? fix fd leak when read ranger policy from json file ### Why are the changes needed? fd should be closed when done using. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? N/A. Issue Time Tracking --- Worklog Id: (was: 778421) Remaining Estimate: 0h Time Spent: 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 > Time Spent: 10m > Remaining Estimate: 0h > > Ranger Client has an fd leak -- This message was sent by Atlassian Jira (v8.20.7#820007)