|
@@ -20,6 +20,8 @@ package org.apache.hadoop.crypto.key.kms.server;
|
|
|
import org.apache.hadoop.classification.InterfaceAudience;
|
|
|
import org.apache.hadoop.conf.Configuration;
|
|
|
import org.apache.hadoop.fs.Path;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.net.MalformedURLException;
|
|
@@ -31,6 +33,8 @@ import java.net.URL;
|
|
|
@InterfaceAudience.Private
|
|
|
public class KMSConfiguration {
|
|
|
|
|
|
+ static final Logger LOG = LoggerFactory.getLogger(KMSConfiguration.class);
|
|
|
+
|
|
|
public static final String KMS_CONFIG_DIR = "kms.config.dir";
|
|
|
public static final String KMS_SITE_XML = "kms-site.xml";
|
|
|
public static final String KMS_ACLS_XML = "kms-acls.xml";
|
|
@@ -120,6 +124,8 @@ public class KMSConfiguration {
|
|
|
"' must be an absolute path: " + confDir);
|
|
|
}
|
|
|
File f = new File(confDir, KMS_ACLS_XML);
|
|
|
+ LOG.trace("Checking file {}, modification time is {}, last reload time is"
|
|
|
+ + " {}", f.getPath(), f.lastModified(), time);
|
|
|
// at least 100ms newer than time, we do this to ensure the file
|
|
|
// has been properly closed/flushed
|
|
|
newer = f.lastModified() - time > 100;
|