HADOOP-15355. TestCommonConfigurationFields is broken by HADOOP-15312. Contributed by LiXin Ge.

(cherry picked from commit f614b44fe583033947cc78d8f04cfe6fb64fc892)
This commit is contained in:
Xiao Chen 2018-04-02 23:07:29 -07:00
parent dcb2176c5d
commit 8d755371f2
2 changed files with 28 additions and 4 deletions

View File

@ -38,6 +38,7 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.classification.InterfaceStability;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
import javax.crypto.KeyGenerator; import javax.crypto.KeyGenerator;
@ -53,11 +54,13 @@ import javax.crypto.KeyGenerator;
@InterfaceStability.Unstable @InterfaceStability.Unstable
public abstract class KeyProvider { public abstract class KeyProvider {
public static final String DEFAULT_CIPHER_NAME = public static final String DEFAULT_CIPHER_NAME =
"hadoop.security.key.default.cipher"; CommonConfigurationKeysPublic.HADOOP_SECURITY_KEY_DEFAULT_CIPHER_KEY;
public static final String DEFAULT_CIPHER = "AES/CTR/NoPadding"; public static final String DEFAULT_CIPHER =
CommonConfigurationKeysPublic.HADOOP_SECURITY_KEY_DEFAULT_CIPHER_DEFAULT;
public static final String DEFAULT_BITLENGTH_NAME = public static final String DEFAULT_BITLENGTH_NAME =
"hadoop.security.key.default.bitlength"; CommonConfigurationKeysPublic.HADOOP_SECURITY_KEY_DEFAULT_BITLENGTH_KEY;
public static final int DEFAULT_BITLENGTH = 128; public static final int DEFAULT_BITLENGTH = CommonConfigurationKeysPublic.
HADOOP_SECURITY_KEY_DEFAULT_BITLENGTH_DEFAULT;
private final Configuration conf; private final Configuration conf;

View File

@ -678,6 +678,27 @@ public class CommonConfigurationKeysPublic {
public static final String HADOOP_SECURITY_KEY_PROVIDER_PATH = public static final String HADOOP_SECURITY_KEY_PROVIDER_PATH =
"hadoop.security.key.provider.path"; "hadoop.security.key.provider.path";
/**
* @see
* <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
* core-default.xml</a>
*/
public static final String HADOOP_SECURITY_KEY_DEFAULT_BITLENGTH_KEY =
"hadoop.security.key.default.bitlength";
/** Defalt value for HADOOP_SECURITY_KEY_DEFAULT_BITLENGTH_KEY. */
public static final int HADOOP_SECURITY_KEY_DEFAULT_BITLENGTH_DEFAULT = 128;
/**
* @see
* <a href="{@docRoot}/../hadoop-project-dist/hadoop-common/core-default.xml">
* core-default.xml</a>
*/
public static final String HADOOP_SECURITY_KEY_DEFAULT_CIPHER_KEY =
"hadoop.security.key.default.cipher";
/** Defalt value for HADOOP_SECURITY_KEY_DEFAULT_CIPHER_KEY. */
public static final String HADOOP_SECURITY_KEY_DEFAULT_CIPHER_DEFAULT =
"AES/CTR/NoPadding";
// <!-- KMSClientProvider configurations --> // <!-- KMSClientProvider configurations -->
/** /**
* @see * @see