close stuff

This commit is contained in:
Zoltan Haindrich 2024-06-20 16:40:06 +00:00
parent 26a16fb4fe
commit 724212381c
2 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,7 @@ package org.apache.druid.quidem;
import com.google.inject.Inject; import com.google.inject.Inject;
import org.apache.druid.guice.LazySingleton; import org.apache.druid.guice.LazySingleton;
import org.apache.druid.java.util.common.StringUtils; import org.apache.druid.java.util.common.StringUtils;
import javax.inject.Named; import javax.inject.Named;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;

View File

@ -53,6 +53,10 @@ public class QuidemRecorder implements AutoCloseable, DruidHook<String>
@Override @Override
public void close() public void close()
{ {
if (printStream != null) {
printStream.close();
printStream = null;
}
DruidHook.unregister(DruidHook.SQL, this); DruidHook.unregister(DruidHook.SQL, this);
} }