-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-19624 Thread leak in ABFS AbfsClientThrottlingAnalyzer #7852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
0492703
792a86f
05ee721
f894117
5cf275c
0a0f4e1
25c6d89
fee9861
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
|
||
package org.apache.hadoop.fs.azurebfs.services; | ||
|
||
import java.io.IOException; | ||
import java.net.HttpURLConnection; | ||
import java.util.concurrent.locks.ReentrantLock; | ||
|
||
|
@@ -223,4 +224,18 @@ | |
} | ||
return contentLength; | ||
} | ||
|
||
Check failure on line 227 in hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsClientThrottlingIntercept.java
|
||
/** | ||
* Closes the throttling intercept and releases associated resources. | ||
* This method closes both the read and write throttling analyzers. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Javadoc to include @ throws |
||
*/ | ||
@Override | ||
public void close() throws IOException { | ||
if (readThrottler != null) { | ||
readThrottler.close(); | ||
} | ||
if (writeThrottler != null) { | ||
writeThrottler.close(); | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,8 @@ | |
|
||
package org.apache.hadoop.fs.azurebfs.services; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* Implementation of {@link AbfsThrottlingIntercept} that does not throttle | ||
* the ABFS process. | ||
|
@@ -40,4 +42,12 @@ public void updateMetrics(final AbfsRestOperationType operationType, | |
public void sendingRequest(final AbfsRestOperationType operationType, | ||
final AbfsCounters abfsCounters) { | ||
} | ||
|
||
/** | ||
* No-op implementation of close method. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: javadoc to include @ throws |
||
*/ | ||
@Override | ||
public void close() throws IOException { | ||
// No resources to clean up in no-op implementation | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
*/ | ||
@InterfaceAudience.Private | ||
@InterfaceStability.Unstable | ||
public interface AbfsThrottlingIntercept { | ||
public interface AbfsThrottlingIntercept extends Closable { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this be extends |
||
|
||
/** | ||
* Updates the metrics for successful and failed read and write operations. | ||
|
@@ -47,4 +47,11 @@ void updateMetrics(AbfsRestOperationType operationType, | |
void sendingRequest(AbfsRestOperationType operationType, | ||
AbfsCounters abfsCounters); | ||
|
||
/** | ||
* Closes the throttling intercept and releases associated resources. | ||
* @throws IOException if an I/O error occurs during cleanup | ||
*/ | ||
@Override | ||
void close() throws IOException; | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix javadoc here a well.