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 251fc1fb40
commit 117a8d6573
2 changed files with 28 additions and 4 deletions

View File

@ -36,6 +36,7 @@ import com.google.gson.stream.JsonWriter;
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;
@ -51,11 +52,13 @@ import javax.crypto.KeyGenerator;
@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

@ -700,6 +700,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