Skip to content

Commit d1275e4

Browse files
author
Ben Roling
committed
Merge branch 'trunk' into HADOOP-16085-squashed
2 parents 450ba66 + df76cdc commit d1275e4

File tree

441 files changed

+13292
-3988
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

441 files changed

+13292
-3988
lines changed

LICENSE.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,6 @@ derived.)
16361636

16371637
The binary distribution of this product bundles these dependencies under the
16381638
following license:
1639-
JUnit 4.11
16401639
Eclipse JDT Core 3.1.1
16411640
--------------------------------------------------------------------------------
16421641
(EPL v1.0)

dev-support/docker/Dockerfile

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -207,23 +207,6 @@ ENV MAVEN_OPTS -Xms256m -Xmx1536m
207207
# YETUS CUT HERE
208208
###
209209

210-
####
211-
# Install svn & Forrest (for Apache Hadoop website)
212-
###
213-
# hadolint ignore=DL3008
214-
RUN apt-get -q update \
215-
&& apt-get -q install -y --no-install-recommends subversion \
216-
&& apt-get clean \
217-
&& rm -rf /var/lib/apt/lists/*
218-
219-
RUN mkdir -p /opt/apache-forrest \
220-
&& curl -L -s -S \
221-
https://archive.apache.org/dist/forrest/0.8/apache-forrest-0.8.tar.gz \
222-
-o /opt/forrest.tar.gz \
223-
&& tar xzf /opt/forrest.tar.gz --strip-components 1 -C /opt/apache-forrest
224-
RUN echo 'forrest.home=/opt/apache-forrest' > build.properties
225-
ENV FORREST_HOME=/opt/apache-forrest
226-
227210
# Hugo static website generator (for new hadoop site and Ozone docs)
228211
RUN curl -L -o hugo.deb https://github.com/gohugoio/hugo/releases/download/v0.30.2/hugo_0.30.2_Linux-64bit.deb \
229212
&& dpkg --install hugo.deb \

hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/KerberosUtil.java

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import java.io.UnsupportedEncodingException;
2525
import java.lang.reflect.Field;
2626
import java.lang.reflect.InvocationTargetException;
27-
import java.lang.reflect.Method;
2827
import java.net.InetAddress;
2928
import java.net.UnknownHostException;
3029
import java.nio.ByteBuffer;
@@ -44,6 +43,7 @@
4443
import org.ietf.jgss.Oid;
4544

4645
import javax.security.auth.Subject;
46+
import javax.security.auth.kerberos.KerberosPrincipal;
4747
import javax.security.auth.kerberos.KerberosTicket;
4848
import javax.security.auth.kerberos.KeyTab;
4949

@@ -90,36 +90,37 @@ public static Oid getOidInstance(String oidName)
9090
return (Oid)oidField.get(oidClass);
9191
}
9292

93-
public static String getDefaultRealm()
94-
throws ClassNotFoundException, NoSuchMethodException,
95-
IllegalArgumentException, IllegalAccessException,
93+
/**
94+
* Return the default realm for this JVM.
95+
*
96+
* @return The default realm
97+
* @throws IllegalArgumentException If the default realm does not exist.
98+
* @throws ClassNotFoundException Not thrown. Exists for compatibility.
99+
* @throws NoSuchMethodException Not thrown. Exists for compatibility.
100+
* @throws IllegalAccessException Not thrown. Exists for compatibility.
101+
* @throws InvocationTargetException Not thrown. Exists for compatibility.
102+
*/
103+
public static String getDefaultRealm()
104+
throws ClassNotFoundException, NoSuchMethodException,
105+
IllegalArgumentException, IllegalAccessException,
96106
InvocationTargetException {
97-
Object kerbConf;
98-
Class<?> classRef;
99-
Method getInstanceMethod;
100-
Method getDefaultRealmMethod;
101-
if (IBM_JAVA) {
102-
classRef = Class.forName("com.ibm.security.krb5.internal.Config");
103-
} else {
104-
classRef = Class.forName("sun.security.krb5.Config");
105-
}
106-
getInstanceMethod = classRef.getMethod("getInstance", new Class[0]);
107-
kerbConf = getInstanceMethod.invoke(classRef, new Object[0]);
108-
getDefaultRealmMethod = classRef.getDeclaredMethod("getDefaultRealm",
109-
new Class[0]);
110-
return (String)getDefaultRealmMethod.invoke(kerbConf, new Object[0]);
107+
// Any name is okay.
108+
return new KerberosPrincipal("tmp", 1).getRealm();
111109
}
112110

