public static void finallyClose(Closeable resource) {
        if (resource != null) {
            try {
                resource.close();
            } catch (Exception ex) {
                LOGGER.info("error while closing: " + resource, ex);
            }
        }
    }
Finally close resources

@param resource resource which is closable.
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/AgentUtils.java