You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by sn...@apache.org on 2020/04/09 10:39:05 UTC
[hadoop] branch trunk updated: MAPREDUCE-7266. historyContext
doesn't need to be a class attribute inside JobHistoryServer. Contributed
by Siddharth Ahuja
This is an automated email from the ASF dual-hosted git repository.
snemeth pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new e2c87b7 MAPREDUCE-7266. historyContext doesn't need to be a class attribute inside JobHistoryServer. Contributed by Siddharth Ahuja
e2c87b7 is described below
commit e2c87b79170f18b316957cb935fbc254d448cd08
Author: Szilard Nemeth <sn...@apache.org>
AuthorDate: Thu Apr 9 12:38:54 2020 +0200
MAPREDUCE-7266. historyContext doesn't need to be a class attribute inside JobHistoryServer. Contributed by Siddharth Ahuja
---
.../apache/hadoop/mapreduce/v2/hs/JobHistoryServer.java | 5 +----
.../apache/hadoop/mapreduce/security/TestJHSSecurity.java | 15 +--------------
2 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistoryServer.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistoryServer.java
index 9ea140f..20854f9 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistoryServer.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/JobHistoryServer.java
@@ -64,7 +64,6 @@ public class JobHistoryServer extends CompositeService {
private static final Logger LOG =
LoggerFactory.getLogger(JobHistoryServer.class);
- protected HistoryContext historyContext;
private HistoryClientService clientService;
private JobHistory jobHistoryService;
protected JHSDelegationTokenSecretManager jhsDTSecretManager;
@@ -128,7 +127,6 @@ public class JobHistoryServer extends CompositeService {
throw new YarnRuntimeException("History Server Failed to login", ie);
}
jobHistoryService = new JobHistory();
- historyContext = (HistoryContext)jobHistoryService;
stateStore = createStateStore(conf);
this.jhsDTSecretManager = createJHSSecretManager(conf, stateStore);
clientService = createHistoryClientService();
@@ -152,8 +150,7 @@ public class JobHistoryServer extends CompositeService {
@VisibleForTesting
protected HistoryClientService createHistoryClientService() {
- return new HistoryClientService(historyContext,
- this.jhsDTSecretManager);
+ return new HistoryClientService(jobHistoryService, this.jhsDTSecretManager);
}
protected JHSDelegationTokenSecretManager createJHSSecretManager(
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestJHSSecurity.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestJHSSecurity.java
index d8c4b2a..6115c59 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestJHSSecurity.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/security/TestJHSSecurity.java
@@ -37,7 +37,6 @@ import org.apache.hadoop.mapreduce.v2.api.protocolrecords.CancelDelegationTokenR
import org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetDelegationTokenRequest;
import org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetJobReportRequest;
import org.apache.hadoop.mapreduce.v2.api.protocolrecords.RenewDelegationTokenRequest;
-import org.apache.hadoop.mapreduce.v2.hs.HistoryClientService;
import org.apache.hadoop.mapreduce.v2.hs.HistoryServerStateStoreService;
import org.apache.hadoop.mapreduce.v2.hs.JHSDelegationTokenSecretManager;
import org.apache.hadoop.mapreduce.v2.hs.JobHistoryServer;
@@ -92,22 +91,10 @@ public class TestJHSSecurity {
@Override
protected JHSDelegationTokenSecretManager createJHSSecretManager(
Configuration conf, HistoryServerStateStoreService store) {
- return new JHSDelegationTokenSecretManager(initialInterval,
+ return new JHSDelegationTokenSecretManager(initialInterval,
maxLifetime, renewInterval, 3600000, store);
}
-
- @Override
- protected HistoryClientService createHistoryClientService() {
- return new HistoryClientService(historyContext,
- this.jhsDTSecretManager) {
- @Override
- protected void initializeWebApp(Configuration conf) {
- // Don't need it, skip.;
- }
- };
- }
};
-// final JobHistoryServer jobHistoryServer = jhServer;
jobHistoryServer.init(conf);
jobHistoryServer.start();
final MRClientProtocol hsService = jobHistoryServer.getClientService()
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org