Skip to content

Commit 73357d5

Browse files
committed
HADOOP-10280. Make Schedulables return a configurable identity of user or group. (Contributed by Chris Li)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1581532 13f79535-47bb-0310-9956-ffa450edef68
1 parent 047731b commit 73357d5

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

hadoop-common-project/hadoop-common/CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,9 @@ Release 2.4.0 - UNRELEASED
390390
HADOOP-10423. Clarify compatibility policy document for combination of
391391
new client and old server. (Chris Nauroth via kasha)
392392

393+
HADOOP-10280. Make Schedulables return a configurable identity of user
394+
or group. (Chris Li via Arpit Agarwal)
395+
393396
OPTIMIZATIONS
394397

395398
BUG FIXES

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeys.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public class CommonConfigurationKeys extends CommonConfigurationKeysPublic {
8989
*/
9090
public static final String IPC_CALLQUEUE_NAMESPACE = "ipc";
9191
public static final String IPC_CALLQUEUE_IMPL_KEY = "callqueue.impl";
92+
public static final String IPC_CALLQUEUE_IDENTITY_PROVIDER_KEY = "identity-provider.impl";
9293

9394
/** Internal buffer size for Lzo compressor/decompressors */
9495
public static final String IO_COMPRESSION_CODEC_LZO_BUFFERSIZE_KEY =

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ public synchronized void refreshCallQueue(Configuration conf) {
496496
}
497497

498498
/** A call queued for handling. */
499-
public static class Call {
499+
public static class Call implements Schedulable {
500500
private final int callId; // the client's call id
501501
private final int retryCount; // the retry count of the call
502502
private final Writable rpcRequest; // Serialized Rpc request from client
@@ -534,6 +534,12 @@ public String toString() {
534534
public void setResponse(ByteBuffer response) {
535535
this.rpcResponse = response;
536536
}
537+
538+
// For Schedulable
539+
@Override
540+
public UserGroupInformation getUserGroupInformation() {
541+
return connection.user;
542+
}
537543
}
538544

539545
/** Listens on the socket. Creates jobs for the handler threads*/

0 commit comments

Comments
 (0)