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

This commit is contained in:
Xiao Chen 2018-04-02 23:07:29 -07:00
parent 57374c4737
commit 1077392eaa
2 changed files with 28 additions and 4 deletions

View File

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

View File

@ -678,6 +678,27 @@ public class CommonConfigurationKeysPublic {
public static final String 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 -->
/**
* @see