111+
/**
112+
* Return the default realm for this JVM.
113+
* If the default realm does not exist, this method returns null.
114+
*
115+
* @return The default realm
116+
*/
113117
public static String getDefaultRealmProtected() {
114-
String realmString = null;
115118
try {
116-
realmString = getDefaultRealm();
117-
} catch (RuntimeException rte) {
118-
//silently catch everything
119+
return getDefaultRealm();
119120
} catch (Exception e) {
120-
//silently return null
121+
//silently catch everything
122+
return null;
121123
}
122-
return realmString;
123124
}
124125

125126
/*

hadoop-common-project/hadoop-common/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@
308308
</dependency>
309309
<dependency>
310310
<groupId>org.apache.kerby</groupId>
311-
<artifactId>kerb-simplekdc</artifactId>
311+
<artifactId>kerb-core</artifactId>
312312
</dependency>
313313
<dependency>
314314
<groupId>com.fasterxml.jackson.core</groupId>

hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ function hadoop_bootstrap
585585

586586
#
587587
# short-cuts. vendors may redefine these as well, preferably
588-
# in hadoop-layouts.sh
588+
# in hadoop-layout.sh
589589
#
590590
HADOOP_COMMON_DIR=${HADOOP_COMMON_DIR:-"share/hadoop/common"}
591591
HADOOP_COMMON_LIB_JARS_DIR=${HADOOP_COMMON_LIB_JARS_DIR:-"share/hadoop/common/lib"}
@@ -2530,7 +2530,7 @@ function hadoop_do_classpath_subcommand
25302530
fi
25312531
}
25322532

2533-
## @description generic shell script opton parser. sets
2533+
## @description generic shell script option parser. sets
25342534
## @description HADOOP_PARSE_COUNTER to set number the
25352535
## @description caller should shift
25362536
## @audience private

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/KeyShell.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ protected int init(String[] args) throws IOException {
139139
}
140140
if (attributes.containsKey(attr)) {
141141
getOut().println("\nEach attribute must correspond to only one " +
142-
"value:\natttribute \"" + attr + "\" was repeated\n");
142+
"value:\nattribute \"" + attr + "\" was repeated\n");
143143
return 1;
144144
}
145145
attributes.put(attr, val);

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/CallerContext.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
*
3333
* This class is immutable.
3434
*/
35-
@InterfaceAudience.LimitedPrivate({"HBase", "HDFS", "Hive", "MapReduce",
36-
"Pig", "Spark", "YARN"})
35+
@InterfaceAudience.Public
3736
@InterfaceStability.Evolving
3837
public final class CallerContext {
3938
public static final Charset SIGNATURE_ENCODING = StandardCharsets.UTF_8;

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ private static <T extends IOException> T wrapWithMessage(
833833
Throwable t = ctor.newInstance(msg);
834834
return (T)(t.initCause(exception));
835835
} catch (Throwable e) {
836-
LOG.warn("Unable to wrap exception of type {}: it has no (String) "
836+
LOG.trace("Unable to wrap exception of type {}: it has no (String) "
837837
+ "constructor", clazz, e);
838838
throw exception;
839839
}

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/authorize/AccessControlList.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ public AccessControlList(String users, String groups) {
9797
}
9898

9999
/**
100-
* Build ACL from the given two Strings.
101-
* The Strings contain comma separated values.
100+
* Build ACL from the given array of strings.
101+
* The strings contain comma separated values.
102102
*
103-
* @param aclString build ACL from array of Strings
103+
* @param userGroupStrings build ACL from array of Strings
104104
*/
105105
private void buildACL(String[] userGroupStrings) {
106106
users = new HashSet<String>();

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/SecretManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ protected SecretKey generateSecret() {
167167
* @param key the secret key
168168
* @return the bytes of the generated password
169169
*/
170-
protected static byte[] createPassword(byte[] identifier,
170+
public static byte[] createPassword(byte[] identifier,
171171
SecretKey key) {
172172
Mac mac = threadLocalMac.get();
173173
try {

0 commit comments

Comments
 (0)