This is an automated email from the ASF dual-hosted git repository.

dzamo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a1e55851c DRILL-8495: HTTP Caching Not Saving Pages (#2912)
3a1e55851c is described below

commit 3a1e55851cf31239e8207808f8b50bdd99bbf8a1
Author: Charles S. Givre <cgi...@apache.org>
AuthorDate: Mon May 6 23:59:41 2024 -0400

    DRILL-8495: HTTP Caching Not Saving Pages (#2912)
    
    Co-authored-by: Charles Givre <charlesgivre@Charless-Mac-Studio.local>
---
 .../org/apache/drill/exec/store/http/util/SimpleHttp.java   | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git 
a/contrib/storage-http/src/main/java/org/apache/drill/exec/store/http/util/SimpleHttp.java
 
b/contrib/storage-http/src/main/java/org/apache/drill/exec/store/http/util/SimpleHttp.java
index d0a78e3592..3171e1c55f 100644
--- 
a/contrib/storage-http/src/main/java/org/apache/drill/exec/store/http/util/SimpleHttp.java
+++ 
b/contrib/storage-http/src/main/java/org/apache/drill/exec/store/http/util/SimpleHttp.java
@@ -1013,7 +1013,7 @@ public class SimpleHttp implements AutoCloseable {
 
   /**
    *
-   * @param url
+   * @param url The input URL
    * @return an input stream which the caller is responsible for closing.
    */
   public static InputStream getRequestAndStreamResponse(String url) {
@@ -1029,9 +1029,9 @@ public class SimpleHttp implements AutoCloseable {
 
   /**
    *
-   * @param url
+   * @param url The input URL
    * @return response body which the caller is responsible for closing.
-   * @throws IOException
+   * @throws IOException If anything goes wrong, throws an IOException
    */
   public static ResponseBody makeSimpleGetRequest(String url) throws 
IOException {
     Request.Builder requestBuilder = new Request.Builder()
@@ -1047,14 +1047,9 @@ public class SimpleHttp implements AutoCloseable {
 
   @Override
   public void close() {
-    Cache cache;
     try {
-      cache = client.cache();
-      if (cache != null) {
-        cache.close();
-      }
       client.connectionPool().evictAll();
-    } catch (IOException e) {
+    } catch (Exception e) {
       logger.warn("Error closing cache. {}", e.getMessage());
     }
   }

Reply via email to