Made fixes for whitespace errors and checstyle warnings before merge.
This commit is contained in:
parent
512068a01f
commit
3d00c8f394
|
@ -142,7 +142,6 @@
|
|||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.event.SchedulerEvent;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler;
|
||||
import org.apache.hadoop.yarn.server.resourcemanager.security.AMRMTokenSecretManager;
|
||||
import org.apache.hadoop.yarn.server.timelineservice.security.TimelineV2DelegationTokenSecretManagerService.TimelineV2DelegationTokenSecretManager;
|
||||
import org.apache.hadoop.yarn.server.utils.BuilderUtils;
|
||||
import org.apache.hadoop.yarn.util.Clock;
|
||||
import org.apache.hadoop.yarn.util.ControlledClock;
|
||||
|
@ -777,7 +776,7 @@ public void testUpdateCollectorInfo() throws Exception {
|
|||
new Text("renewer"), null);
|
||||
ident.setSequenceNumber(1);
|
||||
Token<TimelineDelegationTokenIdentifier> collectorToken =
|
||||
new Token<TimelineDelegationTokenIdentifier> (ident.getBytes(),
|
||||
new Token<TimelineDelegationTokenIdentifier>(ident.getBytes(),
|
||||
new byte[0], TimelineDelegationTokenIdentifier.KIND_NAME,
|
||||
new Text(localAddr));
|
||||
org.apache.hadoop.yarn.api.records.Token token =
|
||||
|
@ -825,7 +824,7 @@ protected ApplicationMasterProtocol createSchedulerProxy() {
|
|||
// new token.
|
||||
ident.setSequenceNumber(100);
|
||||
Token<TimelineDelegationTokenIdentifier> collectorToken1 =
|
||||
new Token<TimelineDelegationTokenIdentifier> (ident.getBytes(),
|
||||
new Token<TimelineDelegationTokenIdentifier>(ident.getBytes(),
|
||||
new byte[0], TimelineDelegationTokenIdentifier.KIND_NAME,
|
||||
new Text(localAddr));
|
||||
token = org.apache.hadoop.yarn.api.records.Token.newInstance(
|
||||
|
@ -3585,15 +3584,15 @@ public void completeContainer(ContainerId containerId) {
|
|||
}
|
||||
}
|
||||
|
||||
private static class MockSchedulerForTimelineCollector
|
||||
private final static class MockSchedulerForTimelineCollector
|
||||
implements ApplicationMasterProtocol {
|
||||
CollectorInfo collectorInfo;
|
||||
private CollectorInfo collectorInfo;
|
||||
|
||||
public MockSchedulerForTimelineCollector(CollectorInfo info) {
|
||||
private MockSchedulerForTimelineCollector(CollectorInfo info) {
|
||||
this.collectorInfo = info;
|
||||
}
|
||||
|
||||
void updateCollectorInfo(CollectorInfo info) {
|
||||
private void updateCollectorInfo(CollectorInfo info) {
|
||||
collectorInfo = info;
|
||||
}
|
||||
|
||||
|
|
|
@ -398,7 +398,7 @@ private void verifyEntity(File entityFile, String eventId,
|
|||
|
||||
LOG.info("strLine.trim()= " + strLine.trim());
|
||||
if (checkIdPrefix) {
|
||||
Assert.assertTrue("Entity ID prefix expected to be > 0" ,
|
||||
Assert.assertTrue("Entity ID prefix expected to be > 0",
|
||||
entity.getIdPrefix() > 0);
|
||||
if (idPrefix == -1) {
|
||||
idPrefix = entity.getIdPrefix();
|
||||
|
|
|
@ -652,7 +652,7 @@ private void verifyEntityForTimelineV2(File entityFile, String expectedEvent,
|
|||
if (checkIdPrefix) {
|
||||
TimelineEntity entity = FileSystemTimelineReaderImpl.
|
||||
getTimelineRecordFromJSON(entityLine, TimelineEntity.class);
|
||||
Assert.assertTrue("Entity ID prefix expected to be > 0" ,
|
||||
Assert.assertTrue("Entity ID prefix expected to be > 0",
|
||||
entity.getIdPrefix() > 0);
|
||||
if (idPrefix == -1) {
|
||||
idPrefix = entity.getIdPrefix();
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
import org.apache.hadoop.service.CompositeService;
|
||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||
import org.apache.hadoop.yarn.api.records.CollectorInfo;
|
||||
import org.apache.hadoop.yarn.api.records.Token;
|
||||
import org.apache.hadoop.yarn.api.records.timelineservice.TimelineEntity;
|
||||
import org.apache.hadoop.yarn.client.api.impl.TimelineV2ClientImpl;
|
||||
import org.apache.hadoop.yarn.exceptions.YarnException;
|
||||
|
|
|
@ -53,7 +53,8 @@ public class TimelineAuthenticationFilterInitializer extends FilterInitializer {
|
|||
/**
|
||||
* The configuration prefix of timeline HTTP authentication.
|
||||
*/
|
||||
public static final String PREFIX = "yarn.timeline-service.http-authentication.";
|
||||
public static final String PREFIX =
|
||||
"yarn.timeline-service.http-authentication.";
|
||||
|
||||
@VisibleForTesting
|
||||
Map<String, String> filterConfig;
|
||||
|
@ -104,15 +105,15 @@ protected Map<String, String> getFilterConfig() {
|
|||
}
|
||||
|
||||
/**
|
||||
* Initializes {@link TimelineAuthenticationFilter}
|
||||
* Initializes {@link TimelineAuthenticationFilter}.
|
||||
* <p>
|
||||
* Propagates to {@link TimelineAuthenticationFilter} configuration all YARN
|
||||
* configuration properties prefixed with {@value #PREFIX}
|
||||
* configuration properties prefixed with {@value #PREFIX}.
|
||||
*
|
||||
* @param container
|
||||
* The filter container
|
||||
* The filter container.
|
||||
* @param conf
|
||||
* Configuration for run-time parameters
|
||||
* Configuration for run-time parameters.
|
||||
*/
|
||||
@Override
|
||||
public void initFilter(FilterContainer container, Configuration conf) {
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
|
||||
/**
|
||||
* Tests {@link TimelineAuthenticationFilterInitializer}.
|
||||
*/
|
||||
public class TestTimelineAuthenticationFilterInitializer {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -33,12 +33,13 @@
|
|||
@InterfaceStability.Unstable
|
||||
public class NMPolicyProvider extends PolicyProvider {
|
||||
|
||||
private static final Service[] nodeManagerServices =
|
||||
private static final Service[] NODE_MANAGER_SERVICES =
|
||||
new Service[] {
|
||||
new Service(
|
||||
YarnConfiguration.YARN_SECURITY_SERVICE_AUTHORIZATION_CONTAINER_MANAGEMENT_PROTOCOL,
|
||||
new Service(YarnConfiguration.
|
||||
YARN_SECURITY_SERVICE_AUTHORIZATION_CONTAINER_MANAGEMENT_PROTOCOL,
|
||||
ContainerManagementProtocolPB.class),
|
||||
new Service(YarnConfiguration.YARN_SECURITY_SERVICE_AUTHORIZATION_RESOURCE_LOCALIZER,
|
||||
new Service(YarnConfiguration.
|
||||
YARN_SECURITY_SERVICE_AUTHORIZATION_RESOURCE_LOCALIZER,
|
||||
LocalizationProtocolPB.class),
|
||||
new Service(YarnConfiguration.
|
||||
YARN_SECURITY_SERVICE_AUTHORIZATION_COLLECTOR_NODEMANAGER_PROTOCOL,
|
||||
|
@ -47,7 +48,6 @@ public class NMPolicyProvider extends PolicyProvider {
|
|||
|
||||
@Override
|
||||
public Service[] getServices() {
|
||||
return nodeManagerServices;
|
||||
return NODE_MANAGER_SERVICES;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public enum AppToFlowColumnPrefix implements ColumnPrefix<AppToFlowTable> {
|
|||
private final String columnPrefix;
|
||||
private final byte[] columnPrefixBytes;
|
||||
|
||||
private AppToFlowColumnPrefix(ColumnFamily<AppToFlowTable> columnFamily,
|
||||
AppToFlowColumnPrefix(ColumnFamily<AppToFlowTable> columnFamily,
|
||||
String columnPrefix) {
|
||||
this.columnFamily = columnFamily;
|
||||
this.columnPrefix = columnPrefix;
|
||||
|
|
|
@ -91,9 +91,8 @@ public Set<String> readEntityTypes(Configuration hbaseConf,
|
|||
|
||||
int counter = 0;
|
||||
while (true) {
|
||||
try (ResultScanner results
|
||||
= getResult(hbaseConf, conn, typeFilterList, currRowKey, nextRowKey))
|
||||
{
|
||||
try (ResultScanner results =
|
||||
getResult(hbaseConf, conn, typeFilterList, currRowKey, nextRowKey)) {
|
||||
TimelineEntity entity = parseEntityForType(results.next());
|
||||
if (entity == null) {
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue