From 8fd1676f782da85311fd0ca22cf46b2663195a0b Mon Sep 17 00:00:00 2001
From: Laszlo Bodor
Date: Mon, 26 Jan 2026 10:42:44 +0100
Subject: [PATCH] TEZ-4672: Spotless: cleanup and force removing trailing
whitespaces
---
pom.xml | 1 +
.../apache/tez/client/AMConfiguration.java | 10 +-
.../tez/common/ContainerSignatureMatcher.java | 6 +-
.../org/apache/tez/common/TezYARNUtils.java | 10 +-
.../counters/AggregateFrameworkCounter.java | 6 +-
.../common/counters/AggregateTezCounter.java | 2 +-
.../counters/AggregateTezCounterDelegate.java | 4 +-
.../common/counters/AggregateTezCounters.java | 6 +-
.../tez/common/counters/DAGCounter.java | 2 +-
.../tez/common/counters/JobCounter.java | 2 +-
.../apache/tez/common/counters/Limits.java | 2 +-
.../common/security/JobTokenIdentifier.java | 6 +-
.../security/JobTokenSecretManager.java | 4 +-
.../apache/tez/common/security/Master.java | 2 +-
.../tez/common/security/TokenCache.java | 16 +-
.../apache/tez/dag/api/DagTypeConverters.java | 10 +-
.../tez/dag/api/DataSinkDescriptor.java | 18 +-
.../tez/dag/api/DataSourceDescriptor.java | 26 +-
.../java/org/apache/tez/dag/api/Edge.java | 10 +-
.../apache/tez/dag/api/EdgeManagerPlugin.java | 24 +-
.../tez/dag/api/EdgeManagerPluginContext.java | 8 +-
.../apache/tez/dag/api/GroupInputEdge.java | 10 +-
.../apache/tez/dag/api/OutputDescriptor.java | 2 +-
.../org/apache/tez/dag/api/PreWarmVertex.java | 20 +-
.../tez/dag/api/ProcessorDescriptor.java | 2 +-
.../tez/dag/api/RootInputLeafOutput.java | 4 +-
.../java/org/apache/tez/dag/api/Scope.java | 2 +-
.../apache/tez/dag/api/TaskLocationHint.java | 6 +-
.../tez/dag/api/TezUncheckedException.java | 2 +-
.../java/org/apache/tez/dag/api/Vertex.java | 54 ++--
.../org/apache/tez/dag/api/VertexGroup.java | 32 +-
.../tez/dag/api/VertexLocationHint.java | 4 +-
.../tez/dag/api/VertexManagerPlugin.java | 20 +-
.../dag/api/VertexManagerPluginContext.java | 72 ++---
.../api/VertexManagerPluginDescriptor.java | 4 +-
.../apache/tez/dag/api/client/DAGClient.java | 8 +-
.../tez/dag/api/client/DAGClientInternal.java | 8 +-
.../apache/tez/dag/api/client/DAGStatus.java | 4 +-
.../apache/tez/dag/api/client/Progress.java | 12 +-
.../tez/dag/api/client/VertexStatus.java | 6 +-
.../rpc/DAGClientAMProtocolBlockingPB.java | 2 +-
.../api/AbstractLogicalIOProcessor.java | 2 +-
.../apache/tez/runtime/api/DagIdentifier.java | 2 +-
.../apache/tez/runtime/api/InputContext.java | 10 +-
.../runtime/api/InputFrameworkInterface.java | 2 +-
.../tez/runtime/api/InputInitializer.java | 6 +-
.../runtime/api/InputInitializerContext.java | 12 +-
.../tez/runtime/api/InputSpecUpdate.java | 14 +-
.../tez/runtime/api/InputStatistics.java | 8 +-
.../runtime/api/InputStatisticsReporter.java | 4 +-
.../LogicalIOProcessorFrameworkInterface.java | 2 +-
.../apache/tez/runtime/api/LogicalInput.java | 2 +-
.../apache/tez/runtime/api/LogicalOutput.java | 2 +-
.../tez/runtime/api/MemoryUpdateCallback.java | 4 +-
.../tez/runtime/api/MergedInputContext.java | 8 +-
.../tez/runtime/api/MergedLogicalInput.java | 4 +-
.../tez/runtime/api/ObjectRegistry.java | 16 +-
.../org/apache/tez/runtime/api/Output.java | 12 +-
.../tez/runtime/api/OutputCommitter.java | 4 +-
.../runtime/api/OutputCommitterContext.java | 2 +-
.../apache/tez/runtime/api/OutputContext.java | 4 +-
.../runtime/api/OutputFrameworkInterface.java | 2 +-
.../tez/runtime/api/OutputStatistics.java | 6 +-
.../runtime/api/OutputStatisticsReporter.java | 2 +-
.../org/apache/tez/runtime/api/Processor.java | 4 +-
.../tez/runtime/api/ProcessorContext.java | 12 +-
.../runtime/api/TaskAttemptIdentifier.java | 4 +-
.../tez/runtime/api/TaskIdentifier.java | 4 +-
.../tez/runtime/api/VertexIdentifier.java | 4 +-
.../tez/runtime/api/VertexStatistics.java | 4 +-
.../events/CompositeDataMovementEvent.java | 14 +-
.../runtime/api/events/DataMovementEvent.java | 6 +-
.../InputConfigureVertexTasksEvent.java | 4 +-
.../api/events/InputDataInformationEvent.java | 8 +-
.../runtime/api/events/InputFailedEvent.java | 10 +-
.../api/events/VertexManagerEvent.java | 14 +-
.../org/apache/tez/client/TestTezClient.java | 42 +--
.../apache/tez/client/TestTezClientUtils.java | 12 +-
.../java/org/apache/tez/dag/api/TestDAG.java | 2 +-
.../org/apache/tez/dag/api/TestDAGPlan.java | 8 +-
.../tez/dag/api/TestTaskLocationHint.java | 2 +-
.../tez/dag/api/client/rpc/TestDAGClient.java | 42 +--
.../apache/tez/common/AsyncDispatcher.java | 30 +-
.../tez/common/AsyncDispatcherConcurrent.java | 30 +-
.../org/apache/tez/common/GcTimeUpdater.java | 6 +-
.../apache/tez/common/TezAbstractEvent.java | 4 +-
.../tez/common/TezContainerLogAppender.java | 6 +-
.../tez/dag/records/DagIdentifierImpl.java | 8 +-
.../records/TaskAttemptIdentifierImpl.java | 10 +-
.../tez/dag/records/TaskIdentifierImpl.java | 8 +-
.../org/apache/tez/dag/records/TezID.java | 8 +-
.../tez/dag/records/TezTaskAttemptID.java | 20 +-
.../org/apache/tez/dag/records/TezTaskID.java | 6 +-
.../tez/dag/records/VertexIdentifierImpl.java | 10 +-
.../tez/dag/utils/RelocalizationUtils.java | 2 +-
.../tez/util/TezMxBeanResourceCalculator.java | 2 +-
.../tez/common/TestAsyncDispatcher.java | 14 +-
.../common/TestAsyncDispatcherConcurrent.java | 28 +-
.../org/apache/tez/common/TestTezUtils.java | 8 +-
.../tez/dag/api/client/DAGClientHandler.java | 2 +-
.../dag/api/oldrecords/TaskAttemptReport.java | 6 +-
.../dag/api/oldrecords/TaskAttemptState.java | 6 +-
.../org/apache/tez/dag/app/AppContext.java | 4 +-
.../org/apache/tez/dag/app/ClusterInfo.java | 2 +-
.../apache/tez/dag/app/ContainerContext.java | 4 +-
.../dag/app/ContainerHeartbeatHandler.java | 4 +-
.../tez/dag/app/HeartbeatHandlerBase.java | 40 +--
.../tez/dag/app/TaskAttemptEventInfo.java | 6 +-
.../app/TaskCommunicatorManagerInterface.java | 4 +-
.../tez/dag/app/TaskHeartbeatHandler.java | 2 +-
.../apache/tez/dag/app/dag/DAGScheduler.java | 14 +-
.../org/apache/tez/dag/app/dag/DAGState.java | 2 +-
.../tez/dag/app/dag/DAGTerminationCause.java | 12 +-
.../tez/dag/app/dag/StateChangeNotifier.java | 20 +-
.../java/org/apache/tez/dag/app/dag/Task.java | 12 +-
.../apache/tez/dag/app/dag/TaskAttempt.java | 18 +-
.../dag/app/dag/TaskAttemptStateInternal.java | 2 +-
.../tez/dag/app/dag/TaskTerminationCause.java | 8 +-
.../org/apache/tez/dag/app/dag/Vertex.java | 20 +-
.../dag/app/dag/VertexTerminationCause.java | 8 +-
.../dag/app/dag/event/CallableEventType.java | 2 +-
.../app/dag/event/DAGEventCounterUpdate.java | 10 +-
.../app/dag/event/DAGEventRecoverEvent.java | 6 +-
.../dag/event/DAGEventSchedulerUpdate.java | 8 +-
.../dag/app/dag/event/DAGEventStartDag.java | 2 +-
.../dag/app/dag/event/SpeculatorEvent.java | 4 +-
...peculatorEventTaskAttemptStatusUpdate.java | 10 +-
.../app/dag/event/SpeculatorEventType.java | 2 +-
.../dag/app/dag/event/TaskAttemptEvent.java | 4 +-
.../event/TaskAttemptEventAttemptFailed.java | 4 +-
.../event/TaskAttemptEventAttemptKilled.java | 2 +-
.../TaskAttemptEventContainerTerminated.java | 4 +-
...temptEventContainerTerminatedBySystem.java | 2 +-
.../TaskAttemptEventContainerTerminating.java | 4 +-
.../event/TaskAttemptEventKillRequest.java | 2 +-
.../dag/event/TaskAttemptEventNodeFailed.java | 6 +-
.../event/TaskAttemptEventOutputFailed.java | 12 +-
.../dag/event/TaskAttemptEventSchedule.java | 6 +-
.../event/TaskAttemptEventStatusUpdate.java | 10 +-
.../app/dag/event/TaskAttemptEventType.java | 6 +-
.../tez/dag/app/dag/event/TaskEvent.java | 2 +-
.../app/dag/event/TaskEventScheduleTask.java | 4 +-
.../tez/dag/app/dag/event/TaskEventType.java | 2 +-
.../VertexEventInputDataInformation.java | 4 +-
.../VertexEventManagerUserCodeError.java | 4 +-
.../event/VertexEventNullEdgeInitialized.java | 6 +-
.../dag/event/VertexEventRootInputFailed.java | 6 +-
.../VertexEventRootInputInitialized.java | 4 +-
.../app/dag/event/VertexEventRouteEvent.java | 2 +-
...VertexEventSourceTaskAttemptCompleted.java | 2 +-
.../event/VertexEventSourceVertexStarted.java | 6 +-
.../app/dag/event/VertexEventTermination.java | 4 +-
.../dag/app/dag/event/VertexEventType.java | 16 +-
.../dag/app/dag/impl/AMUserCodeException.java | 8 +-
.../app/dag/impl/BroadcastEdgeManager.java | 16 +-
.../apache/tez/dag/app/dag/impl/DAGImpl.java | 20 +-
.../dag/impl/DAGSchedulerNaturalOrder.java | 16 +-
.../org/apache/tez/dag/app/dag/impl/Edge.java | 66 ++---
.../dag/impl/ImmediateStartVertexManager.java | 4 +-
.../dag/app/dag/impl/OneToOneEdgeManager.java | 10 +-
.../dag/impl/OneToOneEdgeManagerOnDemand.java | 20 +-
.../dag/impl/OutputCommitterContextImpl.java | 2 +-
.../app/dag/impl/RootInputVertexManager.java | 6 +-
.../tez/dag/app/dag/impl/TaskAttemptImpl.java | 70 ++---
.../app/dag/impl/TaskAttemptImplHelpers.java | 4 +-
.../TezRootInputInitializerContextImpl.java | 4 +-
.../tez/dag/app/dag/impl/VertexImpl.java | 144 ++++-----
.../tez/dag/app/dag/impl/VertexManager.java | 80 ++---
.../speculation/legacy/LegacySpeculator.java | 16 +-
.../legacy/LegacyTaskRuntimeEstimator.java | 6 +-
.../legacy/TaskRuntimeEstimator.java | 2 +-
.../tez/dag/app/rm/AMSchedulerEvent.java | 4 +-
.../AMSchedulerEventDeallocateContainer.java | 2 +-
.../dag/app/rm/AMSchedulerEventTAEnded.java | 4 +-
.../rm/AMSchedulerEventTALaunchRequest.java | 2 +-
.../tez/dag/app/rm/AMSchedulerEventType.java | 2 +-
.../tez/dag/app/rm/TaskSchedulerManager.java | 12 +-
.../tez/dag/app/rm/TezAMRMClientAsync.java | 6 +-
.../dag/app/rm/YarnTaskSchedulerService.java | 250 ++++++++--------
.../tez/dag/app/rm/container/AMContainer.java | 2 +-
.../app/rm/container/AMContainerEvent.java | 8 +-
.../container/AMContainerEventAssignTA.java | 4 +-
.../container/AMContainerEventCompleted.java | 14 +-
.../AMContainerEventLaunchFailed.java | 8 +-
.../container/AMContainerEventLaunched.java | 4 +-
.../container/AMContainerEventStopFailed.java | 6 +-
.../AMContainerEventStopRequest.java | 4 +-
.../AMContainerEventTASucceeded.java | 6 +-
.../rm/container/AMContainerEventType.java | 12 +-
.../app/rm/container/AMContainerHelpers.java | 4 +-
.../dag/app/rm/container/AMContainerImpl.java | 24 +-
.../app/rm/container/AMContainerState.java | 6 +-
.../dag/app/rm/container/AMContainerTask.java | 4 +-
.../rm/container/ContainerContextMatcher.java | 2 +-
.../apache/tez/dag/app/rm/node/AMNode.java | 2 +-
.../node/AMNodeEventContainerAllocated.java | 4 +-
.../rm/node/AMNodeEventNodeCountUpdated.java | 4 +-
.../app/rm/node/AMNodeEventStateChanged.java | 6 +-
.../rm/node/AMNodeEventTaskAttemptEnded.java | 12 +-
.../node/AMNodeEventTaskAttemptSucceeded.java | 4 +-
.../tez/dag/app/rm/node/AMNodeImpl.java | 2 +-
.../tez/dag/app/rm/node/AMNodeTracker.java | 8 +-
.../authorize/TezAMPolicyProvider.java | 4 +-
.../history/events/ContainerStoppedEvent.java | 8 +-
.../history/events/DAGKillRequestEvent.java | 4 +-
.../events/TaskAttemptFinishedEvent.java | 18 +-
.../events/TaskAttemptStartedEvent.java | 2 +-
.../events/VertexConfigurationDoneEvent.java | 2 +-
.../events/VertexInitializedEvent.java | 2 +-
.../impl/HistoryEventJsonConversion.java | 4 +-
.../tez/dag/history/utils/DAGUtils.java | 8 +-
.../tez/dag/history/utils/TezEventUtils.java | 2 +-
.../apache/tez/dag/utils/TezBuilderUtils.java | 6 +-
.../dag/api/client/TestDAGClientHandler.java | 12 +-
.../org/apache/tez/dag/app/MockClock.java | 4 +-
.../apache/tez/dag/app/MockDAGAppMaster.java | 64 ++--
.../apache/tez/dag/app/MockLocalClient.java | 2 +-
.../org/apache/tez/dag/app/MockTezClient.java | 10 +-
.../tez/dag/app/TestMemoryWithEvents.java | 26 +-
.../tez/dag/app/TestMockDAGAppMaster.java | 130 ++++----
.../apache/tez/dag/app/TestPreemption.java | 50 ++--
.../tez/dag/app/TestRecoveryParser.java | 52 ++--
.../apache/tez/dag/app/TestSpeculation.java | 8 +-
.../dag/app/TestTaskCommunicatorManager1.java | 14 +-
.../dag/app/dag/TestStateChangeNotifier.java | 6 +-
.../app/dag/impl/CallableEventDispatcher.java | 2 +-
.../tez/dag/app/dag/impl/TestCommit.java | 24 +-
.../tez/dag/app/dag/impl/TestDAGImpl.java | 86 +++---
.../tez/dag/app/dag/impl/TestDAGRecovery.java | 178 +++++------
.../dag/app/dag/impl/TestDAGScheduler.java | 28 +-
.../apache/tez/dag/app/dag/impl/TestEdge.java | 22 +-
.../impl/TestImmediateStartVertexManager.java | 14 +-
.../tez/dag/app/dag/impl/TestTaskAttempt.java | 46 +--
.../tez/dag/app/dag/impl/TestTaskImpl.java | 32 +-
.../tez/dag/app/dag/impl/TestVertexImpl.java | 278 +++++++++---------
.../dag/app/dag/impl/TestVertexManager.java | 6 +-
.../legacy/TestDataStatistics.java | 6 +-
.../tez/dag/app/rm/TestContainerReuse.java | 16 +-
.../tez/dag/app/rm/TestTaskScheduler.java | 66 ++---
.../dag/app/rm/TestTaskSchedulerHelpers.java | 8 +-
.../dag/app/rm/TestTaskSchedulerManager.java | 22 +-
.../dag/app/rm/container/TestAMContainer.java | 18 +-
.../dag/app/rm/node/TestAMNodeTracker.java | 8 +-
.../TestHistoryEventsProtoConversion.java | 12 +-
.../impl/TestHistoryEventJsonConversion.java | 2 +-
.../apache/tez/test/EdgeManagerForTest.java | 4 +-
.../tez/test/VertexManagerPluginForTest.java | 16 +-
.../org/apache/tez/examples/JoinDataGen.java | 6 +-
.../org/apache/tez/examples/JoinValidate.java | 2 +-
.../apache/tez/examples/OrderedWordCount.java | 20 +-
.../tez/examples/SimpleSessionExample.java | 20 +-
.../apache/tez/examples/TezExampleBase.java | 4 +-
.../org/apache/tez/examples/WordCount.java | 34 +--
.../apache/tez/shufflehandler/IndexCache.java | 6 +-
.../tez/shufflehandler/ShuffleHandler.java | 8 +-
.../mapred/split/SplitSizeEstimator.java | 2 +-
.../hadoop/mapred/split/TezGroupedSplit.java | 24 +-
.../split/TezGroupedSplitsInputFormat.java | 28 +-
.../mapreduce/split/TezGroupedSplit.java | 28 +-
.../split/TezGroupedSplitsInputFormat.java | 32 +-
.../split/TezMapReduceSplitsGrouper.java | 4 +-
.../tez/mapreduce/client/ClientCache.java | 2 +-
.../client/ClientServiceDelegate.java | 4 +-
.../mapreduce/client/ResourceMgrDelegate.java | 12 +-
.../tez/mapreduce/client/YARNRunner.java | 14 +-
.../tez/mapreduce/combine/MRCombiner.java | 42 +--
.../committer/MROutputCommitter.java | 4 +-
.../common/MRInputAMSplitGenerator.java | 14 +-
.../common/MRInputSplitDistributor.java | 6 +-
.../tez/mapreduce/hadoop/DeprecatedKeys.java | 60 ++--
.../tez/mapreduce/hadoop/IDConverter.java | 8 +-
.../tez/mapreduce/hadoop/InputSplitInfo.java | 10 +-
.../mapreduce/hadoop/InputSplitInfoDisk.java | 4 +-
.../mapreduce/hadoop/InputSplitInfoMem.java | 8 +-
.../tez/mapreduce/hadoop/MRJobConfig.java | 90 +++---
.../MultiStageMRConfToTezTranslator.java | 4 +-
.../hadoop/MultiStageMRConfigUtil.java | 4 +-
.../mapreduce/hadoop/TezTypeConverters.java | 8 +-
.../hadoop/mapred/JobContextImpl.java | 14 +-
.../mapreduce/hadoop/mapred/MRCounters.java | 22 +-
.../mapreduce/hadoop/mapred/MRReporter.java | 8 +-
.../hadoop/mapred/TaskAttemptContextImpl.java | 12 +-
.../hadoop/mapreduce/JobContextImpl.java | 108 +++----
.../hadoop/mapreduce/MapContextImpl.java | 4 +-
.../mapreduce/TaskAttemptContextImpl.java | 14 +-
.../mapreduce/TaskInputOutputContextImpl.java | 12 +-
.../apache/tez/mapreduce/input/MRInput.java | 32 +-
.../tez/mapreduce/input/MRInputLegacy.java | 14 +-
.../tez/mapreduce/input/MultiMRInput.java | 4 +-
.../tez/mapreduce/lib/MRInputUtils.java | 4 +-
.../apache/tez/mapreduce/lib/MRReader.java | 10 +-
.../tez/mapreduce/lib/MRReaderMapred.java | 4 +-
.../apache/tez/mapreduce/output/MROutput.java | 18 +-
.../mapreduce/partition/MRPartitioner.java | 2 +-
.../tez/mapreduce/processor/MRTask.java | 8 +-
.../mapreduce/processor/MRTaskReporter.java | 2 +-
.../processor/SimpleMRProcessor.java | 4 +-
.../mapreduce/processor/map/MapProcessor.java | 16 +-
.../processor/reduce/ReduceProcessor.java | 2 +-
.../mapred/split/TestGroupedSplits.java | 62 ++--
.../apache/tez/mapreduce/TezTestUtils.java | 2 +-
.../hadoop/TestConfigTranslationMRToTez.java | 8 +-
.../tez/mapreduce/hadoop/TestMRHelpers.java | 2 +-
.../tez/mapreduce/output/TestMROutput.java | 14 +-
.../tez/mapreduce/processor/MapUtils.java | 18 +-
.../processor/map/TestMapProcessor.java | 24 +-
.../processor/reduce/TestReduceProcessor.java | 14 +-
.../tez/auxservices/TestShuffleHandler.java | 2 +-
.../parser/datamodel/TaskAttemptInfo.java | 30 +-
.../history/parser/datamodel/VertexInfo.java | 14 +-
.../tez/history/parser/utils/Utils.java | 4 +-
.../apache/tez/history/TestHistoryParser.java | 2 +-
.../ats/acls/TestATSHistoryWithACLs.java | 4 +-
.../ats/HistoryEventTimelineConversion.java | 2 +-
.../TestHistoryEventTimelineConversion.java | 4 +-
.../tez/tests/MiniTezClusterWithTimeline.java | 6 +-
.../org/apache/tez/common/ContainerTask.java | 6 +-
.../apache/tez/common/ProtoConverters.java | 4 +-
.../apache/tez/common/TezLocalResource.java | 2 +-
.../apache/tez/runtime/InputReadyTracker.java | 4 +-
.../LogicalIOProcessorRuntimeTask.java | 12 +-
.../org/apache/tez/runtime/RuntimeTask.java | 20 +-
.../api/events/TaskStatusUpdateEvent.java | 6 +-
.../tez/runtime/api/impl/GroupInputSpec.java | 14 +-
.../tez/runtime/api/impl/IOStatistics.java | 10 +-
.../apache/tez/runtime/api/impl/TaskSpec.java | 4 +-
.../tez/runtime/api/impl/TaskStatistics.java | 4 +-
.../api/impl/TezHeartbeatResponse.java | 4 +-
.../runtime/api/impl/TezInputContextImpl.java | 10 +-
.../api/impl/TezMergedInputContextImpl.java | 2 +-
.../api/impl/TezOutputContextImpl.java | 4 +-
.../runtime/api/impl/TezTaskContextImpl.java | 10 +-
.../objectregistry/ObjectRegistryImpl.java | 2 +-
.../common/resources/MemoryDistributor.java | 4 +-
.../common/resources/ScalingAllocator.java | 2 +-
.../runtime/metrics/TaskCounterUpdater.java | 14 +-
.../tez/runtime/task/ContainerReporter.java | 2 +-
.../tez/runtime/task/ErrorReporter.java | 2 +-
.../org/apache/tez/runtime/task/TezChild.java | 8 +-
.../tez/runtime/TestInputReadyTracker.java | 40 +--
.../resources/TestMemoryDistributor.java | 66 ++---
.../tez/runtime/task/TestTaskReporter.java | 8 +-
.../InputReadyVertexManager.java | 36 +--
.../vertexmanager/ShuffleVertexManager.java | 40 +--
.../runtime/library/api/KeyValueReader.java | 10 +-
.../runtime/library/api/KeyValueWriter.java | 2 +-
.../runtime/library/api/KeyValuesReader.java | 8 +-
.../tez/runtime/library/api/Partitioner.java | 14 +-
.../runtime/library/common/ConfigUtils.java | 10 +-
.../tez/runtime/library/common/Constants.java | 16 +-
.../common/InputAttemptIdentifier.java | 2 +-
.../library/common/InputIdentifier.java | 2 +-
.../library/common/ValuesIterator.java | 38 +--
.../library/common/combine/Combiner.java | 4 +-
.../common/readers/UnorderedKVReader.java | 24 +-
.../common/shuffle/DiskFetchedInput.java | 6 +-
.../library/common/shuffle/FetchedInput.java | 12 +-
.../common/shuffle/FetchedInputAllocator.java | 4 +-
.../common/shuffle/FetchedInputCallback.java | 8 +-
.../common/shuffle/FetcherCallback.java | 2 +-
.../library/common/shuffle/InputHost.java | 4 +-
.../common/shuffle/LocalDiskFetchedInput.java | 2 +-
.../common/shuffle/MemoryFetchedInput.java | 4 +-
.../library/common/shuffle/ShuffleUtils.java | 6 +-
.../impl/ShuffleInputEventHandlerImpl.java | 4 +-
.../common/shuffle/impl/ShuffleManager.java | 36 +--
.../impl/SimpleFetchedInputAllocator.java | 14 +-
.../shuffle/orderedgrouped/MapHost.java | 12 +-
.../shuffle/orderedgrouped/MapOutput.java | 18 +-
.../shuffle/orderedgrouped/MergeThread.java | 14 +-
.../shuffle/orderedgrouped/ShuffleHeader.java | 14 +-
.../common/sort/impl/ExternalSorter.java | 12 +-
.../library/common/sort/impl/IFile.java | 2 +-
.../common/sort/impl/PipelinedSorter.java | 52 ++--
.../sort/impl/TezRawKeyValueIterator.java | 32 +-
.../common/sort/impl/dflt/DefaultSorter.java | 6 +-
.../task/local/output/TezTaskOutput.java | 2 +-
.../BaseUnorderedPartitionedKVWriter.java | 12 +-
.../OrderedPartitionedKVOutputConfig.java | 2 +-
.../ConcatenatedMergedKeyValueInput.java | 4 +-
.../ConcatenatedMergedKeyValuesInput.java | 6 +-
.../library/input/OrderedGroupedKVInput.java | 8 +-
.../input/OrderedGroupedMergedKVInput.java | 4 +-
.../library/output/UnorderedKVOutput.java | 4 +-
.../library/processor/PreWarmProcessor.java | 14 +-
.../WeightedScalingMemoryDistributor.java | 2 +-
.../TestInputReadyVertexManager.java | 52 ++--
.../TestWeightedScalingMemoryDistributor.java | 6 +-
.../library/common/TestInputIdentifiers.java | 4 +-
.../library/common/TestValuesIterator.java | 4 +-
.../library/common/shuffle/TestFetcher.java | 2 +-
.../TestShuffleInputEventHandlerImpl.java | 4 +-
.../orderedgrouped/TestMergeManager.java | 2 +-
.../orderedgrouped/TestShuffleScheduler.java | 2 +-
.../input/TestSortedGroupedMergedInput.java | 4 +-
.../output/TestOnFileSortedOutput.java | 6 +-
.../output/TestOnFileUnorderedKVOutput.java | 4 +-
.../examples/BroadcastAndOneToOneExample.java | 18 +-
.../apache/tez/mapreduce/examples/Join.java | 14 +-
.../tez/mapreduce/examples/MRRSleepJob.java | 8 +-
.../examples/MultipleCommitsExample.java | 16 +-
.../mapreduce/examples/RandomTextWriter.java | 56 ++--
.../tez/mapreduce/examples/RandomWriter.java | 58 ++--
.../tez/mapreduce/examples/SecondarySort.java | 40 +--
.../apache/tez/mapreduce/examples/Sort.java | 36 +--
.../examples/TestOrderedWordCount.java | 10 +-
.../tez/mapreduce/examples/UnionExample.java | 18 +-
.../processor/FilterByWordInputProcessor.java | 2 +-
.../FilterByWordOutputProcessor.java | 2 +-
.../tez/mapreduce/TestMRRJobsDAGApi.java | 14 +-
.../apache/tez/test/AMShutdownController.java | 4 +-
.../tez/test/FaultToleranceTestRunner.java | 38 +--
.../org/apache/tez/test/MiniTezCluster.java | 2 +-
.../RecoveryServiceWithEventHandlingHook.java | 8 +-
.../org/apache/tez/test/SimpleTestDAG.java | 8 +-
.../tez/test/SimpleTestDAG3Vertices.java | 8 +-
.../org/apache/tez/test/TestAMRecovery.java | 10 +-
.../org/apache/tez/test/TestDAGRecovery2.java | 2 +-
.../tez/test/TestExceptionPropagation.java | 12 +-
.../apache/tez/test/TestFaultTolerance.java | 176 +++++------
.../java/org/apache/tez/test/TestInput.java | 60 ++--
.../java/org/apache/tez/test/TestOutput.java | 6 +-
.../org/apache/tez/test/TestProcessor.java | 56 ++--
.../org/apache/tez/test/TestRecovery.java | 8 +-
.../java/org/apache/tez/test/TestTezJobs.java | 22 +-
.../tez/test/dag/SimpleReverseVTestDAG.java | 6 +-
.../apache/tez/test/dag/SimpleVTestDAG.java | 6 +-
.../plugins/CriticalPathAnalyzer.java | 92 +++---
.../tez/analyzer/plugins/TezAnalyzerBase.java | 14 +-
.../org/apache/tez/analyzer/TestAnalyzer.java | 152 +++++-----
430 files changed, 3250 insertions(+), 3249 deletions(-)
diff --git a/pom.xml b/pom.xml
index 74943817b0..f86ea7c878 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1028,6 +1028,7 @@
java,javax,org.apache,com,net,io
+
diff --git a/tez-api/src/main/java/org/apache/tez/client/AMConfiguration.java b/tez-api/src/main/java/org/apache/tez/client/AMConfiguration.java
index 1b61c45d05..4b0f228a27 100644
--- a/tez-api/src/main/java/org/apache/tez/client/AMConfiguration.java
+++ b/tez-api/src/main/java/org/apache/tez/client/AMConfiguration.java
@@ -50,15 +50,15 @@ class AMConfiguration {
void addAMLocalResources(Map localResources) {
this.amLocalResources.putAll(localResources);
}
-
+
void clearAMLocalResources() {
this.amLocalResources.clear();
}
-
+
void setCredentials(Credentials credentials) {
this.credentials = credentials;
}
-
+
void setTezConfiguration(TezConfiguration tezConf) {
this.tezConf = tezConf;
}
@@ -78,11 +78,11 @@ TezConfiguration getTezConfiguration() {
Credentials getCredentials() {
return credentials;
}
-
+
void setBinaryConfLR(LocalResource binaryConfLRsrc) {
this.binaryConfLRsrc = binaryConfLRsrc;
}
-
+
LocalResource getBinaryConfLR() {
return binaryConfLRsrc;
}
diff --git a/tez-api/src/main/java/org/apache/tez/common/ContainerSignatureMatcher.java b/tez-api/src/main/java/org/apache/tez/common/ContainerSignatureMatcher.java
index c0a1245aec..44e44499ff 100644
--- a/tez-api/src/main/java/org/apache/tez/common/ContainerSignatureMatcher.java
+++ b/tez-api/src/main/java/org/apache/tez/common/ContainerSignatureMatcher.java
@@ -33,16 +33,16 @@ public interface ContainerSignatureMatcher {
* signature.
*/
public boolean isSuperSet(Object cs1, Object cs2);
-
+
/**
* Checks if the container signatures match exactly
* @return true if exact match
*/
public boolean isExactMatch(Object cs1, Object cs2);
-
+
/**
* Gets additional resources specified in lr2, which are not present for lr1
- *
+ *
* @param lr1
* @param lr2
* @return additional resources specified in lr2, which are not present for lr1
diff --git a/tez-api/src/main/java/org/apache/tez/common/TezYARNUtils.java b/tez-api/src/main/java/org/apache/tez/common/TezYARNUtils.java
index 42e2b45b90..ca51279846 100644
--- a/tez-api/src/main/java/org/apache/tez/common/TezYARNUtils.java
+++ b/tez-api/src/main/java/org/apache/tez/common/TezYARNUtils.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -162,7 +162,7 @@ public static void appendToEnvFromInputString(Map env,
}
}
}
-
+
public static void setEnvIfAbsentFromInputString(Map env,
String envString) {
if (envString != null && envString.length() > 0) {
@@ -189,7 +189,7 @@ public static void setEnvIfAbsentFromInputString(Map env,
}
}
}
-
+
public static void addToEnvironment(
Map environment,
String variable, String value, String classPathSeparator) {
@@ -199,7 +199,7 @@ public static void addToEnvironment(
} else {
val = val + classPathSeparator + value;
}
- environment.put(StringInterner.weakIntern(variable),
+ environment.put(StringInterner.weakIntern(variable),
StringInterner.weakIntern(val));
}
diff --git a/tez-api/src/main/java/org/apache/tez/common/counters/AggregateFrameworkCounter.java b/tez-api/src/main/java/org/apache/tez/common/counters/AggregateFrameworkCounter.java
index aa7d4462cf..8bbc34b286 100644
--- a/tez-api/src/main/java/org/apache/tez/common/counters/AggregateFrameworkCounter.java
+++ b/tez-api/src/main/java/org/apache/tez/common/counters/AggregateFrameworkCounter.java
@@ -22,7 +22,7 @@
@SuppressWarnings("rawtypes")
public class AggregateFrameworkCounter> extends FrameworkCounter implements AggregateTezCounter {
-
+
private long min = Long.MAX_VALUE;
private long max = Long.MIN_VALUE;
private long count = 0;
@@ -36,7 +36,7 @@ public AggregateFrameworkCounter(Enum ref, String groupName) {
public void increment(long incr) {
throw new IllegalArgumentException("Cannot increment an aggregate counter directly");
}
-
+
@Override
public void aggregate(TezCounter other) {
final long val = other.getValue();
@@ -71,7 +71,7 @@ public long getMin() {
public long getMax() {
return max;
}
-
+
@SuppressWarnings("unchecked")
public FrameworkCounter asFrameworkCounter() {
return ((FrameworkCounter)this);
diff --git a/tez-api/src/main/java/org/apache/tez/common/counters/AggregateTezCounter.java b/tez-api/src/main/java/org/apache/tez/common/counters/AggregateTezCounter.java
index bf711dae86..2bccd154f5 100644
--- a/tez-api/src/main/java/org/apache/tez/common/counters/AggregateTezCounter.java
+++ b/tez-api/src/main/java/org/apache/tez/common/counters/AggregateTezCounter.java
@@ -25,7 +25,7 @@ public interface AggregateTezCounter {
public abstract long getMin();
public abstract long getMax();
-
+
public abstract long getCount();
}
\ No newline at end of file
diff --git a/tez-api/src/main/java/org/apache/tez/common/counters/AggregateTezCounterDelegate.java b/tez-api/src/main/java/org/apache/tez/common/counters/AggregateTezCounterDelegate.java
index ae2ca7b0c6..80018c3e0a 100644
--- a/tez-api/src/main/java/org/apache/tez/common/counters/AggregateTezCounterDelegate.java
+++ b/tez-api/src/main/java/org/apache/tez/common/counters/AggregateTezCounterDelegate.java
@@ -32,7 +32,7 @@ public class AggregateTezCounterDelegate extends AbstractC
public AggregateTezCounterDelegate(T child) {
this.child = child;
}
-
+
@Override
public String getName() {
return child.getName(); // this is a pass-through
@@ -57,7 +57,7 @@ public void setValue(long value) {
public void increment(long incr) {
throw new UnsupportedOperationException("Cannot increment an aggregate counter");
}
-
+
/* (non-Javadoc)
* @see org.apache.tez.common.counters.AggregateTezCounter#aggregate(org.apache.tez.common.counters.TezCounter)
*/
diff --git a/tez-api/src/main/java/org/apache/tez/common/counters/AggregateTezCounters.java b/tez-api/src/main/java/org/apache/tez/common/counters/AggregateTezCounters.java
index 332c24a960..86cd7ae528 100644
--- a/tez-api/src/main/java/org/apache/tez/common/counters/AggregateTezCounters.java
+++ b/tez-api/src/main/java/org/apache/tez/common/counters/AggregateTezCounters.java
@@ -19,13 +19,13 @@
package org.apache.tez.common.counters;
public class AggregateTezCounters extends TezCounters {
-
+
private static final GroupFactory groupFactory = new GroupFactory();
-
+
public AggregateTezCounters() {
super(groupFactory);
}
-
+
// Mix framework group implementation into CounterGroup interface
private static class AggregateFrameworkGroupImpl>
extends FrameworkCounterGroup implements CounterGroup {
diff --git a/tez-api/src/main/java/org/apache/tez/common/counters/DAGCounter.java b/tez-api/src/main/java/org/apache/tez/common/counters/DAGCounter.java
index ca575d4dfa..a56af4aa94 100644
--- a/tez-api/src/main/java/org/apache/tez/common/counters/DAGCounter.java
+++ b/tez-api/src/main/java/org/apache/tez/common/counters/DAGCounter.java
@@ -26,7 +26,7 @@
@InterfaceAudience.Public
@InterfaceStability.Evolving
public enum DAGCounter {
- NUM_FAILED_TASKS,
+ NUM_FAILED_TASKS,
NUM_KILLED_TASKS,
NUM_SUCCEEDED_TASKS,
TOTAL_LAUNCHED_TASKS,
diff --git a/tez-api/src/main/java/org/apache/tez/common/counters/JobCounter.java b/tez-api/src/main/java/org/apache/tez/common/counters/JobCounter.java
index 14e76bc081..8fdbc5c79a 100644
--- a/tez-api/src/main/java/org/apache/tez/common/counters/JobCounter.java
+++ b/tez-api/src/main/java/org/apache/tez/common/counters/JobCounter.java
@@ -23,7 +23,7 @@
// Per-job counters
@Private
public enum JobCounter {
- NUM_FAILED_MAPS,
+ NUM_FAILED_MAPS,
NUM_FAILED_REDUCES,
NUM_KILLED_MAPS,
NUM_KILLED_REDUCES,
diff --git a/tez-api/src/main/java/org/apache/tez/common/counters/Limits.java b/tez-api/src/main/java/org/apache/tez/common/counters/Limits.java
index a12b0de8b8..0973ea825b 100644
--- a/tez-api/src/main/java/org/apache/tez/common/counters/Limits.java
+++ b/tez-api/src/main/java/org/apache/tez/common/counters/Limits.java
@@ -29,7 +29,7 @@
@InterfaceAudience.Private
public class Limits {
-
+
private static final Logger LOG = LoggerFactory.getLogger(Limits.class);
private static final Configuration DEFAULT_CONFIGURATION = new TezConfiguration();
diff --git a/tez-api/src/main/java/org/apache/tez/common/security/JobTokenIdentifier.java b/tez-api/src/main/java/org/apache/tez/common/security/JobTokenIdentifier.java
index 47bf74d2ee..64c79861ab 100644
--- a/tez-api/src/main/java/org/apache/tez/common/security/JobTokenIdentifier.java
+++ b/tez-api/src/main/java/org/apache/tez/common/security/JobTokenIdentifier.java
@@ -37,7 +37,7 @@
public class JobTokenIdentifier extends TokenIdentifier {
private Text jobid;
public final static Text KIND_NAME = new Text("tez.job");
-
+
/**
* Default constructor
*/
@@ -58,7 +58,7 @@ public JobTokenIdentifier(Text jobid) {
public Text getKind() {
return KIND_NAME;
}
-
+
/** {@inheritDoc} */
@Override
public UserGroupInformation getUser() {
@@ -67,7 +67,7 @@ public UserGroupInformation getUser() {
}
return UserGroupInformation.createRemoteUser(jobid.toString());
}
-
+
/**
* Get the jobid
* @return the jobid
diff --git a/tez-api/src/main/java/org/apache/tez/common/security/JobTokenSecretManager.java b/tez-api/src/main/java/org/apache/tez/common/security/JobTokenSecretManager.java
index d4cd2be83e..b46dbf377e 100644
--- a/tez-api/src/main/java/org/apache/tez/common/security/JobTokenSecretManager.java
+++ b/tez-api/src/main/java/org/apache/tez/common/security/JobTokenSecretManager.java
@@ -129,7 +129,7 @@ public void removeTokenForJob(String jobId) {
currentJobTokens.remove(jobId);
}
}
-
+
/**
* Look up the token password/secret for the given jobId.
* @param jobId the jobId to look up
@@ -146,7 +146,7 @@ public SecretKey retrieveTokenSecret(String jobId) throws InvalidToken {
}
return tokenSecret;
}
-
+
/**
* Look up the token password/secret for the given job token identifier.
* @param identifier the job token identifier to look up
diff --git a/tez-api/src/main/java/org/apache/tez/common/security/Master.java b/tez-api/src/main/java/org/apache/tez/common/security/Master.java
index d0b8d16c47..67d9adb78c 100644
--- a/tez-api/src/main/java/org/apache/tez/common/security/Master.java
+++ b/tez-api/src/main/java/org/apache/tez/common/security/Master.java
@@ -41,7 +41,7 @@ public static String getMasterUserName(Configuration conf) {
return conf.get(YarnConfiguration.RM_PRINCIPAL);
}
-
+
// This needs to go into YARN
public static InetSocketAddress getMasterAddress(Configuration conf) {
return conf
diff --git a/tez-api/src/main/java/org/apache/tez/common/security/TokenCache.java b/tez-api/src/main/java/org/apache/tez/common/security/TokenCache.java
index ba3ce5b6d1..c5dd89a06f 100644
--- a/tez-api/src/main/java/org/apache/tez/common/security/TokenCache.java
+++ b/tez-api/src/main/java/org/apache/tez/common/security/TokenCache.java
@@ -42,17 +42,17 @@
* This class provides user facing APIs for transferring secrets from
* the job client to the tasks.
* The secrets can be stored just before submission of jobs and read during
- * the task execution.
+ * the task execution.
*/
@InterfaceAudience.Private
@InterfaceStability.Unstable
public final class TokenCache {
-
+
private static final Logger LOG = LoggerFactory.getLogger(TokenCache.class);
private TokenCache() {}
-
+
/**
* auxiliary method to get user's secret keys..
*
@@ -63,9 +63,9 @@ public static byte[] getSecretKey(Credentials credentials, Text alias) {
return null;
return credentials.getSecretKey(alias);
}
-
+
/**
- * Convenience method to obtain delegation tokens from namenodes
+ * Convenience method to obtain delegation tokens from namenodes
* corresponding to the paths passed.
* @param credentials credentials
* @param ps array of paths
@@ -121,7 +121,7 @@ static boolean isTokenRenewalExcluded(FileSystem fs, Configuration conf) {
/**
* get delegation token for a specific FS
*/
- static void obtainTokensForFileSystemsInternal(FileSystem fs,
+ static void obtainTokensForFileSystemsInternal(FileSystem fs,
Credentials credentials, Configuration conf) throws IOException {
// TODO Change this to use YARN utilities once YARN-1664 is fixed.
// RM skips renewing token with empty renewer
@@ -149,12 +149,12 @@ static void obtainTokensForFileSystemsInternal(FileSystem fs,
* store session specific token
*/
@InterfaceAudience.Private
- public static void setSessionToken(Token extends TokenIdentifier> t,
+ public static void setSessionToken(Token extends TokenIdentifier> t,
Credentials credentials) {
credentials.addToken(SESSION_TOKEN, t);
}
/**
- *
+ *
* @return session token
*/
@SuppressWarnings("unchecked")
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java b/tez-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java
index 1e68226b46..1d292e7ad6 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/DagTypeConverters.java
@@ -102,7 +102,7 @@ public static PlanLocalResourceVisibility convertToDAGPlan(LocalResourceVisibili
default : throw new RuntimeException("unknown 'visibility': " + visibility);
}
}
-
+
public static List convertToDAGPlan(Map lrs) {
List planLrs = Lists.newArrayListWithCapacity(lrs.size());
for (Entry entry : lrs.entrySet()) {
@@ -224,7 +224,7 @@ public static VertexLocationHint convertFromDAGPlan(
}
return VertexLocationHint.create(outputList);
}
-
+
public static String convertToDAGPlan(URL resource) {
Path p;
try {
@@ -281,7 +281,7 @@ public static Map createEdgePlanMapFromDAGPlan(List
}
return edgePlanMap;
}
-
+
public static PlanEdgeProperty convertToProto(EdgeProperty prop) {
PlanEdgeProperty.Builder edgePropBuilder = PlanEdgeProperty.newBuilder();
edgePropBuilder.setDataMovementType(convertToDAGPlan(prop.getDataMovementType()));
@@ -294,10 +294,10 @@ public static PlanEdgeProperty convertToProto(EdgeProperty prop) {
edgePropBuilder.setEdgeManager(DagTypeConverters.convertToDAGPlan(prop
.getEdgeManagerDescriptor()));
}
-
+
return edgePropBuilder.build();
}
-
+
public static EdgeProperty convertFromProto(PlanEdgeProperty edge) {
return EdgeProperty.create(
(edge.hasEdgeManager() ?
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/DataSinkDescriptor.java b/tez-api/src/main/java/org/apache/tez/dag/api/DataSinkDescriptor.java
index fec2bf6eed..08c8645819 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/DataSinkDescriptor.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/DataSinkDescriptor.java
@@ -31,14 +31,14 @@
import com.google.common.collect.Sets;
/**
- * Defines the output and output committer for a data sink
+ * Defines the output and output committer for a data sink
*
*/
@Public
public class DataSinkDescriptor {
private final OutputDescriptor outputDescriptor;
private final OutputCommitterDescriptor committerDescriptor;
-
+
private final Credentials credentials;
private final Collection urisForCredentials = Sets.newHashSet();
@@ -90,7 +90,7 @@ public static DataSinkDescriptor create(OutputDescriptor outputDescriptor,
@Nullable Credentials credentials) {
return new DataSinkDescriptor(outputDescriptor, committerDescriptor, credentials);
}
-
+
/**
* Get the {@link OutputDescriptor} for this {@link DataSinkDescriptor}
* @return {@link OutputDescriptor}
@@ -98,7 +98,7 @@ public static DataSinkDescriptor create(OutputDescriptor outputDescriptor,
public OutputDescriptor getOutputDescriptor() {
return outputDescriptor;
}
-
+
/**
* Get the {@link OutputCommitterDescriptor} for this {@link DataSinkDescriptor}
* @return {@link OutputCommitterDescriptor}
@@ -106,16 +106,16 @@ public OutputDescriptor getOutputDescriptor() {
public @Nullable OutputCommitterDescriptor getOutputCommitterDescriptor() {
return committerDescriptor;
}
-
- /**
+
+ /**
* This method can be used to specify a list of URIs for which Credentials
* need to be obtained so that the job can run. An incremental list of URIs
* can be provided by making multiple calls to the method.
- *
+ *
* Currently, @{link credentials} can only be fetched for HDFS and other
* {@link org.apache.hadoop.fs.FileSystem} implementations that support
* credentials.
- *
+ *
* @param uris
* a list of {@link URI}s
* @return this
@@ -125,7 +125,7 @@ public synchronized DataSinkDescriptor addURIsForCredentials(Collection uri
urisForCredentials.addAll(uris);
return this;
}
-
+
/**
* Get the URIs for which credentials will be obtained
* @return an unmodifiable list representing the URIs for which credentials
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/DataSourceDescriptor.java b/tez-api/src/main/java/org/apache/tez/dag/api/DataSourceDescriptor.java
index 199474b386..c425688113 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/DataSourceDescriptor.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/DataSourceDescriptor.java
@@ -36,14 +36,14 @@
import com.google.common.collect.Sets;
/**
- * Defines the input and input initializer for a data source
+ * Defines the input and input initializer for a data source
*
*/
@Public
public class DataSourceDescriptor {
private final InputDescriptor inputDescriptor;
private final InputInitializerDescriptor initializerDescriptor;
-
+
private final Credentials credentials;
private final int numShards;
private final VertexLocationHint locationHint;
@@ -126,13 +126,13 @@ public static DataSourceDescriptor create(InputDescriptor inputDescriptor,
}
/**
- * Get the {@link InputDescriptor} for this {@link DataSourceDescriptor}
+ * Get the {@link InputDescriptor} for this {@link DataSourceDescriptor}
* @return {@link InputDescriptor}
*/
public InputDescriptor getInputDescriptor() {
return inputDescriptor;
}
-
+
/**
* Get the {@link InputInitializerDescriptor} for this {@link DataSourceDescriptor}
* @return {@link InputInitializerDescriptor}
@@ -140,16 +140,16 @@ public InputDescriptor getInputDescriptor() {
public @Nullable InputInitializerDescriptor getInputInitializerDescriptor() {
return initializerDescriptor;
}
-
- /**
+
+ /**
* This method can be used to specify a list of URIs for which Credentials
* need to be obtained so that the job can run. An incremental list of URIs
* can be provided by making multiple calls to the method.
- *
+ *
* Currently, @{link credentials} can only be fetched for HDFS and other
* {@link org.apache.hadoop.fs.FileSystem} implementations that support
* credentials.
- *
+ *
* @param uris
* a list of {@link URI}s
* @return this
@@ -159,7 +159,7 @@ public synchronized DataSourceDescriptor addURIsForCredentials(Collection u
urisForCredentials.addAll(uris);
return this;
}
-
+
/**
* Get the URIs for which credentials will be obtained
* @return an unmodifiable list representing the URIs for which credentials
@@ -168,10 +168,10 @@ public synchronized DataSourceDescriptor addURIsForCredentials(Collection u
public Collection getURIsForCredentials() {
return Collections.unmodifiableCollection(urisForCredentials);
}
-
+
/**
* Number of shards for this data source. If a vertex has only one
- * data source this the number of tasks in the vertex should be set to
+ * data source this the number of tasks in the vertex should be set to
* the number of shards
* Returns -1 when this is determined at runtime in the AM.
* @return number of tasks
@@ -180,7 +180,7 @@ public Collection getURIsForCredentials() {
public int getNumberOfShards() {
return numShards;
}
-
+
/**
* Returns any credentials needed to access this data source.
* Is null when this calculation happens on the AppMaster (default)
@@ -190,7 +190,7 @@ public int getNumberOfShards() {
public @Nullable Credentials getCredentials() {
return credentials;
}
-
+
/**
* Get the location hints for the tasks in the vertex for this data source.
* Is null when shard calculation happens on the AppMaster (default)
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/Edge.java b/tez-api/src/main/java/org/apache/tez/dag/api/Edge.java
index db509f7050..cc76b109b4 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/Edge.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/Edge.java
@@ -23,9 +23,9 @@
/**
* Edge defines the connection between a producer and consumer vertex in the DAG.
* @link {@link EdgeProperty} defines the relationship between them. The producer
- * vertex provides input to the edge and the consumer vertex reads output from the
+ * vertex provides input to the edge and the consumer vertex reads output from the
* edge.
- *
+ *
*/
@Public
public class Edge {
@@ -70,7 +70,7 @@ public Vertex getInputVertex() {
/**
* The @link {@link Vertex} that reads output from the edge
- * @return {@link Vertex}
+ * @return {@link Vertex}
*/
public Vertex getOutputVertex() {
return outputVertex;
@@ -83,7 +83,7 @@ public Vertex getOutputVertex() {
public EdgeProperty getEdgeProperty() {
return edgeProperty;
}
-
+
/*
* Used to identify the edge in the configuration
*/
@@ -92,7 +92,7 @@ public String getId() {
// ensure it is unique.
return String.valueOf(System.identityHashCode(this));
}
-
+
@Override
public String toString() {
return inputVertex + " -> " + outputVertex + " (" + edgeProperty + ")";
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPlugin.java b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPlugin.java
index 4e22f634cd..faebd12273 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPlugin.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPlugin.java
@@ -27,8 +27,8 @@
import org.apache.tez.runtime.api.events.InputReadErrorEvent;
/**
- * This interface defines the routing of the event between tasks of producer and
- * consumer vertices. The routing is bi-directional. Users can customize the
+ * This interface defines the routing of the event between tasks of producer and
+ * consumer vertices. The routing is bi-directional. Users can customize the
* routing by providing an implementation of this interface.
*/
@Public
@@ -41,7 +41,7 @@ public abstract class EdgeManagerPlugin {
* Create an instance of the EdgeManagerPlugin. Classes extending this to
* create a EdgeManagerPlugin, must provide the same constructor so that Tez
* can create an instance of the class at runtime.
- *
+ *
* @param context
* the context within which this EdgeManagerPlugin will run. Includes
* information like configuration which the user may have specified
@@ -61,10 +61,10 @@ public EdgeManagerPlugin(EdgeManagerPluginContext context) {
* @throws Exception
*/
public abstract void initialize() throws Exception;
-
+
/**
* Get the number of physical inputs on the destination task
- * @param destinationTaskIndex Index of destination task for which number of
+ * @param destinationTaskIndex Index of destination task for which number of
* inputs is needed
* @return Number of physical inputs on the destination task
* @throws Exception
@@ -73,20 +73,20 @@ public EdgeManagerPlugin(EdgeManagerPluginContext context) {
/**
* Get the number of physical outputs on the source task
- * @param sourceTaskIndex Index of the source task for which number of outputs
+ * @param sourceTaskIndex Index of the source task for which number of outputs
* is needed
* @return Number of physical outputs on the source task
* @throws Exception
*/
public abstract int getNumSourceTaskPhysicalOutputs(int sourceTaskIndex) throws Exception;
-
+
/**
* Return the routing information to inform consumers about the source task
* output that is now available. The return map has the routing information.
* The event will be routed to every destination task index in the key of the
* map. Every physical input in the value for that task key will receive the
* input.
- *
+ *
* @param event
* Data movement event that contains the output information
* @param sourceTaskIndex
@@ -110,7 +110,7 @@ public abstract void routeDataMovementEventToDestination(DataMovementEvent event
* for that task key will receive the failure notification. This method will
* be called once for every source task failure and information for all
* affected destinations must be provided in that invocation.
- *
+ *
* @param sourceTaskIndex
* Source task
* @param destinationTaskAndInputIndices
@@ -126,16 +126,16 @@ public abstract void routeInputSourceTaskFailedEventToDestination(int sourceTask
* @throws Exception
*/
public abstract int getNumDestinationConsumerTasks(int sourceTaskIndex) throws Exception;
-
+
/**
* Return the source task index to which to send the input error event
- *
+ *
* @param event
* Input read error event. Has more information about the error
* @param destinationTaskIndex
* Destination task that reported the error
* @param destinationFailedInputIndex
- * Index of the physical input on the destination task that reported
+ * Index of the physical input on the destination task that reported
* the error
* @return Index of the source task that created the unavailable input
* @throws Exception
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPluginContext.java b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPluginContext.java
index ef6925b4ee..705f2023ae 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPluginContext.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/EdgeManagerPluginContext.java
@@ -29,19 +29,19 @@
@Public
@Unstable
public interface EdgeManagerPluginContext {
-
+
/**
* Returns the payload specified by the user for the edge.
* @return the {@link org.apache.tez.dag.api.UserPayload} specified by the user
*/
public UserPayload getUserPayload();
-
+
/**
- * Returns the source vertex name
+ * Returns the source vertex name
* @return the source vertex name
*/
public String getSourceVertexName();
-
+
/**
* Returns the destination vertex name
* @return the destination vertex name
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/GroupInputEdge.java b/tez-api/src/main/java/org/apache/tez/dag/api/GroupInputEdge.java
index 9eb9a1a935..13934c85e0 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/GroupInputEdge.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/GroupInputEdge.java
@@ -22,9 +22,9 @@
import org.apache.tez.runtime.api.MergedLogicalInput;
/**
- * A composite edge that represents a common connection between a
- * group of input vertices and a single output vertex. This can be
- * used to perform e.g. an efficient union of the data produced by
+ * A composite edge that represents a common connection between a
+ * group of input vertices and a single output vertex. This can be
+ * used to perform e.g. an efficient union of the data produced by
* the input vertices. The output vertex tasks see a unified/merged
* view of the data from all the input vertices.
*/
@@ -88,7 +88,7 @@ public Vertex getOutputVertex() {
public EdgeProperty getEdgeProperty() {
return edgeProperty;
}
-
+
InputDescriptor getMergedInput() {
return mergedInput;
}
@@ -100,7 +100,7 @@ InputDescriptor getMergedInput() {
public String getId() {
return String.valueOf(this.hashCode());
}
-
+
@Override
public String toString() {
return inputVertexGroup + " -> " + outputVertex + " (" + edgeProperty + ")";
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/OutputDescriptor.java b/tez-api/src/main/java/org/apache/tez/dag/api/OutputDescriptor.java
index 58b6ce4630..034270d453 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/OutputDescriptor.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/OutputDescriptor.java
@@ -32,7 +32,7 @@ public class OutputDescriptor extends EntityDescriptor {
public OutputDescriptor() {
super();
}
-
+
private OutputDescriptor(String outputClassName) {
super(outputClassName);
}
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/PreWarmVertex.java b/tez-api/src/main/java/org/apache/tez/dag/api/PreWarmVertex.java
index 62979b5088..8522c510fd 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/PreWarmVertex.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/PreWarmVertex.java
@@ -58,13 +58,13 @@ private PreWarmVertex(String vertexName, ProcessorDescriptor processorDescriptor
Resource taskResource) {
super(vertexName, processorDescriptor, parallelism, taskResource);
}
-
+
private PreWarmVertex(String vertexName, int parallelism, Resource taskResource) {
this(vertexName, ProcessorDescriptor.create(
"org.apache.tez.runtime.library.processor.PreWarmProcessor"), parallelism, taskResource);
}
-
+
/**
* Create a config builder for the @link {@link PreWarmVertex}. This may be used to construct the
* pre-warm vertex more flexibly.
@@ -128,31 +128,31 @@ public static class PreWarmVertexConfigBuilder {
ProcessorDescriptor proc;
Resource resource;
Configuration conf;
-
+
PreWarmVertexConfigBuilder(Configuration conf) {
this.conf = conf;
}
-
+
public PreWarmVertexConfigBuilder setName(String name) {
this.name = name;
return this;
}
-
+
public PreWarmVertexConfigBuilder setProcessorDescriptor(ProcessorDescriptor proc) {
this.proc = proc;
return this;
}
-
+
public PreWarmVertexConfigBuilder setResource(Resource resource) {
this.resource = resource;
return this;
}
-
+
public PreWarmVertexConfigBuilder setParallelism(int parallelism) {
this.parallelism = parallelism;
return this;
}
-
+
public PreWarmVertex build() {
if (name == null) {
name = "_PreWarm_";
@@ -160,7 +160,7 @@ public PreWarmVertex build() {
if (parallelism == 0) {
parallelism = conf.getInt(TezConfiguration.TEZ_AM_SESSION_MIN_HELD_CONTAINERS, -1);
if (parallelism == -1) {
- throw new TezUncheckedException("Prewarm parallelism must be set or specified in conf via "
+ throw new TezUncheckedException("Prewarm parallelism must be set or specified in conf via "
+ TezConfiguration.TEZ_AM_SESSION_MIN_HELD_CONTAINERS);
}
}
@@ -168,7 +168,7 @@ public PreWarmVertex build() {
proc =
ProcessorDescriptor.create("org.apache.tez.runtime.library.processor.PreWarmProcessor");
}
-
+
return create(name, proc, parallelism, resource);
}
}
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/ProcessorDescriptor.java b/tez-api/src/main/java/org/apache/tez/dag/api/ProcessorDescriptor.java
index 7f088d8caf..8e00a7cf7d 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/ProcessorDescriptor.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/ProcessorDescriptor.java
@@ -32,7 +32,7 @@ public class ProcessorDescriptor extends EntityDescriptor {
public ProcessorDescriptor() {
super();
}
-
+
private ProcessorDescriptor(String processorClassName) {
super(processorClassName);
}
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/RootInputLeafOutput.java b/tez-api/src/main/java/org/apache/tez/dag/api/RootInputLeafOutput.java
index 953a78da6e..f6a8116507 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/RootInputLeafOutput.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/RootInputLeafOutput.java
@@ -32,7 +32,7 @@ public RootInputLeafOutput(String name, T ioDescriptor, S controllerDescriptor)
this.ioDescriptor = ioDescriptor;
this.controllerDescriptor = controllerDescriptor;
}
-
+
public String getName() {
return this.name;
}
@@ -40,7 +40,7 @@ public String getName() {
public T getIODescriptor() {
return this.ioDescriptor;
}
-
+
public S getControllerDescriptor() {
return this.controllerDescriptor;
}
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/Scope.java b/tez-api/src/main/java/org/apache/tez/dag/api/Scope.java
index f638e092a5..4288db9189 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/Scope.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/Scope.java
@@ -22,7 +22,7 @@
@Private
public enum Scope {
// DO NOT CHANGE THE ORDER
- AM, // can only been set at AM level
+ AM, // can only been set at AM level
DAG, // can been set at AM/DAG level
VERTEX, // can been set at AM/DAG/VERTEX level
CLIENT, // Client scope - only applicable on client
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/TaskLocationHint.java b/tez-api/src/main/java/org/apache/tez/dag/api/TaskLocationHint.java
index ae35d80bb2..0bec4d6470 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/TaskLocationHint.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/TaskLocationHint.java
@@ -29,7 +29,7 @@
/**
* Describes the placements hints for tasks.
- * The system will make a best-effort attempt to run the tasks
+ * The system will make a best-effort attempt to run the tasks
* close to the specified locations.
*/
@Public
@@ -63,7 +63,7 @@ public String toString() {
private Set hosts;
// Rack names if any to be used
private Set racks;
-
+
private TaskBasedLocationAffinity affinitizedTask;
private TaskLocationHint(String vertexName, int taskIndex) {
@@ -86,7 +86,7 @@ private TaskLocationHint(Set hosts, Set racks) {
}
/**
- * Provide a location hint that affinitizes to the given task in the given vertex. Tez will try
+ * Provide a location hint that affinitizes to the given task in the given vertex. Tez will try
* to run in the same container as the given task or node local to it. Locality may degrade to
* rack local or further depending on cluster resource allocations.
* This is expected to be used only during dynamic optimizations via {@link VertexManagerPlugin}s
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/TezUncheckedException.java b/tez-api/src/main/java/org/apache/tez/dag/api/TezUncheckedException.java
index af798b3484..76d01a8abc 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/TezUncheckedException.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/TezUncheckedException.java
@@ -27,7 +27,7 @@
public class TezUncheckedException extends RuntimeException {
private static final long serialVersionUID = -4956339297375386184L;
-
+
public TezUncheckedException(Throwable cause) { super(cause); }
public TezUncheckedException(String message) { super(message); }
public TezUncheckedException(String message, Throwable cause) {
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/Vertex.java b/tez-api/src/main/java/org/apache/tez/dag/api/Vertex.java
index 309db0a6d9..b02f83c9b5 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/Vertex.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/Vertex.java
@@ -41,9 +41,9 @@
import com.google.common.collect.Maps;
/**
- * Defines a vertex in the DAG. It represents the application logic that
- * processes and transforms the input data to create the output data. The
- * vertex represents the template from which tasks are created to execute
+ * Defines a vertex in the DAG. It represents the application logic that
+ * processes and transforms the input data to create the output data. The
+ * vertex represents the template from which tasks are created to execute
* the application in parallel across a distributed execution environment.
*/
@Public
@@ -72,7 +72,7 @@ public class Vertex {
private final Map groupInputs = Maps.newHashMap();
private final List dataSources = Lists.newLinkedList();
private final List dataSinks = Lists.newLinkedList();
-
+
private String taskLaunchCmdOpts = "";
@InterfaceAudience.Private
@@ -86,12 +86,12 @@ public class Vertex {
private Vertex(String vertexName, ProcessorDescriptor processorDescriptor, int parallelism) {
this(vertexName, processorDescriptor, parallelism, null, true);
}
-
+
private Vertex(String vertexName, ProcessorDescriptor processorDescriptor) {
this(vertexName, processorDescriptor, -1);
}
-
+
private Vertex(String vertexName,
ProcessorDescriptor processorDescriptor,
int parallelism,
@@ -201,15 +201,15 @@ public ProcessorDescriptor getProcessorDescriptor() {
}
/**
- * Get the specified number of tasks specified to run in this vertex. It may
- * be -1 if the parallelism is defined at runtime. Parallelism may change at
+ * Get the specified number of tasks specified to run in this vertex. It may
+ * be -1 if the parallelism is defined at runtime. Parallelism may change at
* runtime
* @return vertex parallelism
*/
public int getParallelism() {
return parallelism;
}
-
+
/**
* Set the number of tasks for this vertex
* @param parallelism Parallelism for this vertex
@@ -227,7 +227,7 @@ public Resource getTaskResource() {
}
/**
- * Specify location hints for the tasks of this vertex. Hints must be specified
+ * Specify location hints for the tasks of this vertex. Hints must be specified
* for all tasks as defined by the parallelism
* @param locationHint list of locations for each task in the vertex
* @return this Vertex
@@ -237,7 +237,7 @@ public Vertex setLocationHint(VertexLocationHint locationHint) {
if (locations == null) {
return this;
}
- Preconditions.checkArgument((locations.size() == parallelism),
+ Preconditions.checkArgument((locations.size() == parallelism),
"Locations array length must match the parallelism set for the vertex");
this.locationHint = locationHint;
return this;
@@ -297,7 +297,7 @@ public Map getConf() {
}
/**
- * Set the command opts for tasks of this vertex. This method should be used
+ * Set the command opts for tasks of this vertex. This method should be used
* when different vertices have different opts. Else, set the launch opts for '
* all vertices via Tezconfiguration#TEZ_TASK_LAUNCH_CMD_OPTS
* @param cmdOpts
@@ -307,23 +307,23 @@ public Vertex setTaskLaunchCmdOpts(String cmdOpts){
this.taskLaunchCmdOpts = cmdOpts;
return this;
}
-
+
/**
* Specifies an external data source for a Vertex. This is meant to be used
* when a Vertex reads Input directly from an external source
- *
+ *
* For vertices which read data generated by another vertex - use the
* {@link DAG addEdge} method.
- *
+ *
* If a vertex needs to use data generated by another vertex in the DAG and
* also from an external source, a combination of this API and the DAG.addEdge
* API can be used.
- *
+ *
* Note: If more than one RootInput exists on a vertex, which generates events
* which need to be routed, or generates information to set parallelism, a
* custom vertex manager should be setup to handle this. Not using a custom
* vertex manager for such a scenario will lead to a runtime failure.
- *
+ *
* @param inputName
* the name of the input. This will be used when accessing the input
* in the {@link LogicalIOProcessor}
@@ -347,14 +347,14 @@ public Vertex addDataSource(String inputName, DataSourceDescriptor dataSourceDes
/**
* Specifies an external data sink for a Vertex. This is meant to be used when
* a Vertex writes Output directly to an external destination.
- *
+ *
* If an output of the vertex is meant to be consumed by another Vertex in the
* DAG - use the {@link DAG addEdge} method.
- *
+ *
* If a vertex needs generate data to an external source as well as for
* another Vertex in the DAG, a combination of this API and the DAG.addEdge
* API can be used.
- *
+ *
* @param outputName
* the name of the output. This will be used when accessing the
* output in the {@link LogicalIOProcessor}
@@ -388,7 +388,7 @@ Vertex addAdditionalDataSink(RootInputLeafOutput getGroupInputs() {
return groupInputs;
}
-
+
void addGroupInput(String groupName, GroupInfo groupInputInfo) {
if (groupInputs.put(groupName, groupInputInfo) != null) {
throw new IllegalStateException(
- "Vertex: " + getName() +
+ "Vertex: " + getName() +
" already has group input with name:" + groupName);
}
}
@@ -633,7 +633,7 @@ void addOutputVertex(Vertex outputVertex, Edge edge) {
outputVertices.add(outputVertex);
outputEdges.add(edge);
}
-
+
/**
* Get the input vertices for this vertex
* @return List of input vertices
@@ -662,7 +662,7 @@ void setTaskResource(Resource resource) {
public List getDataSources() {
return dataSources;
}
-
+
@Private
public List getDataSinks() {
return dataSinks;
@@ -680,7 +680,7 @@ List getInputEdges() {
List getOutputEdges() {
return outputEdges;
}
-
+
List> getInputs() {
return Lists.newArrayList(additionalInputs.values());
}
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/VertexGroup.java b/tez-api/src/main/java/org/apache/tez/dag/api/VertexGroup.java
index 8041b34a9c..15060fcc1e 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/VertexGroup.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/VertexGroup.java
@@ -28,13 +28,13 @@
import com.google.common.collect.Sets;
/**
- * Represents a virtual collection of vertices whose members can be treated as a single
+ * Represents a virtual collection of vertices whose members can be treated as a single
* named collection for graph operations. Only the following connections are valid.
- * A VertexGroup can be connected as an input to a consumer Vertex. The tasks of
- * the destination vertex see a single input named after the VertexGroup instead
- * multiple inputs from the members of the VertexGroup.
+ * A VertexGroup can be connected as an input to a consumer Vertex. The tasks of
+ * the destination vertex see a single input named after the VertexGroup instead
+ * multiple inputs from the members of the VertexGroup.
* An output can be added to a VertexGroup.
- * All outgoing edges & outputs of a VertexGroup are automatically transferred to the
+ * All outgoing edges & outputs of a VertexGroup are automatically transferred to the
* member vertices of the VertexGroup.
* A VertexGroup is not part of the final DAG.
*/
@@ -47,7 +47,7 @@ static class GroupInfo {
Set outputs = new HashSet();
// destination vertex name to merged input map
Map edgeMergedInputs = Maps.newHashMap();
-
+
GroupInfo(String groupName, Vertex... vertices) {
this.groupName = groupName;
members = Sets.newHashSetWithExpectedSize(vertices.length);
@@ -65,9 +65,9 @@ Set getOutputs() {
return outputs;
}
}
-
+
GroupInfo groupInfo;
-
+
/**
* Create an object representing a group of vertices
* @param groupName name of the group
@@ -86,26 +86,26 @@ Set getOutputs() {
public String getGroupName() {
return groupInfo.groupName;
}
-
+
/**
* Add an common data sink to the group of vertices.
* Refer to {@link Vertex#addDataSink(String, DataSinkDescriptor)}
* @return this object for further chained method calls
*/
public VertexGroup addDataSink(String outputName, DataSinkDescriptor dataSinkDescriptor) {
- RootInputLeafOutput leafOutput =
+ RootInputLeafOutput leafOutput =
new RootInputLeafOutput(outputName,
dataSinkDescriptor.getOutputDescriptor(), dataSinkDescriptor.getOutputCommitterDescriptor());
this.groupInfo.outputs.add(outputName);
-
+
// also add output to its members
for (Vertex member : getMembers()) {
member.addAdditionalDataSink(leafOutput);
}
-
+
return this;
}
-
+
@Override
public String toString() {
return "[ VertexGroup: " + groupInfo.getGroupName() + "]" + ", members=" + groupInfo.members;
@@ -114,15 +114,15 @@ public String toString() {
GroupInfo getGroupInfo() {
return groupInfo;
}
-
+
Set getMembers() {
return groupInfo.members;
}
-
+
void addOutputVertex(Vertex outputVertex, GroupInputEdge edge) {
this.groupInfo.edgeMergedInputs.put(outputVertex.getName(), edge.getMergedInput());
}
-
+
@Override
public int hashCode() {
final int prime = 31;
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/VertexLocationHint.java b/tez-api/src/main/java/org/apache/tez/dag/api/VertexLocationHint.java
index c020dd230b..b36b41d314 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/VertexLocationHint.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/VertexLocationHint.java
@@ -25,7 +25,7 @@
/**
* Describes the placements hints for tasks in a vertex.
- * The system will make a best-effort attempt to run the tasks
+ * The system will make a best-effort attempt to run the tasks
* close to the specified locations.
*/
@Public
@@ -33,7 +33,7 @@ public class VertexLocationHint {
private final List taskLocationHints;
-
+
private VertexLocationHint(List taskLocationHints) {
if (taskLocationHints != null) {
this.taskLocationHints = Collections.unmodifiableList(taskLocationHints);
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPlugin.java b/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPlugin.java
index b66a66ac55..0a1ac5d421 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPlugin.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPlugin.java
@@ -31,7 +31,7 @@
import org.apache.tez.runtime.api.events.VertexManagerEvent;
/**
- * Interface to plugin user logic into the VertexManager to implement runtime
+ * Interface to plugin user logic into the VertexManager to implement runtime
* scheduling optimizations and graph reconfiguration.
* The plugin will be notified of interesting events in the vertex execution life
* cycle and can respond to them by via the context object
@@ -46,7 +46,7 @@ public abstract class VertexManagerPlugin {
* Crete an instance of the VertexManagerPlugin. Classes extending this to
* create a VertexManagerPlugin, must provide the same constructor so that Tez
* can create an instance of the class at runtime.
- *
+ *
* @param context
* vertex manager plugin context which can be used to access the
* payload, vertex properties, etc
@@ -56,7 +56,7 @@ public VertexManagerPlugin(VertexManagerPluginContext context) {
}
/**
- * Initialize the plugin. Called when the vertex is initializing. This happens
+ * Initialize the plugin. Called when the vertex is initializing. This happens
* after all source vertices and inputs have initialized
* @throws Exception
*/
@@ -91,10 +91,10 @@ public void onVertexStarted(List completions) throws Exce
}
onVertexStarted(completionsMap);
}
-
+
@Deprecated
/**
- * This has been replaced by
+ * This has been replaced by
* {@link VertexManagerPlugin#onSourceTaskCompleted(TaskAttemptIdentifier)}
* Notification of a source vertex completion.
* @param srcVertexName
@@ -111,7 +111,7 @@ public void onSourceTaskCompleted(String srcVertexName, Integer taskId) throws E
* @throws Exception
*/
public void onSourceTaskCompleted(TaskAttemptIdentifier attempt) throws Exception {
- onSourceTaskCompleted(attempt.getTaskIdentifier().getVertexIdentifier().getName(),
+ onSourceTaskCompleted(attempt.getTaskIdentifier().getVertexIdentifier().getName(),
attempt.getTaskIdentifier().getIdentifier());
}
@@ -141,7 +141,7 @@ public abstract void onRootVertexInitialized(String inputName,
public final VertexManagerPluginContext getContext() {
return this.context;
}
-
+
/**
* Receive notifications on vertex state changes.
*
@@ -150,9 +150,9 @@ public final VertexManagerPluginContext getContext() {
* . Notifications will be received for all registered state changes, and not
* just for the latest state update. They will be in order in which the state
* change occurred.
- * This method may be invoked concurrently with {@link #onVertexStarted(Map)} etc. and
+ * This method may be invoked concurrently with {@link #onVertexStarted(Map)} etc. and
* multi-threading/concurrency implications must be considered.
- *
+ *
* @param stateUpdate
* an event indicating the name of the vertex, and it's updated
* state. Additional information may be available for specific
@@ -160,5 +160,5 @@ public final VertexManagerPluginContext getContext() {
* {@link org.apache.tez.dag.api.event.VertexStateUpdate}
*/
public void onVertexStateUpdated(VertexStateUpdate stateUpdate) throws Exception {
- }
+ }
}
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginContext.java b/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginContext.java
index 564115bfea..814bcc10f0 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginContext.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginContext.java
@@ -42,30 +42,30 @@
@Unstable
@Public
public interface VertexManagerPluginContext {
-
+
public class ScheduleTaskRequest {
int taskIndex;
TaskLocationHint locationHint;
public static ScheduleTaskRequest create(int taskIndex, @Nullable TaskLocationHint locationHint) {
- return new ScheduleTaskRequest(taskIndex, locationHint);
+ return new ScheduleTaskRequest(taskIndex, locationHint);
}
-
+
private ScheduleTaskRequest(int taskIndex, @Nullable TaskLocationHint locationHint) {
Preconditions.checkState(taskIndex >= 0);
this.taskIndex = taskIndex;
this.locationHint = locationHint;
}
-
+
public int getTaskIndex() {
return taskIndex;
}
-
+
public TaskLocationHint getTaskLocationHint() {
return locationHint;
- }
+ }
}
-
+
@Deprecated
public class TaskWithLocationHint {
Integer taskIndex;
@@ -74,30 +74,30 @@ public TaskWithLocationHint(Integer taskIndex, @Nullable TaskLocationHint locati
this.taskIndex = Objects.requireNonNull(taskIndex);
this.locationHint = locationHint;
}
-
+
public Integer getTaskIndex() {
return taskIndex;
}
-
+
public TaskLocationHint getTaskLocationHint() {
return locationHint;
}
}
/**
- * Get the edge properties on the input edges of this vertex. The input edge
+ * Get the edge properties on the input edges of this vertex. The input edge
* is represented by the source vertex name
* @return Map of source vertex name and edge property
*/
public Map getInputVertexEdgeProperties();
-
+
/**
- * Get the edge properties on the output edges of this vertex. The output edge
+ * Get the edge properties on the output edges of this vertex. The output edge
* is represented by the destination vertex name
* @return Map of destination vertex name and edge property
*/
public Map getOutputVertexEdgeProperties();
-
+
/**
* Get a {@link VertexStatistics} object to find out execution statistics
* about the given {@link Vertex}.
@@ -115,45 +115,45 @@ public TaskLocationHint getTaskLocationHint() {
* @return Vertex name
*/
public String getVertexName();
-
+
/**
* Get the payload set for the plugin
* @return user payload
*/
public UserPayload getUserPayload();
-
+
/**
* Get the number of tasks in the given vertex
* @param vertexName
* @return Total number of tasks in this vertex
*/
public int getVertexNumTasks(String vertexName);
-
+
/**
* Get the resource allocated to a task of this vertex
* @return Resource
*/
Resource getVertexTaskResource();
-
+
/**
- * Get the total resource allocated to this vertex. If the DAG is running in
+ * Get the total resource allocated to this vertex. If the DAG is running in
* a busy cluster then it may have no resources available dedicated to it. The
* DAG may divide its available resource among member vertices.
* @return Resource
*/
Resource getTotalAvailableResource();
-
+
/**
* Get the number of nodes in the cluster
* @return Number of nodes
*/
int getNumClusterNodes();
-
+
/**
* Set the new parallelism (number of tasks) of this vertex,
* Map of source (input) vertices and edge managers to change the event routing
* between the source tasks and the new destination tasks and the number of physical inputs for root inputs.
- * This API can change the parallelism only once. Subsequent attempts will be
+ * This API can change the parallelism only once. Subsequent attempts will be
* disallowed
* @param parallelism New number of tasks in the vertex
* @param locationHint the placement policy for tasks.
@@ -184,7 +184,7 @@ public void setVertexParallelism(int parallelism,
* times until any of the tasks of the vertex have been scheduled (by invoking
* {@link #scheduleTasks(List)}. If needed, the original source edge
* properties may be obtained via {@link #getInputVertexEdgeProperties()}
- *
+ *
* @param parallelism
* New number of tasks in the vertex
* @param locationHint
@@ -204,7 +204,7 @@ public void reconfigureVertex(int parallelism,
@Nullable VertexLocationHint locationHint,
@Nullable Map sourceEdgeProperties,
@Nullable Map rootInputSpecUpdate);
-
+
/**
* API to reconfigure a {@link Vertex} by changing its task parallelism. Task
* parallelism is often accompanied by changing the {@link EdgeProperty} of
@@ -214,7 +214,7 @@ public void reconfigureVertex(int parallelism,
* times until any of the tasks of the vertex have been scheduled (by invoking
* {@link #scheduleTasks(List)}. If needed, the original source edge
* properties may be obtained via {@link #getInputVertexEdgeProperties()}
- *
+ *
* @param parallelism
* New number of tasks in the vertex
* @param locationHint
@@ -222,7 +222,7 @@ public void reconfigureVertex(int parallelism,
* {@link VertexLocationHint}s
* @param sourceEdgeProperties
* Map with Key=name of {@link Edge} to be updated and Value=
- * {@link EdgeProperty}. The name of the Edge will be the
+ * {@link EdgeProperty}. The name of the Edge will be the
* corresponding source vertex name.
*/
public void reconfigureVertex(int parallelism,
@@ -256,10 +256,10 @@ public void reconfigureVertex(@Nullable Map rootInputSp
/**
* Allows a VertexManagerPlugin to assign Events for Root Inputs
- *
+ *
* For regular Event Routing changes - the EdgeManager should be configured
* via the setVertexParallelism method
- *
+ *
* @param inputName
* The input name associated with the event
* @param events
@@ -279,7 +279,7 @@ public void reconfigureVertex(@Nullable Map rootInputSp
* @param taskId id of a task of managed vertex
*/
public void sendEventToProcessor(Collection events, int taskId);
-
+
@Deprecated
/**
* Replaced by {@link #scheduleTasks(List)}
@@ -287,7 +287,7 @@ public void reconfigureVertex(@Nullable Map rootInputSp
* @param tasks Indices of the tasks to be started
*/
public void scheduleVertexTasks(List tasks);
-
+
/**
* Notify the vertex to schedule the given tasks
* @param tasks Identifier and metadata for the tasks to schedule
@@ -295,7 +295,7 @@ public void reconfigureVertex(@Nullable Map rootInputSp
public void scheduleTasks(List tasks);
/**
- * Get the names of the non-vertex inputs of this vertex. These are primary
+ * Get the names of the non-vertex inputs of this vertex. These are primary
* sources of data.
* @return Names of inputs to this vertex. Maybe null if there are no inputs
*/
@@ -304,7 +304,7 @@ public void reconfigureVertex(@Nullable Map rootInputSp
/**
* Set the placement hint for tasks in this vertex
- *
+ *
* @param locationHint
*/
public void setVertexLocationHint(VertexLocationHint locationHint);
@@ -313,7 +313,7 @@ public void reconfigureVertex(@Nullable Map rootInputSp
* @return DAG Attempt number
*/
public int getDAGAttemptNumber();
-
+
/**
* Register to get notifications on updates to the specified vertex. Notifications will be sent
* via {@link VertexManagerPlugin#onVertexStateUpdated(org.apache.tez.dag.api.event.VertexStateUpdate)}
@@ -324,7 +324,7 @@ public void reconfigureVertex(@Nullable Map rootInputSp
* @param stateSet the set of states for which notifications are required. null implies all
*/
void registerForVertexStateUpdates(String vertexName, @Nullable Set stateSet);
-
+
/**
* Optional API. No need to call this when the vertex is not fully defined to
* start with. E.g. vertex parallelism is not defined, or edges are not
@@ -343,13 +343,13 @@ public void reconfigureVertex(@Nullable Map rootInputSp
* reconfiguration.
*/
public void vertexReconfigurationPlanned();
-
+
/**
- * Optional API. This needs to be called only if {@link #vertexReconfigurationPlanned()} has been
+ * Optional API. This needs to be called only if {@link #vertexReconfigurationPlanned()} has been
* invoked. This must be called after {@link #vertexReconfigurationPlanned()} is called.
*/
public void doneReconfiguringVertex();
-
+
/**
* Optional API. This API can be invoked to declare that the
* {@link VertexManagerPlugin} is done with its work. After this the system
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginDescriptor.java b/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginDescriptor.java
index 687f517d99..87d4938caf 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginDescriptor.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/VertexManagerPluginDescriptor.java
@@ -22,7 +22,7 @@
import org.apache.hadoop.classification.InterfaceAudience.Public;
/**
- * Describes the {@link VertexManagerPlugin}
+ * Describes the {@link VertexManagerPlugin}
*/
@Public
public class VertexManagerPluginDescriptor extends EntityDescriptor {
@@ -31,7 +31,7 @@ public class VertexManagerPluginDescriptor extends EntityDescriptorEnumSet.of(StatusGetOpts.GET_COUNTERS)
* @return Final DAG Status
* @throws IOException
* @throws TezException
- * @throws InterruptedException
+ * @throws InterruptedException
*/
public abstract DAGStatus waitForCompletionWithStatusUpdates(@Nullable Set statusGetOpts)
throws IOException, TezException, InterruptedException;
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/client/DAGClientInternal.java b/tez-api/src/main/java/org/apache/tez/dag/api/client/DAGClientInternal.java
index 8346d53da7..ead1134097 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/client/DAGClientInternal.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/client/DAGClientInternal.java
@@ -104,24 +104,24 @@ public abstract VertexStatus getVertexStatus(String vertexName,
/**
* Wait for DAG to complete without printing any vertex statuses
- *
+ *
* @return Final DAG Status
* @throws IOException
* @throws TezException
- * @throws InterruptedException
+ * @throws InterruptedException
*/
public abstract DAGStatus waitForCompletion() throws IOException, TezException, InterruptedException;
/**
* Wait for DAG to complete and periodically print *all* vertices' status.
- *
+ *
* @param statusGetOpts
* : status get options. For example, to get counter pass
* EnumSet.of(StatusGetOpts.GET_COUNTERS)
* @return Final DAG Status
* @throws IOException
* @throws TezException
- * @throws InterruptedException
+ * @throws InterruptedException
*/
public abstract DAGStatus waitForCompletionWithStatusUpdates(@Nullable Set statusGetOpts)
throws IOException, TezException, InterruptedException;
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/client/DAGStatus.java b/tez-api/src/main/java/org/apache/tez/dag/api/client/DAGStatus.java
index ac42da04cc..cf562a4f46 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/client/DAGStatus.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/client/DAGStatus.java
@@ -174,8 +174,8 @@ public boolean equals(Object obj) {
&& getDiagnostics().equals(other.getDiagnostics())
&& getDAGProgress().equals(other.getDAGProgress())
&& getVertexProgress().equals(other.getVertexProgress())
- &&
- ((getDAGCounters() == null && other.getDAGCounters() == null)
+ &&
+ ((getDAGCounters() == null && other.getDAGCounters() == null)
|| getDAGCounters().equals(other.getDAGCounters()));
}
return false;
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/client/Progress.java b/tez-api/src/main/java/org/apache/tez/dag/api/client/Progress.java
index 656838dc5a..82fdadfe8a 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/client/Progress.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/client/Progress.java
@@ -28,13 +28,13 @@
@Public
@Evolving
public class Progress {
-
+
ProgressProtoOrBuilder proxy = null;
-
+
Progress(ProgressProtoOrBuilder proxy) {
this.proxy = proxy;
}
-
+
public int getTotalTaskCount() {
return proxy.getTotalTaskCount();
}
@@ -71,7 +71,7 @@ public int getRejectedTaskAttemptCount() {
public boolean equals(Object obj) {
if (obj instanceof Progress){
Progress other = (Progress)obj;
- return getTotalTaskCount() == other.getTotalTaskCount()
+ return getTotalTaskCount() == other.getTotalTaskCount()
&& getSucceededTaskCount() == other.getSucceededTaskCount()
&& getRunningTaskCount() == other.getRunningTaskCount()
&& getFailedTaskCount() == other.getFailedTaskCount()
@@ -114,9 +114,9 @@ public String toString() {
sb.append(getSucceededTaskCount());
sb.append(" Running: ");
sb.append(getRunningTaskCount());
- sb.append(" Failed: ");
+ sb.append(" Failed: ");
sb.append(getFailedTaskCount());
- sb.append(" Killed: ");
+ sb.append(" Killed: ");
sb.append(getKilledTaskCount());
if (getFailedTaskAttemptCount() > 0) {
sb.append(" FailedTaskAttempts: ");
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/client/VertexStatus.java b/tez-api/src/main/java/org/apache/tez/dag/api/client/VertexStatus.java
index 42edc7f096..4427cfd5fe 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/client/VertexStatus.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/client/VertexStatus.java
@@ -118,7 +118,7 @@ public TezCounters getVertexCounters() {
countersInitialized.set(true);
return vertexCounters;
}
-
+
@Override
public boolean equals(Object obj) {
if (obj instanceof VertexStatus){
@@ -126,8 +126,8 @@ public boolean equals(Object obj) {
return getState().equals(other.getState())
&& getDiagnostics().equals(other.getDiagnostics())
&& getProgress().equals(other.getProgress())
- &&
- ((getVertexCounters() == null && other.getVertexCounters() == null)
+ &&
+ ((getVertexCounters() == null && other.getVertexCounters() == null)
|| getVertexCounters().equals(other.getVertexCounters()));
}
return false;
diff --git a/tez-api/src/main/java/org/apache/tez/dag/api/client/rpc/DAGClientAMProtocolBlockingPB.java b/tez-api/src/main/java/org/apache/tez/dag/api/client/rpc/DAGClientAMProtocolBlockingPB.java
index 9d7ebeefee..252e5752d2 100644
--- a/tez-api/src/main/java/org/apache/tez/dag/api/client/rpc/DAGClientAMProtocolBlockingPB.java
+++ b/tez-api/src/main/java/org/apache/tez/dag/api/client/rpc/DAGClientAMProtocolBlockingPB.java
@@ -26,7 +26,7 @@
@ProtocolInfo(
protocolName = "org.apache.tez.dag.api.client.rpc.DAGClientAMProtocolBlockingPB",
protocolVersion = 1)
-public interface DAGClientAMProtocolBlockingPB
+public interface DAGClientAMProtocolBlockingPB
extends DAGClientAMProtocol.BlockingInterface {
}
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalIOProcessor.java b/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalIOProcessor.java
index 5a4cbe8113..b3ccaa8c9e 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalIOProcessor.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/AbstractLogicalIOProcessor.java
@@ -21,7 +21,7 @@
/**
* Abstract representation of the interface {@link LogicalIOProcessor}.
- * Implements the base logic of some methods into this class and is expected
+ * Implements the base logic of some methods into this class and is expected
* to be the base class that is derived to implement the user {@link Processor}
*
*/
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/DagIdentifier.java b/tez-api/src/main/java/org/apache/tez/runtime/api/DagIdentifier.java
index dd63b4cfa1..eadcb86e17 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/DagIdentifier.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/DagIdentifier.java
@@ -21,6 +21,6 @@
public interface DagIdentifier {
public String getName();
-
+
public int getIdentifier();
}
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/InputContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/InputContext.java
index 6eac2dfc95..ade9f7125e 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/InputContext.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/InputContext.java
@@ -38,21 +38,21 @@ public interface InputContext extends TaskContext {
* @return the convenient string
*/
String getInputOutputVertexNames();
-
+
/**
- * Get the index of the input in the set of all inputs for the task. The
+ * Get the index of the input in the set of all inputs for the task. The
* index will be consistent and valid only among the tasks of this vertex.
* @return index
*/
public int getInputIndex();
-
+
/**
* Inform the framework that the specific Input is ready for consumption.
- *
+ *
* This method can be invoked multiple times.
*/
public void inputIsReady();
-
+
/**
* Get an {@link InputStatisticsReporter} for this {@link Input} that can
* be used to report statistics like data size
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/InputFrameworkInterface.java b/tez-api/src/main/java/org/apache/tez/runtime/api/InputFrameworkInterface.java
index 7f0a1d995f..d0c4227714 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/InputFrameworkInterface.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/InputFrameworkInterface.java
@@ -41,7 +41,7 @@
* This typically means that the Processor will not block when reading from the
* corresponding Input. This is done via {@link InputContext}.inputIsReady.
* Inputs choose the policy on when they are ready.
- *
+ *
* Input implementations are expected to derive from {@link AbstractLogicalInput}
*/
@Public
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializer.java b/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializer.java
index ec87fe1e39..24013f2a9b 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializer.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializer.java
@@ -56,7 +56,7 @@ public InputInitializer(InputInitializerContext initializerContext) {
* processing the event being done via this method. The moment this method
* returns a list of events, input initialization is considered to be
* complete.
- *
+ *
* @return a list of events which are eventually routed to a
* {@link org.apache.tez.dag.api.VertexManagerPlugin} for routing
* @throws Exception
@@ -79,7 +79,7 @@ public abstract void handleInputInitializerEvent(List eve
/**
* Return ahe {@link org.apache.tez.runtime.api.InputInitializerContext}
* for this specific instance of the Initializer.
- *
+ *
* @return the {@link org.apache.tez.runtime.api.InputInitializerContext}
* for the initializer
*/
@@ -97,7 +97,7 @@ public final InputInitializerContext getContext() {
*
* Extensive processing should not be performed via this method call. Instead this should just be
* used as a notification mechanism to the main initialization, which is via the initialize method.
- * This method may be invoked concurrently with {@link #initialize()} etc. and
+ * This method may be invoked concurrently with {@link #initialize()} etc. and
* multi-threading/concurrency implications must be considered.
* @param stateUpdate an event indicating the name of the vertex, and it's updated state.
* Additional information may be available for specific events, Look at the
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializerContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializerContext.java
index 680492266c..46786812b4 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializerContext.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/InputInitializerContext.java
@@ -43,7 +43,7 @@ public interface InputInitializerContext {
* @return Application id
*/
ApplicationId getApplicationId();
-
+
/**
* Get the name of the DAG
* @return DAG name
@@ -67,20 +67,20 @@ public interface InputInitializerContext {
* @return User payload
*/
UserPayload getInputUserPayload();
-
+
/**
* Get the user payload for the initializer
* @return User payload
*/
UserPayload getUserPayload();
-
+
/**
* Get the number of tasks in this vertex. Maybe -1 if the vertex has not been
* initialized with a pre-determined number of tasks.
* @return number of tasks
*/
int getNumTasks();
-
+
/**
* Get the resource allocated to a task of this vertex
* @return Resource
@@ -93,13 +93,13 @@ public interface InputInitializerContext {
int getVertexId();
/**
- * Get the total resource allocated to this vertex. If the DAG is running in
+ * Get the total resource allocated to this vertex. If the DAG is running in
* a busy cluster then it may have no resources available dedicated to it. The
* DAG may divide its resources among member vertices.
* @return Resource
*/
Resource getTotalAvailableResource();
-
+
/**
* Get the number of nodes in the cluster
* @return Number of nodes
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/InputSpecUpdate.java b/tez-api/src/main/java/org/apache/tez/runtime/api/InputSpecUpdate.java
index c6bbba7090..736de70a3f 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/InputSpecUpdate.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/InputSpecUpdate.java
@@ -31,7 +31,7 @@
* Update Input specs for Inputs running in a task. Allows setting the number of physical
* inputs for all work units if they have the same number of physical inputs, or individual
* numPhysicalInputs for each work unit.
- *
+ *
*/
@Unstable
@Public
@@ -41,11 +41,11 @@ public class InputSpecUpdate {
private final List numPhysicalInputs;
private final static InputSpecUpdate DEFAULT_SINGLE_PHYSICAL_INPUT_SPEC = createAllTaskInputSpecUpdate(1);
-
+
/**
* Create an update instance where all work units (typically represented by
* {@link InputDataInformationEvent}) will have the same number of physical inputs.
- *
+ *
* @param numPhysicalInputs
* the number of physical inputs for all work units which will use the LogicalInput
* @return a new InputSpecUpdate instance given the parameters
@@ -57,7 +57,7 @@ public static InputSpecUpdate createAllTaskInputSpecUpdate(int numPhysicalInputs
/**
* Create an update instance where all work units (typically represented by
* {@link InputDataInformationEvent}) will have the same number of physical inputs.
- *
+ *
* @param perWorkUnitNumPhysicalInputs
* A list containing one entry per work unit. The order in the list corresponds to task
* index or equivalently the order of {@link InputDataInformationEvent}s being sent.
@@ -67,7 +67,7 @@ public static InputSpecUpdate createPerTaskInputSpecUpdate(
List perWorkUnitNumPhysicalInputs) {
return new InputSpecUpdate(perWorkUnitNumPhysicalInputs);
}
-
+
public static InputSpecUpdate getDefaultSinglePhysicalInputSpecUpdate() {
return DEFAULT_SINGLE_PHYSICAL_INPUT_SPEC;
}
@@ -90,13 +90,13 @@ public int getNumPhysicalInputsForWorkUnit(int index) {
return numPhysicalInputs.get(index);
}
}
-
+
@Private
/* Used for recovery serialization */
public boolean isForAllWorkUnits() {
return this.forAllWorkUnits;
}
-
+
@Private
/* Used for recovery serialization */
public List getAllNumPhysicalInputs() {
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/InputStatistics.java b/tez-api/src/main/java/org/apache/tez/runtime/api/InputStatistics.java
index 1066dbb861..1cc176027d 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/InputStatistics.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/InputStatistics.java
@@ -30,20 +30,20 @@
@Public
@Evolving
public interface InputStatistics {
-
+
/**
* Returns the data size associated with this logical input
* It is the size of the data read from this input by the vertex.
* @return Data size in bytes
*/
public long getDataSize();
-
+
/**
* Get the numbers of items processed. These could be key-value pairs, table
* records etc.
- *
+ *
* @return Number of items processed
*/
public long getItemsProcessed();
-
+
}
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/InputStatisticsReporter.java b/tez-api/src/main/java/org/apache/tez/runtime/api/InputStatisticsReporter.java
index a85d25b9bd..7c6b163e8b 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/InputStatisticsReporter.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/InputStatisticsReporter.java
@@ -37,11 +37,11 @@ public interface InputStatisticsReporter {
/**
* Report the number of items processed. These could be key-value pairs, table
* records etc.
- *
+ *
* @param items
* number of items
*/
public void reportItemsProcessed(long items);
-
+
}
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/LogicalIOProcessorFrameworkInterface.java b/tez-api/src/main/java/org/apache/tez/runtime/api/LogicalIOProcessorFrameworkInterface.java
index edae2f8b81..336e59725c 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/LogicalIOProcessorFrameworkInterface.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/LogicalIOProcessorFrameworkInterface.java
@@ -32,7 +32,7 @@ public interface LogicalIOProcessorFrameworkInterface extends ProcessorFramework
/**
* Runs the {@link Processor}
- *
+ *
* @param inputs
* a map of the source vertex name to {@link LogicalInput} - one per
* incoming edge.
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/LogicalInput.java b/tez-api/src/main/java/org/apache/tez/runtime/api/LogicalInput.java
index 9f10d0bef5..f47c92f786 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/LogicalInput.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/LogicalInput.java
@@ -25,7 +25,7 @@
* edge. A {@link LogicalIOProcessor} sees a single Logical Input per incoming
* edge. It provides a unified view that hides the details of the actual physical
* inputs
- *
+ *
* User implementations are expected to derive from {@link AbstractLogicalInput}
*/
@Public
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/LogicalOutput.java b/tez-api/src/main/java/org/apache/tez/runtime/api/LogicalOutput.java
index 29221895d6..01a8412127 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/LogicalOutput.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/LogicalOutput.java
@@ -23,7 +23,7 @@
/**
* An @link {@link Output} which handles all outgoing physical connections on an
* edge. A {@link LogicalIOProcessor} sees a single Logical Output per outgoing
- * edge. It's expected to hide the details of output partitioning and physical
+ * edge. It's expected to hide the details of output partitioning and physical
* outputs from the {@link Processor}
* Users are expected to derive from {@link AbstractLogicalOutput}
*/
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/MemoryUpdateCallback.java b/tez-api/src/main/java/org/apache/tez/runtime/api/MemoryUpdateCallback.java
index 1f304b380f..4eef0c16aa 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/MemoryUpdateCallback.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/MemoryUpdateCallback.java
@@ -24,9 +24,9 @@
/**
* This interface will be used by Tez to inform components about available
* memory. This will typically be implemented by authors of {@link Input}s,
- * {@link Output}s and potentially {@link Processor}s in order to request
+ * {@link Output}s and potentially {@link Processor}s in order to request
* for appropriate memory limits for the respective components.
- *
+ *
*/
@Unstable
@Public
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/MergedInputContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/MergedInputContext.java
index 65bb087c7a..58edac8b74 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/MergedInputContext.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/MergedInputContext.java
@@ -33,19 +33,19 @@ public interface MergedInputContext {
* @return {@link UserPayload}
*/
public UserPayload getUserPayload();
-
+
/**
* Inform the framework that the specific Input is ready for consumption.
- *
+ *
* This method can be invoked multiple times.
*/
public void inputIsReady();
-
+
/**
* Inform the framework that progress has been made
*/
public void notifyProgress();
-
+
/**
* Get the work directories for the Input
* @return an array of work dirs
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/MergedLogicalInput.java b/tez-api/src/main/java/org/apache/tez/runtime/api/MergedLogicalInput.java
index d10954c62b..2179654085 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/MergedLogicalInput.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/MergedLogicalInput.java
@@ -65,11 +65,11 @@ public MergedLogicalInput(MergedInputContext context, List inputs) {
public final List getInputs() {
return inputs;
}
-
+
public final MergedInputContext getContext() {
return context;
}
-
+
@Override
public final void start() throws Exception {
if (!isStarted.getAndSet(true)) {
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/ObjectRegistry.java b/tez-api/src/main/java/org/apache/tez/runtime/api/ObjectRegistry.java
index a280942225..0ef5eae029 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/ObjectRegistry.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/ObjectRegistry.java
@@ -42,7 +42,7 @@ public interface ObjectRegistry {
* as there is only one instance of an Object stored for a given key
* irrespective of the life-cycle attached to the Object. The object may stay
* in the cache while the Vertex (to which the task belongs) is running.
- *
+ *
* @param key
* Key to identify the Object
* @param value
@@ -50,16 +50,16 @@ public interface ObjectRegistry {
* @return Previous Object associated with the key attached if present else
* null. Could return the same object if the object was associated
* with the same key for a different life-cycle.
- */
+ */
public Object cacheForVertex(String key, Object value);
-
+
/**
* Insert or update object into the registry with DAG life-cycle. This will
* remove an object associated with the same key with a different life-cycle
* as there is only one instance of an Object stored for a given key
* irrespective of the life-cycle attached to the Object. The object may stay
* in the cache while the DAG (to which the task belongs) is running.
- *
+ *
* @param key
* Key to identify the Object
* @param value
@@ -67,16 +67,16 @@ public interface ObjectRegistry {
* @return Previous Object associated with the key attached if present else
* null. Could return the same object if the object was associated
* with the same key for a different life-cycle.
- */
+ */
public Object cacheForDAG(String key, Object value);
-
+
/**
* Insert or update object into the registry with Session life-cycle. This
* will remove an object associated with the same key with a different
* life-cycle as there is only one instance of an Object stored for a given
* key irrespective of the life-cycle attached to the Object. The object may stay
* in the cache while the Session (to which the task belongs) is running.
- *
+ *
* @param key
* Key to identify the Object
* @param value
@@ -84,7 +84,7 @@ public interface ObjectRegistry {
* @return Previous Object associated with the key attached if present else
* null. Could return the same object if the object was associated
* with the same key for a different life-cycle.
- */
+ */
public Object cacheForSession(String key, Object value);
/**
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/Output.java b/tez-api/src/main/java/org/apache/tez/runtime/api/Output.java
index 9125c0d940..e0e75a280c 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/Output.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/Output.java
@@ -26,7 +26,7 @@
*
* This interface has methods which can be used by a {@link org.apache.tez.runtime.api.Processor}
* to control execution of this Output and write data to it.
- *
+ *
* Users are expected to derive from {@link AbstractLogicalOutput}
*
*/
@@ -38,16 +38,16 @@ public interface Output {
/**
* Start any processing that the Output may need to perform. It is the
* responsibility of the Processor to start Outputs.
- *
+ *
* This typically acts as a signal to Outputs to start any Processing that they
* may required.
- *
+ *
* This method may be invoked by the framework under certain circumstances,
- * and as such requires the implementation to be non-blocking.
- *
+ * and as such requires the implementation to be non-blocking.
+ *
* Outputs must be written to handle multiple start invocations - typically
* honoring only the first one.
- *
+ *
* @throws Exception
*/
public void start() throws Exception;
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitter.java b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitter.java
index c8f7f5c1f2..b45bca011c 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitter.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitter.java
@@ -67,7 +67,7 @@ public OutputCommitter(OutputCommitterContext committerContext) {
* master process. Based on user configuration, commit is called at the end of
* the DAG execution for all outputs or immediately upon completion of all the
* tasks that produced the output. This is guaranteed to only be called once.
- *
+ *
* @throws java.lang.Exception
*/
public abstract void commitOutput() throws Exception;
@@ -77,7 +77,7 @@ public OutputCommitter(OutputCommitterContext committerContext) {
* non-successful state. This is also called to abort a previously committed
* output in the case of a post-commit failure. This is called from the
* application master process. This may be called multiple times.
- *
+ *
* @param finalState
* final run-state of the vertex
* @throws java.lang.Exception
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitterContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitterContext.java
index 5b8906d520..38ea21628c 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitterContext.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputCommitterContext.java
@@ -71,7 +71,7 @@ public interface OutputCommitterContext {
* @return User Payload
*/
public UserPayload getUserPayload();
-
+
/**
* Get Vertex Index in the DAG
* @return Vertex index
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputContext.java
index f0de897fda..211043863e 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputContext.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputContext.java
@@ -42,12 +42,12 @@ public interface OutputContext extends TaskContext {
String getInputOutputVertexNames();
/**
- * Get the index of the output in the set of all outputs for the task. The
+ * Get the index of the output in the set of all outputs for the task. The
* index will be consistent and valid only among the tasks of this vertex.
* @return index
*/
int getOutputIndex();
-
+
/**
* Get an {@link OutputStatisticsReporter} for this {@link Output} that can
* be used to report statistics like data size
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputFrameworkInterface.java b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputFrameworkInterface.java
index 617deee914..71e62df87a 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputFrameworkInterface.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputFrameworkInterface.java
@@ -34,7 +34,7 @@
* During initialization, Outputs must specify an initial memory requirement via
* {@link OutputContext}.requestInitialMemory
*
- *
+ *
* Users are expected to derive from {@link AbstractLogicalOutput}
*
*/
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputStatistics.java b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputStatistics.java
index 2f18a03634..da1f53045a 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputStatistics.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputStatistics.java
@@ -31,18 +31,18 @@
@Public
@Evolving
public interface OutputStatistics {
-
+
/**
* Returns the data size associated with this logical output
* It is the size of the data written to this output by the vertex.
* @return Data size in bytes
*/
public long getDataSize();
-
+
/**
* Get the numbers of items processed. These could be key-value pairs, table
* records etc.
- *
+ *
* @return Number of items processed
*/
public long getItemsProcessed();
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputStatisticsReporter.java b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputStatisticsReporter.java
index 1931e5cae3..a8b0e34623 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/OutputStatisticsReporter.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/OutputStatisticsReporter.java
@@ -37,7 +37,7 @@ public interface OutputStatisticsReporter {
/**
* Report the number of items processed. These could be key-value pairs, table
* records etc.
- *
+ *
* @param items
* number of items
*/
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/Processor.java b/tez-api/src/main/java/org/apache/tez/runtime/api/Processor.java
index 32d786e3d4..749be4d11f 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/Processor.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/Processor.java
@@ -22,9 +22,9 @@
/**
* {@link Processor} represents the Tez entity responsible for
- * consuming {@link Input} and producing {@link Output}. It defines the
+ * consuming {@link Input} and producing {@link Output}. It defines the
* application logic that processes and transforms the data.
- *
+ *
* Users are expected to derive from {@link AbstractLogicalIOProcessor}
*/
@Public
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/ProcessorContext.java b/tez-api/src/main/java/org/apache/tez/runtime/api/ProcessorContext.java
index 3782a8d8d7..14d4424e58 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/ProcessorContext.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/ProcessorContext.java
@@ -43,7 +43,7 @@ static float preProcessProgress(float progress) {
/**
* Set the overall progress of this Task Attempt.
- * This automatically results in invocation of {@link ProcessorContext#notifyProgress()}
+ * This automatically results in invocation of {@link ProcessorContext#notifyProgress()}
* and so invoking that separately is not required.
* @param progress Progress in the range from [0.0 - 1.0f]
*/
@@ -68,15 +68,15 @@ default void setProgress(float progress) {
/**
* Blocking call which returns when any of the specified Inputs is ready for
* consumption.
- *
+ *
* There can be multiple parallel invocations of this function - where each
* invocation blocks on the Inputs that it specifies.
- *
+ *
* If multiple Inputs are ready, any one of them may be returned by this
* method - including an Input which may have been returned in a previous
* call. If invoking this method multiple times, it's recommended to remove
* previously completed Inputs from the invocation list.
- *
+ *
* @param inputs
* the list of Inputs to monitor
* @return the Input which is ready for consumption
@@ -110,10 +110,10 @@ default void setProgress(float progress) {
/**
* Blocking call which returns only after all of the specified Inputs are
* ready for consumption.
- *
+ *
* There can be multiple parallel invocations of this function - where each
* invocation blocks on the Inputs that it specifies.
- *
+ *
* @param inputs
* the list of Inputs to monitor
* @throws InterruptedException
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/TaskAttemptIdentifier.java b/tez-api/src/main/java/org/apache/tez/runtime/api/TaskAttemptIdentifier.java
index 101fa91d36..21cd1c58d7 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/TaskAttemptIdentifier.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/TaskAttemptIdentifier.java
@@ -19,8 +19,8 @@
package org.apache.tez.runtime.api;
public interface TaskAttemptIdentifier {
-
+
public int getIdentifier();
-
+
public TaskIdentifier getTaskIdentifier();
}
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/TaskIdentifier.java b/tez-api/src/main/java/org/apache/tez/runtime/api/TaskIdentifier.java
index 8ef066bb7f..0e9895b01a 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/TaskIdentifier.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/TaskIdentifier.java
@@ -19,8 +19,8 @@
package org.apache.tez.runtime.api;
public interface TaskIdentifier {
-
+
public int getIdentifier();
-
+
public VertexIdentifier getVertexIdentifier();
}
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/VertexIdentifier.java b/tez-api/src/main/java/org/apache/tez/runtime/api/VertexIdentifier.java
index 16e88ad4ec..21d550cd6e 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/VertexIdentifier.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/VertexIdentifier.java
@@ -21,8 +21,8 @@
public interface VertexIdentifier {
public int getIdentifier();
-
+
public String getName();
-
+
public DagIdentifier getDagIdentifier();
}
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/VertexStatistics.java b/tez-api/src/main/java/org/apache/tez/runtime/api/VertexStatistics.java
index aa526f24b5..0e1f2ba65c 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/VertexStatistics.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/VertexStatistics.java
@@ -38,7 +38,7 @@ public interface VertexStatistics {
/**
* Get statistics about an {@link Edge} input or external input of this
* {@link Vertex}.
- *
+ *
* @param inputName
* Name of the input {@link Edge} or external input of this vertex
* @return {@link InputStatistics} for the given input
@@ -48,7 +48,7 @@ public interface VertexStatistics {
/**
* Get statistics about an {@link Edge} output or external output of this
* {@link Vertex}.
- *
+ *
* @param outputName
* Name of the output {@link Edge} or external output of this vertex
* @return {@link OutputStatistics} for the given output
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/CompositeDataMovementEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/CompositeDataMovementEvent.java
index 32089a99ac..fcda5db769 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/events/CompositeDataMovementEvent.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/events/CompositeDataMovementEvent.java
@@ -29,14 +29,14 @@
/**
* A convenience class to specify multiple DataMovementEvents which share the
* same payload. A contiguous range of srcIndices can be specified.
- *
+ *
* This event will NOT be seen by downstream Inputs - instead they will see
* {@link DataMovementEvent}s which are generated based on the range specified
* in this event.
- *
+ *
* This event should be used by an output which has the same payload for all of
* the Physical Outputs that it generates.
- *
+ *
*/
@Public
public class CompositeDataMovementEvent extends Event {
@@ -67,12 +67,12 @@ public static CompositeDataMovementEvent create(int srcIndexStart, int count,
ByteBuffer userPayload) {
return new CompositeDataMovementEvent(srcIndexStart, count, userPayload);
}
-
+
/**
* Expand the {@link CompositeDataMovementEvent} into a routable
* {@link DataMovementEvent} by providing the source output index and the
* target input index.
- *
+ *
* @param sourceIndex
* The index of the physical output represented by the
* {@link DataMovementEvent}
@@ -111,11 +111,11 @@ public int getVersion() {
public Iterable getEvents() {
return new Iterable() {
-
+
@Override
public Iterator iterator() {
return new Iterator() {
-
+
int currentPos = sourceIndexStart;
@Override
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/DataMovementEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/DataMovementEvent.java
index 05c3d3fe4f..800caaa4ed 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/events/DataMovementEvent.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/events/DataMovementEvent.java
@@ -82,7 +82,7 @@ public static DataMovementEvent create(int sourceIndex,
ByteBuffer userPayload) {
return new DataMovementEvent(sourceIndex, -1, -1, userPayload);
}
-
+
@Private
/**
* Constructor for Processor-generated User Events
@@ -99,11 +99,11 @@ public static DataMovementEvent create(int sourceIndex,
ByteBuffer userPayload) {
return new DataMovementEvent(sourceIndex, targetIndex, version, userPayload);
}
-
+
/**
* Make a routable copy of the {@link DataMovementEvent} by adding a target
* input index
- *
+ *
* @param targetIndex
* The index of the physical input to which this
* {@link DataMovementEvent} should be routed
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputConfigureVertexTasksEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputConfigureVertexTasksEvent.java
index 05857d286c..f79119b74b 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputConfigureVertexTasksEvent.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputConfigureVertexTasksEvent.java
@@ -26,8 +26,8 @@
import org.apache.tez.runtime.api.InputSpecUpdate;
/**
- * An event typically sent by the {@link InputInitializer} of a vertex
- * to configure the tasks of the vertex. It could change the task
+ * An event typically sent by the {@link InputInitializer} of a vertex
+ * to configure the tasks of the vertex. It could change the task
* placement hints or input specification for the inputs of the tasks
*/
@Unstable
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputDataInformationEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputDataInformationEvent.java
index 8cf0616e6b..cbe43e5ce6 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputDataInformationEvent.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputDataInformationEvent.java
@@ -30,14 +30,14 @@
* Events used by {@link InputInitializer} implementations to provide the
* user payload for individual tasks running as part of the Vertex for which an
* Initial Input has been configured.
- *
+ *
* This event is used by InputInitialziers to configure tasks belonging to a
* Vertex. The event may be processed by a @link {@link VertexManagerPlugin}
* before being sent to tasks.
- *
+ *
* A {@link InputInitializer} may send Events with or without a
* serialized user payload.
- *
+ *
* Events, after being processed by a {@link VertexManagerPlugin}, must
* contain the payload in a serialized form.
*/
@@ -57,7 +57,7 @@ private InputDataInformationEvent(int srcIndex, ByteBuffer userPayload) {
this.userPayload = userPayload;
this.userPayloadObject = null;
}
-
+
private InputDataInformationEvent(int srcIndex, Object userPayloadDeserialized, Object sigChanged) {
this.sourceIndex = srcIndex;
this.userPayloadObject = userPayloadDeserialized;
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputFailedEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputFailedEvent.java
index 9d8363a785..48ed44f8b4 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputFailedEvent.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/events/InputFailedEvent.java
@@ -40,11 +40,11 @@ public class InputFailedEvent extends Event{
* Version number to indicate what attempt generated this Event
*/
private int version;
-
+
@Private // for Writable
public InputFailedEvent() {
}
-
+
@Private
private InputFailedEvent(int targetIndex, int version) {
this.targetIndex = targetIndex;
@@ -55,15 +55,15 @@ private InputFailedEvent(int targetIndex, int version) {
public static InputFailedEvent create(int targetIndex, int version) {
return new InputFailedEvent(targetIndex, version);
}
-
+
/**
* Create a copy of the {@link InputFailedEvent} by adding a target input
* index The index of the physical input to which this event should be routed
- *
+ *
* @param targetIndex
* The index of the physical input to which this
* {@link InputFailedEvent} should be routed
- *
+ *
* @return copy of the {@link InputFailedEvent} with the target input index
* added
*/
diff --git a/tez-api/src/main/java/org/apache/tez/runtime/api/events/VertexManagerEvent.java b/tez-api/src/main/java/org/apache/tez/runtime/api/events/VertexManagerEvent.java
index 7a450c6cdf..39b59bb55b 100644
--- a/tez-api/src/main/java/org/apache/tez/runtime/api/events/VertexManagerEvent.java
+++ b/tez-api/src/main/java/org/apache/tez/runtime/api/events/VertexManagerEvent.java
@@ -38,12 +38,12 @@
public class VertexManagerEvent extends Event {
/**
- * Vertex to which the event should be sent
+ * Vertex to which the event should be sent
*/
private final String targetVertexName;
-
+
private TaskAttemptIdentifier producerAttempt;
-
+
/**
* User payload to be sent
*/
@@ -74,21 +74,21 @@ public static VertexManagerEvent create(String vertexName, ByteBuffer userPayloa
public String getTargetVertexName() {
return targetVertexName;
}
-
+
public ByteBuffer getUserPayload() {
return userPayload == null ? null : userPayload.asReadOnlyBuffer();
}
-
+
/**
* Get metadata about the task attempt that produced the event.
- * This method will provide a valid return value only when invoked in the
+ * This method will provide a valid return value only when invoked in the
* {@link VertexManagerPlugin}
* @return attempt metadata
*/
public TaskAttemptIdentifier getProducerAttemptIdentifier() {
return producerAttempt;
}
-
+
@Private
public void setProducerAttemptIdentifier(TaskAttemptIdentifier producerAttempt) {
this.producerAttempt = producerAttempt;
diff --git a/tez-api/src/test/java/org/apache/tez/client/TestTezClient.java b/tez-api/src/test/java/org/apache/tez/client/TestTezClient.java
index bb2bd98096..68af185cc3 100644
--- a/tez-api/src/test/java/org/apache/tez/client/TestTezClient.java
+++ b/tez-api/src/test/java/org/apache/tez/client/TestTezClient.java
@@ -181,7 +181,7 @@ TezClientForTest configureAndCreateTezClient(TezConfiguration conf) throws YarnE
IOException {
return configureAndCreateTezClient(new HashMap(), true, conf);
}
-
+
TezClientForTest configureAndCreateTezClient(Map lrs, boolean isSession,
TezConfiguration conf) throws YarnException, IOException, ServiceException {
if (conf == null) {
@@ -210,12 +210,12 @@ TezClientForTest configureAndCreateTezClient(Map lrs, boo
return client;
}
-
+
@Test (timeout = 5000)
public void testTezClientApp() throws Exception {
testTezClient(false, true, "testTezClientApp");
}
-
+
@Test (timeout = 5000)
public void testTezClientSession() throws Exception {
testTezClient(true, true, "testTezClientSession");
@@ -336,13 +336,13 @@ public void testGetClient() throws Exception {
verify(client2.mockYarnClient, times(1)).stop();
/* END reuse of AM from new TezClient */
}
-
+
public TezClientForTest testTezClient(boolean isSession, boolean shouldStop, String dagName) throws Exception {
Map lrs = Maps.newHashMap();
String lrName1 = "LR1";
lrs.put(lrName1, LocalResource.newInstance(URL.newInstance("file", "localhost", 0, "/test"),
LocalResourceType.FILE, LocalResourceVisibility.PUBLIC, 1, 1));
-
+
TezClientForTest client = configureAndCreateTezClient(lrs, isSession, null);
ArgumentCaptor captor = ArgumentCaptor.forClass(ApplicationSubmissionContext.class);
@@ -364,7 +364,7 @@ public TezClientForTest testTezClient(boolean isSession, boolean shouldStop, Str
} else {
verify(client.mockYarnClient, times(0)).submitApplication(captor.capture());
}
-
+
String mockLR1Name = "LR1";
Map lrDAG = Collections.singletonMap(mockLR1Name, LocalResource
.newInstance(URL.newInstance("file", "localhost", 0, "/test1"), LocalResourceType.FILE,
@@ -377,7 +377,7 @@ public TezClientForTest testTezClient(boolean isSession, boolean shouldStop, Str
.thenReturn(GetAMStatusResponseProto.newBuilder().setStatus(TezAppMasterStatusProto.SHUTDOWN).build());
}
DAGClient dagClient = client.submitDAG(dag);
-
+
assertTrue(dagClient.getExecutionContext().contains(client.mockAppId.toString()));
assertEquals(dagClient.getSessionIdentifierString(), client.mockAppId.toString());
@@ -414,7 +414,7 @@ public TezClientForTest testTezClient(boolean isSession, boolean shouldStop, Str
dag = DAG.create("DAG-2-" + dagName).addVertex(
Vertex.create("Vertex", ProcessorDescriptor.create("P"), 1, Resource.newInstance(1, 1)));
dagClient = client.submitDAG(dag);
-
+
if (isSession) {
// same app master
verify(client.mockYarnClient, times(1)).submitApplication(captor.capture());
@@ -557,14 +557,14 @@ public void testPreWarm() throws Exception {
when(client.mockYarnClient.getApplicationReport(client.mockAppId).getYarnApplicationState())
.thenReturn(YarnApplicationState.RUNNING);
-
+
when(
client.sessionAmProxy.getAMStatus(any(), any()))
.thenReturn(GetAMStatusResponseProto.newBuilder().setStatus(TezAppMasterStatusProto.READY).build());
PreWarmVertex vertex = PreWarmVertex.create("PreWarm", 1, Resource.newInstance(1, 1));
client.preWarm(vertex);
-
+
ArgumentCaptor captor1 = ArgumentCaptor.forClass(SubmitDAGRequestProto.class);
verify(client.sessionAmProxy, times(1)).submitDAG(any(), captor1.capture());
SubmitDAGRequestProto proto = captor1.getValue();
@@ -698,14 +698,14 @@ public void testMultipleSubmissions() throws Exception {
testMultipleSubmissionsJob(false);
testMultipleSubmissionsJob(true);
}
-
+
public void testMultipleSubmissionsJob(boolean isSession) throws Exception {
TezClientForTest client1 = configureAndCreateTezClient(new HashMap(),
isSession, null);
when(client1.mockYarnClient.getApplicationReport(client1.mockAppId).getYarnApplicationState())
.thenReturn(YarnApplicationState.RUNNING);
client1.start();
-
+
String mockLR1Name = "LR1";
Map lrDAG = Collections.singletonMap(mockLR1Name, LocalResource
.newInstance(URL.newInstance("file", "localhost", 0, "/test"), LocalResourceType.FILE,
@@ -721,20 +721,20 @@ public void testMultipleSubmissionsJob(boolean isSession) throws Exception {
// the dag resource will be added to the vertex once
client1.submitDAG(dag);
-
+
TezClientForTest client2 = configureAndCreateTezClient();
when(client2.mockYarnClient.getApplicationReport(client2.mockAppId).getYarnApplicationState())
.thenReturn(YarnApplicationState.RUNNING);
client2.start();
-
+
// verify resubmission of same dag to new client (simulates submission error resulting in the
// creation of a new client and resubmission of the DAG)
client2.submitDAG(dag);
-
+
client1.stop();
client2.stop();
}
-
+
@Test(timeout = 5000)
public void testWaitTillReady_Interrupt() throws Exception {
final TezClientForTest client = configureAndCreateTezClient();
@@ -760,7 +760,7 @@ public void run() {
Assert.assertThat(exceptionReference.get(), CoreMatchers.instanceOf(InterruptedException.class));
client.stop();
}
-
+
@Test(timeout = 5000)
public void testWaitTillReadyAppFailed() throws Exception {
final TezClientForTest client = configureAndCreateTezClient();
@@ -778,7 +778,7 @@ public void testWaitTillReadyAppFailed() throws Exception {
}
client.stop();
}
-
+
@Test(timeout = 5000)
public void testWaitTillReadyAppFailedNoDiagnostics() throws Exception {
final TezClientForTest client = configureAndCreateTezClient();
@@ -793,12 +793,12 @@ public void testWaitTillReadyAppFailedNoDiagnostics() throws Exception {
}
client.stop();
}
-
+
@Test(timeout = 5000)
public void testSubmitDAGAppFailed() throws Exception {
final TezClientForTest client = configureAndCreateTezClient();
client.start();
-
+
client.callRealGetSessionAMProxy = true;
String msg = "Application Test Failed";
when(client.mockYarnClient.getApplicationReport(client.mockAppId).getYarnApplicationState())
@@ -809,7 +809,7 @@ public void testSubmitDAGAppFailed() throws Exception {
Vertex vertex = Vertex.create("Vertex", ProcessorDescriptor.create("P"), 1,
Resource.newInstance(1, 1));
DAG dag = DAG.create("DAG-testSubmitDAGAppFailed").addVertex(vertex);
-
+
try {
client.submitDAG(dag);
fail();
diff --git a/tez-api/src/test/java/org/apache/tez/client/TestTezClientUtils.java b/tez-api/src/test/java/org/apache/tez/client/TestTezClientUtils.java
index 56d4192df2..79aa9231ba 100644
--- a/tez-api/src/test/java/org/apache/tez/client/TestTezClientUtils.java
+++ b/tez-api/src/test/java/org/apache/tez/client/TestTezClientUtils.java
@@ -79,7 +79,7 @@
import org.junit.Assert;
import org.junit.Test;
/**
- *
+ *
*/
public class TestTezClientUtils {
private static String TEST_ROOT_DIR = "target" + Path.SEPARATOR
@@ -87,7 +87,7 @@ public class TestTezClientUtils {
private static final File STAGING_DIR = new File(System.getProperty("test.build.data", "target"),
TestTezClientUtils.class.getName()).getAbsoluteFile();
/**
- *
+ *
*/
@Test (timeout=5000)
public void validateSetTezJarLocalResourcesNotDefined() throws Exception {
@@ -121,7 +121,7 @@ public void validateSetTezJarLocalResourcesDefinedButEmpty() throws Exception {
}
/**
- *
+ *
*/
@Test(expected=FileNotFoundException.class, timeout=5000)
public void validateSetTezJarLocalResourcesDefinedNonExistingDirectory() throws Exception {
@@ -181,7 +181,7 @@ public void validateSetTezJarLocalResourcesDefinedExistingDirectory() throws Exc
assertTrue(resourceNames.contains(innerFile.getName()));
assertedDir = true;
}
- // not supporting deep hierarchies
+ // not supporting deep hierarchies
}
} else {
assertTrue(resourceNames.contains(file.getName()));
@@ -193,7 +193,7 @@ public void validateSetTezJarLocalResourcesDefinedExistingDirectory() throws Exc
}
/**
- *
+ *
* @throws Exception
*/
@Test (timeout=5000)
@@ -214,7 +214,7 @@ public void validateSetTezJarLocalResourcesDefinedExistingDirectoryIgnored() thr
}
/**
- *
+ *
* @throws Exception
*/
@Test (timeout=20000)
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/TestDAG.java b/tez-api/src/test/java/org/apache/tez/dag/api/TestDAG.java
index 9880a8c4ba..758117799b 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/TestDAG.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/TestDAG.java
@@ -107,7 +107,7 @@ public void testDuplicatedVertexGroup() {
e.printStackTrace();
Assert.assertEquals("VertexGroup group_1 already defined!", e.getMessage());
}
- // it is possible to create vertex group with same member but different group name
+ // it is possible to create vertex group with same member but different group name
dag.createVertexGroup("group_2", v1, v2);
}
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java b/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
index 2ee3efeedc..fa5bb1f43c 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/TestDAGPlan.java
@@ -243,7 +243,7 @@ public void userVertexOrderingIsMaintained() {
VertexPlan v3Proto = dagProto.getVertex(2);
EdgePlan edgeProto = dagProto.getEdge(0);
- // either v1 or v2 will be on top based on topological order
+ // either v1 or v2 will be on top based on topological order
String v1ProtoPayload = new String(v1Proto.getProcessorDescriptor().getTezUserPayload().getUserPayload().toByteArray());
String v2ProtoPayload = new String(v2Proto.getProcessorDescriptor().getTezUserPayload().getUserPayload().toByteArray());
assertTrue(v1ProtoPayload.equals("processor1Bytes") || v1ProtoPayload.equals("processor3Bytes"));
@@ -306,16 +306,16 @@ public void testCredentialsSerde() {
Token token2 = new Token();
dagCredentials.addToken(new Text("Token1"), token1);
dagCredentials.addToken(new Text("Token2"), token2);
-
+
dag.setCredentials(dagCredentials);
DAGPlan dagProto = dag.createDag(new TezConfiguration(), null, null, null, true);
assertTrue(dagProto.hasCredentialsBinary());
-
+
Credentials fetchedCredentials = DagTypeConverters.convertByteStringToCredentials(dagProto
.getCredentialsBinary());
-
+
assertEquals(2, fetchedCredentials.numberOfTokens());
assertNotNull(fetchedCredentials.getToken(new Text("Token1")));
assertNotNull(fetchedCredentials.getToken(new Text("Token2")));
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/TestTaskLocationHint.java b/tez-api/src/test/java/org/apache/tez/dag/api/TestTaskLocationHint.java
index 2dada70a95..5b89cea1e1 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/TestTaskLocationHint.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/TestTaskLocationHint.java
@@ -24,7 +24,7 @@
import org.junit.Test;
public class TestTaskLocationHint {
-
+
@Test (timeout = 5000)
public void testEquality() {
TaskLocationHint t1 = TaskLocationHint.createTaskLocationHint("v1", 0);
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/client/rpc/TestDAGClient.java b/tez-api/src/test/java/org/apache/tez/dag/api/client/rpc/TestDAGClient.java
index 87860447cd..6e979972a7 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/client/rpc/TestDAGClient.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/client/rpc/TestDAGClient.java
@@ -93,14 +93,14 @@ public class TestDAGClient {
private ApplicationReport mockAppReport;
private String dagIdStr;
private DAGClientAMProtocolBlockingPB mockProxy;
-
+
private VertexStatusProto vertexStatusProtoWithoutCounters;
private VertexStatusProto vertexStatusProtoWithCounters;
-
+
private DAGStatusProto dagStatusProtoWithoutCounters;
private DAGStatusProto dagStatusProtoWithCounters;
-
-
+
+
private void setUpData(){
// DAG
ProgressProto dagProgressProto = ProgressProto.newBuilder()
@@ -110,7 +110,7 @@ private void setUpData(){
.setSucceededTaskCount(2)
.setTotalTaskCount(6)
.build();
-
+
TezCountersProto dagCountersProto=TezCountersProto.newBuilder()
.addCounterGroups(TezCounterGroupProto.newBuilder()
.setName("DAGGroup")
@@ -118,7 +118,7 @@ private void setUpData(){
.setDisplayName("dag_counter_1")
.setValue(99)))
.build();
-
+
dagStatusProtoWithoutCounters = DAGStatusProto.newBuilder()
.addDiagnostics("Diagnostics_0")
.setState(DAGStatusStateProto.DAG_RUNNING)
@@ -138,11 +138,11 @@ private void setUpData(){
.setKilledTaskCount(1))
)
.build();
-
+
dagStatusProtoWithCounters = DAGStatusProto.newBuilder(dagStatusProtoWithoutCounters)
.setDagCounters(dagCountersProto)
.build();
-
+
// Vertex
ProgressProto vertexProgressProto = ProgressProto.newBuilder()
.setFailedTaskCount(1)
@@ -150,14 +150,14 @@ private void setUpData(){
.setRunningTaskCount(0)
.setSucceededTaskCount(1)
.build();
-
+
TezCountersProto vertexCountersProto=TezCountersProto.newBuilder()
.addCounterGroups(TezCounterGroupProto.newBuilder()
.addCounters(TezCounterProto.newBuilder()
.setDisplayName("vertex_counter_1")
.setValue(99)))
.build();
-
+
vertexStatusProtoWithoutCounters = VertexStatusProto.newBuilder()
.setId("vertex_1")
.addDiagnostics("V_Diagnostics_0")
@@ -186,12 +186,12 @@ public boolean matches(GetVertexStatusRequestProto requestProto) {
&& requestProto.getStatusOptionsList().get(0) == StatusGetOptsProto.GET_COUNTERS;
}
}
-
+
@Before
public void setUp() throws YarnException, IOException, TezException, ServiceException{
setUpData();
-
+
/////////////// mock //////////////////////
mockAppId = mock(ApplicationId.class);
mockAppReport = mock(ApplicationReport.class);
@@ -202,7 +202,7 @@ public void setUp() throws YarnException, IOException, TezException, ServiceExce
.thenReturn(GetDAGStatusResponseProto.newBuilder().setDagStatus(dagStatusProtoWithoutCounters).build());
when(mockProxy.getDAGStatus(isNull(), argThat(new DAGCounterRequestMatcher())))
.thenReturn(GetDAGStatusResponseProto.newBuilder().setDagStatus(dagStatusProtoWithCounters).build());
-
+
when(mockProxy.getVertexStatus(isNull(), any()))
.thenReturn(GetVertexStatusResponseProto.newBuilder().setVertexStatus(vertexStatusProtoWithoutCounters).build());
when(mockProxy.getVertexStatus(isNull(), argThat(new VertexCounterRequestMatcher())))
@@ -215,7 +215,7 @@ public void setUp() throws YarnException, IOException, TezException, ServiceExce
realClient.appReport = mockAppReport;
realClient.proxy = mockProxy;
}
-
+
@Test(timeout = 5000)
public void testApp() throws IOException, TezException, ServiceException{
assertTrue(dagClient.getExecutionContext().contains(mockAppId.toString()));
@@ -224,7 +224,7 @@ public void testApp() throws IOException, TezException, ServiceException{
DAGClientRPCImpl realClient = (DAGClientRPCImpl)((DAGClientImpl)dagClient).getRealClient();
assertEquals(mockAppReport, realClient.getApplicationReportInternal());
}
-
+
@Test(timeout = 5000)
public void testDAGStatus() throws Exception{
DAGStatus resultDagStatus = dagClient.getDAGStatus(null);
@@ -232,14 +232,14 @@ public void testDAGStatus() throws Exception{
.setDagId(dagIdStr).setTimeout(0).build());
assertEquals(new DAGStatus(dagStatusProtoWithoutCounters, DagStatusSource.AM), resultDagStatus);
System.out.println("DAGStatusWithoutCounter:" + resultDagStatus);
-
+
resultDagStatus = dagClient.getDAGStatus(Sets.newSet(StatusGetOpts.GET_COUNTERS));
verify(mockProxy, times(1)).getDAGStatus(null, GetDAGStatusRequestProto.newBuilder()
.setDagId(dagIdStr).setTimeout(0).addStatusOptions(StatusGetOptsProto.GET_COUNTERS).build());
assertEquals(new DAGStatus(dagStatusProtoWithCounters, DagStatusSource.AM), resultDagStatus);
System.out.println("DAGStatusWithCounter:" + resultDagStatus);
}
-
+
@Test(timeout = 5000)
public void testVertexStatus() throws Exception{
VertexStatus resultVertexStatus = dagClient.getVertexStatus("v1", null);
@@ -247,7 +247,7 @@ public void testVertexStatus() throws Exception{
.setDagId(dagIdStr).setVertexName("v1").build());
assertEquals(new VertexStatus(vertexStatusProtoWithoutCounters), resultVertexStatus);
System.out.println("VertexWithoutCounter:" + resultVertexStatus);
-
+
resultVertexStatus = dagClient.getVertexStatus("v1", Sets.newSet(StatusGetOpts.GET_COUNTERS));
verify(mockProxy).getVertexStatus(null, GetVertexStatusRequestProto.newBuilder()
.setDagId(dagIdStr).setVertexName("v1").addStatusOptions(StatusGetOptsProto.GET_COUNTERS)
@@ -255,14 +255,14 @@ public void testVertexStatus() throws Exception{
assertEquals(new VertexStatus(vertexStatusProtoWithCounters), resultVertexStatus);
System.out.println("VertexWithCounter:" + resultVertexStatus);
}
-
+
@Test(timeout = 5000)
public void testTryKillDAG() throws Exception{
dagClient.tryKillDAG();
verify(mockProxy, times(1)).tryKillDAG(null, TryKillDAGRequestProto.newBuilder()
.setDagId(dagIdStr).build());
}
-
+
@Test(timeout = 5000)
public void testWaitForCompletion() throws Exception{
// first time return DAG_RUNNING, second time return DAG_SUCCEEDED
@@ -301,7 +301,7 @@ public void testWaitForCompletionWithStatusUpdates() throws Exception{
(DAGStatusProto.newBuilder(dagStatusProtoWithoutCounters)
.setState(DAGStatusStateProto.DAG_SUCCEEDED).build())
.build());
-
+
// first time for getVertexSet
// second & third time for check completion
ArgumentCaptor rpcControllerArgumentCaptor =
diff --git a/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcher.java b/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcher.java
index c20869f19c..214aaa9d22 100644
--- a/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcher.java
+++ b/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcher.java
@@ -72,9 +72,9 @@ public class AsyncDispatcher extends CompositeService implements Dispatcher {
private Thread eventHandlingThread;
protected final Map, EventHandler> eventHandlers = Maps.newHashMap();
protected final Map, AsyncDispatcher> eventDispatchers = Maps.newHashMap();
- protected final Map, AsyncDispatcherConcurrent> concurrentEventDispatchers =
+ protected final Map, AsyncDispatcherConcurrent> concurrentEventDispatchers =
Maps.newHashMap();
-
+
private boolean exitOnDispatchException = false;
public AsyncDispatcher(String name) {
@@ -133,7 +133,7 @@ protected void serviceStart() throws Exception {
eventHandlingThread = new Thread(createThread());
eventHandlingThread.setName("Dispatcher thread {" + name + "}");
eventHandlingThread.start();
-
+
//start all the components
super.serviceStart();
}
@@ -218,16 +218,16 @@ protected void dispatch(Event event) {
}
}
}
-
+
private void checkForExistingHandler(Class extends Enum> eventType) {
EventHandler registeredHandler = (EventHandler) eventHandlers.get(eventType);
- Preconditions.checkState(registeredHandler == null,
+ Preconditions.checkState(registeredHandler == null,
"Cannot register same event on multiple dispatchers");
}
private void checkForExistingDispatcher(Class extends Enum> eventType) {
AsyncDispatcher registeredDispatcher = eventDispatchers.get(eventType);
- Preconditions.checkState(registeredDispatcher == null,
+ Preconditions.checkState(registeredDispatcher == null,
"Multiple dispatchers cannot be registered for: " + eventType.getName());
}
@@ -236,7 +236,7 @@ private void checkForExistingConcurrentDispatcher(Class extends Enum> eventTyp
Preconditions.checkState(concurrentDispatcher == null,
"Multiple concurrent dispatchers cannot be registered for: " + eventType.getName());
}
-
+
@VisibleForTesting
protected void checkForExistingDispatchers(boolean checkHandler, Class extends Enum> eventType) {
if (checkHandler) {
@@ -277,14 +277,14 @@ public void register(Class extends Enum> eventType,
multiHandler.addHandler(handler);
}
}
-
+
/**
* Add an EventHandler for events handled in their own dispatchers with given name
*/
public void registerAndCreateDispatcher(Class extends Enum> eventType,
EventHandler handler, String dispatcherName) {
Preconditions.checkState(getServiceState() == STATE.NOTINITED);
-
+
/* check to see if we have a listener registered */
checkForExistingDispatchers(true, eventType);
LOG.info(
@@ -294,11 +294,11 @@ public void registerAndCreateDispatcher(Class extends Enum> eventType,
eventDispatchers.put(eventType, dispatcher);
addIfService(dispatcher);
}
-
+
public AsyncDispatcherConcurrent registerAndCreateDispatcher(Class extends Enum> eventType,
EventHandler handler, String dispatcherName, int numThreads) {
Preconditions.checkState(getServiceState() == STATE.NOTINITED);
-
+
/* check to see if we have a listener registered */
checkForExistingDispatchers(true, eventType);
LOG.info(
@@ -312,11 +312,11 @@ public AsyncDispatcherConcurrent registerAndCreateDispatcher(Class extends Enu
addIfService(dispatcher);
return dispatcher;
}
-
+
public void registerWithExistingDispatcher(Class extends Enum> eventType,
EventHandler handler, AsyncDispatcherConcurrent dispatcher) {
Preconditions.checkState(getServiceState() == STATE.NOTINITED);
-
+
/* check to see if we have a listener registered */
checkForExistingDispatchers(true, eventType);
LOG.info("Registering " + eventType + " with existing concurrent dispatch using: "
@@ -355,9 +355,9 @@ public void handle(Event event) {
concurrentDispatcher.getEventHandler().handle(event);
return;
}
-
+
// no registered dispatcher. use internal dispatcher.
-
+
/* all this method does is enqueue all the events onto the queue */
int qSize = eventQueue.size();
if (qSize !=0 && qSize %1000 == 0) {
diff --git a/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcherConcurrent.java b/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcherConcurrent.java
index 7c0dcced7b..541e35c1dc 100644
--- a/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcherConcurrent.java
+++ b/tez-common/src/main/java/org/apache/tez/common/AsyncDispatcherConcurrent.java
@@ -43,7 +43,7 @@
import org.slf4j.LoggerFactory;
/**
- * A dispatcher that can schedule events concurrently. Uses a fixed size threadpool
+ * A dispatcher that can schedule events concurrently. Uses a fixed size threadpool
* to schedule events. Events that have the same serializing hash will get scheduled
* on the same thread in the threadpool. This can be used to prevent concurrency issues
* for events that may not be independently processed.
@@ -74,9 +74,9 @@ public class AsyncDispatcherConcurrent extends CompositeService implements Dispa
private ExecutorService execService;
private final int numThreads;
-
+
protected final Map, EventHandler> eventHandlers = Maps.newHashMap();
- protected final Map, AsyncDispatcherConcurrent> eventDispatchers =
+ protected final Map, AsyncDispatcherConcurrent> eventDispatchers =
Maps.newHashMap();
private boolean exitOnDispatchException = false;
@@ -87,14 +87,14 @@ public class AsyncDispatcherConcurrent extends CompositeService implements Dispa
this.eventQueues = Lists.newArrayListWithCapacity(numThreads);
this.numThreads = numThreads;
}
-
+
class DispatchRunner implements Runnable {
final LinkedBlockingQueue queue;
-
+
public DispatchRunner(LinkedBlockingQueue queue) {
this.queue = queue;
}
-
+
@Override
public void run() {
while (!stopped && !Thread.currentThread().isInterrupted()) {
@@ -124,7 +124,7 @@ public void run() {
}
}
};
-
+
@Override
protected void serviceInit(Configuration conf) throws Exception {
super.serviceInit(conf);
@@ -206,7 +206,7 @@ protected void dispatch(Event event) {
private void checkForExistingHandler(Class extends Enum> eventType) {
EventHandler registeredHandler = (EventHandler) eventHandlers.get(eventType);
- Preconditions.checkState(registeredHandler == null,
+ Preconditions.checkState(registeredHandler == null,
"Cannot register same event on multiple dispatchers");
}
@@ -249,15 +249,15 @@ public void register(Class extends Enum> eventType,
multiHandler.addHandler(handler);
}
}
-
+
/**
* Add an EventHandler for events handled in their own dispatchers with given name and threads
*/
-
+
public AsyncDispatcherConcurrent registerAndCreateDispatcher(Class extends Enum> eventType,
EventHandler handler, String dispatcherName, int numThreads) {
Preconditions.checkState(getServiceState() == STATE.NOTINITED);
-
+
/* check to see if we have a listener registered */
checkForExistingDispatchers(true, eventType);
LOG.info(
@@ -268,11 +268,11 @@ public AsyncDispatcherConcurrent registerAndCreateDispatcher(Class extends Enu
addIfService(dispatcher);
return dispatcher;
}
-
+
public void registerWithExistingDispatcher(Class extends Enum> eventType,
EventHandler handler, AsyncDispatcherConcurrent dispatcher) {
Preconditions.checkState(getServiceState() == STATE.NOTINITED);
-
+
/* check to see if we have a listener registered */
checkForExistingDispatchers(true, eventType);
LOG.info("Registering " + eventType + " wit existing concurrent dispatch using: "
@@ -300,7 +300,7 @@ public void handle(TezAbstractEvent event) {
return;
}
drained = false;
-
+
// offload to specific dispatcher if one exists
Class extends Enum> type = event.getType().getDeclaringClass();
AsyncDispatcherConcurrent registeredDispatcher = eventDispatchers.get(type);
@@ -308,7 +308,7 @@ public void handle(TezAbstractEvent event) {
registeredDispatcher.getEventHandler().handle(event);
return;
}
-
+
int index = numThreads > 1 ? event.getSerializingHash() % numThreads : 0;
// no registered dispatcher. use internal dispatcher.
diff --git a/tez-common/src/main/java/org/apache/tez/common/GcTimeUpdater.java b/tez-common/src/main/java/org/apache/tez/common/GcTimeUpdater.java
index 4911d0f41a..00241d4bea 100644
--- a/tez-common/src/main/java/org/apache/tez/common/GcTimeUpdater.java
+++ b/tez-common/src/main/java/org/apache/tez/common/GcTimeUpdater.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -40,7 +40,7 @@ public GcTimeUpdater(TezCounters counters) {
getElapsedGc(); // Initialize 'lastGcMillis' with the current time spent.
this.counters = counters;
}
-
+
public long getCumulativaGcTime() {
long thisGcMillis = 0;
for (GarbageCollectorMXBean gcBean : gcBeans) {
diff --git a/tez-common/src/main/java/org/apache/tez/common/TezAbstractEvent.java b/tez-common/src/main/java/org/apache/tez/common/TezAbstractEvent.java
index b73611202f..ef13d11725 100644
--- a/tez-common/src/main/java/org/apache/tez/common/TezAbstractEvent.java
+++ b/tez-common/src/main/java/org/apache/tez/common/TezAbstractEvent.java
@@ -21,7 +21,7 @@
/**
* Event that allows running in parallel for different instances
- *
+ *
* @param
* Event type
*/
@@ -35,7 +35,7 @@ public TezAbstractEvent(TYPE type) {
/**
* Returning a number that is identical for event instances that need to be
* serialized while processing.
- *
+ *
* @return Serializing identifier. Not overriding this causes serialization
* for all events instances
*/
diff --git a/tez-common/src/main/java/org/apache/tez/common/TezContainerLogAppender.java b/tez-common/src/main/java/org/apache/tez/common/TezContainerLogAppender.java
index 1649a0b318..4d358099ab 100644
--- a/tez-common/src/main/java/org/apache/tez/common/TezContainerLogAppender.java
+++ b/tez-common/src/main/java/org/apache/tez/common/TezContainerLogAppender.java
@@ -27,13 +27,13 @@
/**
* A simple log4j-appender for a tez container's logs.
- *
+ *
*/
@Unstable
public class TezContainerLogAppender extends FileAppender {
private String containerLogDir;
private String logFileName = TezConstants.TEZ_CONTAINER_LOG_FILE_NAME;
- //so that log4j can configure it from the configuration(log4j.properties).
+ //so that log4j can configure it from the configuration(log4j.properties).
@Override
public void activateOptions() {
@@ -47,7 +47,7 @@ public void activateOptions() {
/**
* Set the name of the file for logging. This should NOT be an absolute path.
* The file will be created within the container's log directory.
- *
+ *
* @param fileName
* @throws NullPointerException if {@code fileName} is {@code null}
* @throws IllegalArgumentException if {@code fileName} is an absolute path
diff --git a/tez-common/src/main/java/org/apache/tez/dag/records/DagIdentifierImpl.java b/tez-common/src/main/java/org/apache/tez/dag/records/DagIdentifierImpl.java
index 099cb58a13..140d64a39b 100644
--- a/tez-common/src/main/java/org/apache/tez/dag/records/DagIdentifierImpl.java
+++ b/tez-common/src/main/java/org/apache/tez/dag/records/DagIdentifierImpl.java
@@ -24,7 +24,7 @@ public class DagIdentifierImpl implements DagIdentifier {
private final TezDAGID dagId;
private final String dagName;
-
+
public DagIdentifierImpl(String dagName, TezDAGID dagId) {
this.dagId = dagId;
this.dagName = dagName;
@@ -39,7 +39,7 @@ public String getName() {
public int getIdentifier() {
return dagId.getId();
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -56,12 +56,12 @@ public boolean equals(Object o) {
return false;
}
}
-
+
@Override
public String toString() {
return "Dag: " + dagName + ":[" + getIdentifier() + "]";
}
-
+
@Override
public int hashCode() {
return dagId.hashCode();
diff --git a/tez-common/src/main/java/org/apache/tez/dag/records/TaskAttemptIdentifierImpl.java b/tez-common/src/main/java/org/apache/tez/dag/records/TaskAttemptIdentifierImpl.java
index b834111cb9..3ba1c08ee6 100644
--- a/tez-common/src/main/java/org/apache/tez/dag/records/TaskAttemptIdentifierImpl.java
+++ b/tez-common/src/main/java/org/apache/tez/dag/records/TaskAttemptIdentifierImpl.java
@@ -25,7 +25,7 @@ public class TaskAttemptIdentifierImpl implements TaskAttemptIdentifier {
private final TaskIdentifier taskIdentifier;
private final TezTaskAttemptID attemptId;
-
+
public TaskAttemptIdentifierImpl(String dagName, String vertexName, TezTaskAttemptID attemptId) {
this.attemptId = attemptId;
this.taskIdentifier = new TaskIdentifierImpl(dagName, vertexName, attemptId.getTaskID());
@@ -35,12 +35,12 @@ public TaskAttemptIdentifierImpl(String dagName, String vertexName, TezTaskAttem
public int getIdentifier() {
return attemptId.getId();
}
-
+
@Override
public TaskIdentifier getTaskIdentifier() {
return taskIdentifier;
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -57,12 +57,12 @@ public boolean equals(Object o) {
return false;
}
}
-
+
@Override
public String toString() {
return taskIdentifier.toString() + " Attempt: [" + getIdentifier() + "]";
}
-
+
@Override
public int hashCode() {
return attemptId.hashCode();
diff --git a/tez-common/src/main/java/org/apache/tez/dag/records/TaskIdentifierImpl.java b/tez-common/src/main/java/org/apache/tez/dag/records/TaskIdentifierImpl.java
index fb0848aaad..d201af76ef 100644
--- a/tez-common/src/main/java/org/apache/tez/dag/records/TaskIdentifierImpl.java
+++ b/tez-common/src/main/java/org/apache/tez/dag/records/TaskIdentifierImpl.java
@@ -25,7 +25,7 @@ public class TaskIdentifierImpl implements TaskIdentifier {
private final VertexIdentifier vertexIdentifier;
private final TezTaskID taskId;
-
+
public TaskIdentifierImpl(String dagName, String vertexName, TezTaskID taskId) {
this.taskId = taskId;
this.vertexIdentifier = new VertexIdentifierImpl(dagName, vertexName, taskId.getVertexID());
@@ -35,12 +35,12 @@ public TaskIdentifierImpl(String dagName, String vertexName, TezTaskID taskId) {
public int getIdentifier() {
return taskId.getId();
}
-
+
@Override
public VertexIdentifier getVertexIdentifier() {
return vertexIdentifier;
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -57,7 +57,7 @@ public boolean equals(Object o) {
return false;
}
}
-
+
@Override
public String toString() {
return vertexIdentifier.toString() + " Task [" + getIdentifier() + "]";
diff --git a/tez-common/src/main/java/org/apache/tez/dag/records/TezID.java b/tez-common/src/main/java/org/apache/tez/dag/records/TezID.java
index 7efbd9a889..189032f603 100644
--- a/tez-common/src/main/java/org/apache/tez/dag/records/TezID.java
+++ b/tez-common/src/main/java/org/apache/tez/dag/records/TezID.java
@@ -28,9 +28,9 @@
/**
* A general identifier, which internally stores the id
- * as an integer. This is the super class of {@link TezDAGID},
+ * as an integer. This is the super class of {@link TezDAGID},
* {@link TezVertexID}, {@link TezTaskID}, and {@link TezTaskAttemptID}.
- *
+ *
* @see TezTaskID
* @see TezTaskAttemptID
*/
@@ -86,7 +86,7 @@ public int compareTo(TezID that) {
public void readFields(DataInput in) throws IOException {
this.id = in.readInt();
}
-
+
public static int readID(DataInput in) throws IOException {
return in.readInt();
}
@@ -95,5 +95,5 @@ public static int readID(DataInput in) throws IOException {
public void write(DataOutput out) throws IOException {
out.writeInt(id);
}
-
+
}
diff --git a/tez-common/src/main/java/org/apache/tez/dag/records/TezTaskAttemptID.java b/tez-common/src/main/java/org/apache/tez/dag/records/TezTaskAttemptID.java
index fe2b84449f..fca6ddfc97 100644
--- a/tez-common/src/main/java/org/apache/tez/dag/records/TezTaskAttemptID.java
+++ b/tez-common/src/main/java/org/apache/tez/dag/records/TezTaskAttemptID.java
@@ -55,10 +55,10 @@ public class TezTaskAttemptID extends TezID implements TaskIDAware {
// Public for Writable serialization. Verify if this is actually required.
public TezTaskAttemptID() {
}
-
+
/**
- * Constructs a TaskAttemptID object from given {@link TezTaskID}.
- * @param taskID TaskID that this task belongs to
+ * Constructs a TaskAttemptID object from given {@link TezTaskID}.
+ * @param taskID TaskID that this task belongs to
* @param id the task attempt number
* @throws NullPointerException if {@code taskID} is {@code null}
*/
@@ -77,7 +77,7 @@ private TezTaskAttemptID(TezTaskID taskId, int id) {
public TezTaskID getTaskID() {
return taskId;
}
-
+
@Override
public boolean equals(Object o) {
if (!super.equals(o))
@@ -86,7 +86,7 @@ public boolean equals(Object o) {
TezTaskAttemptID that = (TezTaskAttemptID)o;
return this.taskId.equals(that.taskId);
}
-
+
/**
* Add the unique string to the StringBuilder
* @param builder the builder to append ot
@@ -97,12 +97,12 @@ protected StringBuilder appendTo(StringBuilder builder) {
builder.append(SEPARATOR);
return builder.append(id);
}
-
+
@Override
public int hashCode() {
return taskId.hashCode() * 539501 + id;
}
-
+
/**Compare TaskIds by first tipIds, then by task numbers. */
@Override
public int compareTo(TezID o) {
@@ -114,10 +114,10 @@ public int compareTo(TezID o) {
else return tipComp;
}
@Override
- public String toString() {
+ public String toString() {
return appendTo(new StringBuilder(ATTEMPT)).toString();
}
-
+
@Override
// Can't do much about this instance if used via the RPC layer. Any downstream
// users can however avoid using this method.
@@ -125,7 +125,7 @@ public void readFields(DataInput in) throws IOException {
taskId = TezTaskID.readTezTaskID(in);
super.readFields(in);
}
-
+
public static TezTaskAttemptID readTezTaskAttemptID(DataInput in) throws IOException {
TezTaskID taskID = TezTaskID.readTezTaskID(in);
int attemptIdInt = TezID.readID(in);
diff --git a/tez-common/src/main/java/org/apache/tez/dag/records/TezTaskID.java b/tez-common/src/main/java/org/apache/tez/dag/records/TezTaskID.java
index 29f896b532..b3631ab7d0 100644
--- a/tez-common/src/main/java/org/apache/tez/dag/records/TezTaskID.java
+++ b/tez-common/src/main/java/org/apache/tez/dag/records/TezTaskID.java
@@ -43,7 +43,7 @@
public class TezTaskID extends TezID implements VertexIDAware {
public static final String TASK = "task";
private final int serializingHash;
-
+
static final ThreadLocal tezTaskIdFormat = new ThreadLocal() {
@Override
public FastNumberFormat initialValue() {
@@ -72,7 +72,7 @@ private TezTaskID(TezVertexID vertexID, int id) {
this.vertexId = vertexID;
this.serializingHash = getHashCode(true);
}
-
+
public int getSerializingHash() {
return serializingHash;
}
@@ -138,7 +138,7 @@ public void readFields(DataInput in) throws IOException {
vertexId = TezVertexID.readTezVertexID(in);
super.readFields(in);
}
-
+
public static TezTaskID readTezTaskID(DataInput in) throws IOException {
TezVertexID vertexID = TezVertexID.readTezVertexID(in);
int taskIdInt = TezID.readID(in);
diff --git a/tez-common/src/main/java/org/apache/tez/dag/records/VertexIdentifierImpl.java b/tez-common/src/main/java/org/apache/tez/dag/records/VertexIdentifierImpl.java
index 83b503203c..2a55c636d5 100644
--- a/tez-common/src/main/java/org/apache/tez/dag/records/VertexIdentifierImpl.java
+++ b/tez-common/src/main/java/org/apache/tez/dag/records/VertexIdentifierImpl.java
@@ -26,7 +26,7 @@ public class VertexIdentifierImpl implements VertexIdentifier {
private final DagIdentifier dagIdentifier;
private final TezVertexID vertexId;
private final String vertexName;
-
+
public VertexIdentifierImpl(String dagName, String vertexName, TezVertexID vertexId) {
this.vertexId = vertexId;
this.vertexName = vertexName;
@@ -42,12 +42,12 @@ public String getName() {
public int getIdentifier() {
return vertexId.getId();
}
-
+
@Override
public DagIdentifier getDagIdentifier() {
return dagIdentifier;
}
-
+
@Override
public boolean equals(Object o) {
if (this == o) {
@@ -64,12 +64,12 @@ public boolean equals(Object o) {
return false;
}
}
-
+
@Override
public String toString() {
return dagIdentifier.toString() + " Vertex: " + vertexName + ":[" + getIdentifier() + "]";
}
-
+
@Override
public int hashCode() {
return vertexId.hashCode();
diff --git a/tez-common/src/main/java/org/apache/tez/dag/utils/RelocalizationUtils.java b/tez-common/src/main/java/org/apache/tez/dag/utils/RelocalizationUtils.java
index 9ccfc76be7..2dd98720f0 100644
--- a/tez-common/src/main/java/org/apache/tez/dag/utils/RelocalizationUtils.java
+++ b/tez-common/src/main/java/org/apache/tez/dag/utils/RelocalizationUtils.java
@@ -38,7 +38,7 @@
public final class RelocalizationUtils {
private RelocalizationUtils() {}
-
+
public static List processAdditionalResources(Map additionalResources,
Configuration conf, String destDir) throws IOException {
if (additionalResources == null || additionalResources.isEmpty()) {
diff --git a/tez-common/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java b/tez-common/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
index db804c8152..8f36b8a1ea 100644
--- a/tez-common/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
+++ b/tez-common/src/main/java/org/apache/tez/util/TezMxBeanResourceCalculator.java
@@ -98,7 +98,7 @@ public float getCpuUsagePercent() {
//Returning -1 to indicate, this feature is not yet supported.
return -1;
}
-
+
private static Method getMxBeanMethod(String methodName) {
// New Method to support IBM and Oracle/OpenJDK JDK with OperatingSystemMXBean
final String JAVA_VENDOR_NAME = System.getProperty("java.vendor");
diff --git a/tez-common/src/test/java/org/apache/tez/common/TestAsyncDispatcher.java b/tez-common/src/test/java/org/apache/tez/common/TestAsyncDispatcher.java
index 2a61a578cb..3390d89e93 100644
--- a/tez-common/src/test/java/org/apache/tez/common/TestAsyncDispatcher.java
+++ b/tez-common/src/test/java/org/apache/tez/common/TestAsyncDispatcher.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -76,18 +76,18 @@ public void handle(TestEvent3 event) {
handle();
}
}
-
+
@SuppressWarnings("unchecked")
@Test (timeout=5000)
public void testBasic() throws Exception {
CountDownLatch latch = new CountDownLatch(4);
CountDownEventHandler.latch = latch;
-
+
AsyncDispatcher central = new AsyncDispatcher("Type1");
central.register(TestEventType1.class, new TestEventHandler1());
central.registerAndCreateDispatcher(TestEventType2.class, new TestEventHandler2(), "Type2");
central.registerAndCreateDispatcher(TestEventType3.class, new TestEventHandler3(), "Type3");
-
+
central.init(new Configuration());
central.start();
central.getEventHandler().handle(new TestEvent1(TestEventType1.TYPE1));
@@ -97,7 +97,7 @@ public void testBasic() throws Exception {
latch.await();
central.close();
}
-
+
@Test (timeout=5000)
public void testMultipleRegisterFail() throws Exception {
AsyncDispatcher central = new AsyncDispatcher("Type1");
@@ -110,7 +110,7 @@ public void testMultipleRegisterFail() throws Exception {
} finally {
central.close();
}
-
+
central = new AsyncDispatcher("Type1");
try {
central.registerAndCreateDispatcher(TestEventType1.class, new TestEventHandler2(), "Type2");
diff --git a/tez-common/src/test/java/org/apache/tez/common/TestAsyncDispatcherConcurrent.java b/tez-common/src/test/java/org/apache/tez/common/TestAsyncDispatcherConcurrent.java
index de7e7a7bbd..a25c571038 100644
--- a/tez-common/src/test/java/org/apache/tez/common/TestAsyncDispatcherConcurrent.java
+++ b/tez-common/src/test/java/org/apache/tez/common/TestAsyncDispatcherConcurrent.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -38,7 +38,7 @@ static void checkParallelCountersDoneAndFinish() throws Exception {
latch.countDown();
latch.await();
}
-
+
public void handle() {
latch.countDown();
try {
@@ -56,7 +56,7 @@ public TestEvent1(TestEventType1 type, int hash) {
super(type);
this.hash = hash;
}
-
+
@Override
public int getSerializingHash() {
return hash;
@@ -97,12 +97,12 @@ public void handle(TestEvent3 event) {
public void testBasic() throws Exception {
CountDownLatch latch = new CountDownLatch(4);
CountDownEventHandler.init(latch);
-
+
AsyncDispatcher central = new AsyncDispatcher("Type1");
central.register(TestEventType1.class, new TestEventHandler1());
central.registerAndCreateDispatcher(TestEventType2.class, new TestEventHandler2(), "Type2", 1);
central.registerAndCreateDispatcher(TestEventType3.class, new TestEventHandler3(), "Type3", 1);
-
+
central.init(new Configuration());
central.start();
// 3 threads in different dispatchers will handle 3 events
@@ -113,15 +113,15 @@ public void testBasic() throws Exception {
CountDownEventHandler.checkParallelCountersDoneAndFinish();
central.close();
}
-
+
@Test (timeout=5000)
public void testMultiThreads() throws Exception {
CountDownLatch latch = new CountDownLatch(4);
CountDownEventHandler.init(latch);
-
+
AsyncDispatcherConcurrent central = new AsyncDispatcherConcurrent("Type1", 1);
central.registerAndCreateDispatcher(TestEventType1.class, new TestEventHandler1(), "Type1", 3);
-
+
central.init(new Configuration());
central.start();
// 3 threads in the same dispatcher will handle 3 events
@@ -132,7 +132,7 @@ public void testMultiThreads() throws Exception {
CountDownEventHandler.checkParallelCountersDoneAndFinish();
central.close();
}
-
+
@Test (timeout=5000)
public void testMultipleRegisterFail() throws Exception {
AsyncDispatcher central = new AsyncDispatcher("Type1");
@@ -145,7 +145,7 @@ public void testMultipleRegisterFail() throws Exception {
} finally {
central.close();
}
-
+
central = new AsyncDispatcher("Type1");
try {
central.registerAndCreateDispatcher(TestEventType1.class, new TestEventHandler2(), "Type2", 1);
@@ -156,7 +156,7 @@ public void testMultipleRegisterFail() throws Exception {
} finally {
central.close();
}
-
+
central = new AsyncDispatcher("Type1");
try {
central.registerAndCreateDispatcher(TestEventType1.class, new TestEventHandler2(), "Type2", 1);
@@ -167,7 +167,7 @@ public void testMultipleRegisterFail() throws Exception {
} finally {
central.close();
}
-
+
central = new AsyncDispatcher("Type1");
try {
central.registerAndCreateDispatcher(TestEventType1.class, new TestEventHandler2(), "Type2");
@@ -178,7 +178,7 @@ public void testMultipleRegisterFail() throws Exception {
} finally {
central.close();
}
-
+
central = new AsyncDispatcher("Type1");
try {
AsyncDispatcherConcurrent concDispatcher = central.registerAndCreateDispatcher(
diff --git a/tez-common/src/test/java/org/apache/tez/common/TestTezUtils.java b/tez-common/src/test/java/org/apache/tez/common/TestTezUtils.java
index 146a2dbcf2..3b9b7cae6e 100644
--- a/tez-common/src/test/java/org/apache/tez/common/TestTezUtils.java
+++ b/tez-common/src/test/java/org/apache/tez/common/TestTezUtils.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -155,7 +155,7 @@ public void testBitSetFromByteArray() {
bytes = TezUtilsInternal.toByteArray(bitSet);
Assert.assertEquals(TezUtilsInternal.fromByteArray(bytes).cardinality(), bitSet.cardinality());
Assert.assertTrue(TezUtilsInternal.fromByteArray(bytes).equals(bitSet));
-
+
bitSet = createBitSet(1000);
bytes = TezUtilsInternal.toByteArray(bitSet);
Assert.assertEquals(TezUtilsInternal.fromByteArray(bytes).cardinality(), bitSet.cardinality());
@@ -167,7 +167,7 @@ public void testBitSetConversion() {
for (int i = 0 ; i < 16 ; i++) {
BitSet bitSet = createBitSetWithSingleEntry(i);
byte[] bytes = TezUtilsInternal.toByteArray(bitSet);
-
+
BitSet deseraialized = TezUtilsInternal.fromByteArray(bytes);
Assert.assertEquals(bitSet, deseraialized);
Assert.assertEquals(bitSet.cardinality(), deseraialized.cardinality());
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/api/client/DAGClientHandler.java b/tez-dag/src/main/java/org/apache/tez/dag/api/client/DAGClientHandler.java
index 098cfe88ab..d30d29436c 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/api/client/DAGClientHandler.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/api/client/DAGClientHandler.java
@@ -47,7 +47,7 @@ public class DAGClientHandler {
private DAGAppMaster dagAppMaster;
private final AtomicLong lastHeartbeatTime;
-
+
public DAGClientHandler(DAGAppMaster dagAppMaster) {
this.dagAppMaster = dagAppMaster;
this.lastHeartbeatTime = new AtomicLong(dagAppMaster.getContext().getClock().getTime());
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/api/oldrecords/TaskAttemptReport.java b/tez-dag/src/main/java/org/apache/tez/dag/api/oldrecords/TaskAttemptReport.java
index a2ee7e38ac..699e592fca 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/api/oldrecords/TaskAttemptReport.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/api/oldrecords/TaskAttemptReport.java
@@ -52,13 +52,13 @@ public interface TaskAttemptReport {
public abstract void setNodeManagerPort(int nmPort);
public abstract void setNodeManagerHttpPort(int nmHttpPort);
public abstract void setContainerId(ContainerId containerId);
-
- /**
+
+ /**
* Set the shuffle finish time. Applicable only for reduce attempts
* @param time the time the shuffle finished.
*/
public abstract void setShuffleFinishTime(long time);
- /**
+ /**
* Set the sort/merge finish time. Applicable only for reduce attempts
* @param time the time the shuffle finished.
*/
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/api/oldrecords/TaskAttemptState.java b/tez-dag/src/main/java/org/apache/tez/dag/api/oldrecords/TaskAttemptState.java
index 926835a97d..4b13e098d3 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/api/oldrecords/TaskAttemptState.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/api/oldrecords/TaskAttemptState.java
@@ -19,9 +19,9 @@
package org.apache.tez.dag.api.oldrecords;
public enum TaskAttemptState {
- NEW,
- STARTING,
- RUNNING,
+ NEW,
+ STARTING,
+ RUNNING,
SUCCEEDED,
FAILED,
KILLED
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/AppContext.java b/tez-dag/src/main/java/org/apache/tez/dag/app/AppContext.java
index c3258b426a..c60fae15b1 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/AppContext.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/AppContext.java
@@ -57,9 +57,9 @@ public interface AppContext {
ApplicationId getApplicationID();
TezDAGID getCurrentDAGID();
-
+
long getCumulativeCPUTime();
-
+
long getCumulativeGCTime();
ApplicationAttemptId getApplicationAttemptId();
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/ClusterInfo.java b/tez-dag/src/main/java/org/apache/tez/dag/app/ClusterInfo.java
index b30783887a..bd5ca0edcc 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/ClusterInfo.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/ClusterInfo.java
@@ -27,7 +27,7 @@ public class ClusterInfo {
public ClusterInfo() {
}
-
+
public ClusterInfo(Resource maxCapability) {
this.maxContainerCapability = maxCapability;
initialized = true;
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerContext.java b/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerContext.java
index 0e1726127a..98bfecf0b0 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerContext.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerContext.java
@@ -59,7 +59,7 @@ public ContainerContext(Map localResources,
this.javaOpts = javaOpts;
this.vertex = null;
}
-
+
public ContainerContext(Map localResources,
Credentials credentials, Map environment, String javaOpts,
@Nullable Vertex vertex) {
@@ -114,7 +114,7 @@ public boolean isSuperSet(ContainerContext otherContext) {
return isSuperSet(this.environment, otherContext.getEnvironment(), "Environment")
&& localResourcesCompatible(this.localResources, otherContext.getLocalResources());
}
-
+
/**
* @return true if this ContainerContext is an exact match of the specified
* container context.
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerHeartbeatHandler.java b/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerHeartbeatHandler.java
index e494fa6069..4c74f8be04 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerHeartbeatHandler.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/ContainerHeartbeatHandler.java
@@ -27,8 +27,8 @@
public class ContainerHeartbeatHandler extends
HeartbeatHandlerBase {
-
- public ContainerHeartbeatHandler(AppContext context,
+
+ public ContainerHeartbeatHandler(AppContext context,
int expectedConcurrency) {
super(context, expectedConcurrency, "ContainerHeartbeatHandler");
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/HeartbeatHandlerBase.java b/tez-dag/src/main/java/org/apache/tez/dag/app/HeartbeatHandlerBase.java
index b5ded81500..d7898f8d85 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/HeartbeatHandlerBase.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/HeartbeatHandlerBase.java
@@ -35,12 +35,12 @@ public abstract class HeartbeatHandlerBase extends AbstractService {
protected int timeOutCheckInterval;
protected Thread timeOutCheckerThread;
private final String name;
-
+
@SuppressWarnings("rawtypes")
protected final EventHandler eventHandler;
protected final Clock clock;
protected final AppContext appContext;
-
+
private ConcurrentMap runningMap;
public HeartbeatHandlerBase(AppContext appContext, int expectedConcurrency, String name) {
@@ -73,67 +73,67 @@ public void serviceStop() {
timeOutCheckerThread.interrupt();
}
}
-
+
protected Runnable createPingChecker() {
return new PingChecker();
}
protected abstract int getConfiguredTimeout(Configuration conf);
protected abstract int getConfiguredTimeoutCheckInterval(Configuration conf);
-
+
public void progressing(T id) {
ReportTime time = runningMap.get(id);
if (time != null) {
time.setLastProgress(clock.getTime());
}
}
-
+
public void pinged(T id) {
ReportTime time = runningMap.get(id);
if (time != null) {
time.setLastPing(clock.getTime());
}
}
-
+
public void register(T id) {
runningMap.put(id, new ReportTime(clock.getTime()));
}
-
+
public void unregister(T id) {
runningMap.remove(id);
}
-
-
-
+
+
+
protected static class ReportTime {
private long lastPing;
private long lastProgress;
-
+
public ReportTime(long time) {
setLastProgress(time);
}
-
+
public synchronized void setLastPing(long time) {
lastPing = time;
}
-
+
public synchronized void setLastProgress(long time) {
lastProgress = time;
lastPing = time;
}
-
+
public synchronized long getLastPing() {
return lastPing;
}
-
+
public synchronized long getLastProgress() {
return lastProgress;
}
}
-
+
protected abstract boolean hasTimedOut(ReportTime report, long currentTime);
-
+
protected abstract void handleTimeOut(T t);
-
+
private class PingChecker implements Runnable {
@Override
@@ -146,7 +146,7 @@ public void run() {
long currentTime = clock.getTime();
while (iterator.hasNext()) {
- Map.Entry entry = iterator.next();
+ Map.Entry entry = iterator.next();
if(hasTimedOut(entry.getValue(), currentTime)) {
// Timed out. Removed from list and send out an event.
iterator.remove();
@@ -161,5 +161,5 @@ public void run() {
}
}
}
-
+
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/TaskAttemptEventInfo.java b/tez-dag/src/main/java/org/apache/tez/dag/app/TaskAttemptEventInfo.java
index d6b03e4ecd..f1a6d7127c 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/TaskAttemptEventInfo.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/TaskAttemptEventInfo.java
@@ -25,17 +25,17 @@ public class TaskAttemptEventInfo {
private final int nextFromEventId;
private final int nextPreRoutedFromEventId;
private final List events;
-
+
public TaskAttemptEventInfo(int nextFromEventId, List events, int nextPreRoutedEventId) {
this.nextFromEventId = nextFromEventId;
this.nextPreRoutedFromEventId = nextPreRoutedEventId;
this.events = events;
}
-
+
public int getNextFromEventId() {
return nextFromEventId;
}
-
+
public int getNextPreRoutedFromEventId() {
return nextPreRoutedFromEventId;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorManagerInterface.java b/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorManagerInterface.java
index 93e98493d6..e8a703aac0 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorManagerInterface.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/TaskCommunicatorManagerInterface.java
@@ -35,9 +35,9 @@ public interface TaskCommunicatorManagerInterface {
void registerRunningContainer(ContainerId containerId, int taskCommId);
void registerTaskAttempt(AMContainerTask amContainerTask, ContainerId containerId, int taskCommId);
-
+
void unregisterRunningContainer(ContainerId containerId, int taskCommId, ContainerEndReason endReason, String diagnostics);
-
+
void unregisterTaskAttempt(TezTaskAttemptID attemptID, int taskCommId, TaskAttemptEndReason endReason, String diagnostics);
void dagComplete(DAG dag);
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/TaskHeartbeatHandler.java b/tez-dag/src/main/java/org/apache/tez/dag/app/TaskHeartbeatHandler.java
index 296073a426..ea19e7e4ee 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/TaskHeartbeatHandler.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/TaskHeartbeatHandler.java
@@ -32,7 +32,7 @@
* This class keeps track of tasks that have already been launched. It
* determines if a task is alive and running or marks a task as dead if it does
* not hear from it for a long time.
- *
+ *
*/
@SuppressWarnings({"unchecked"})
public class TaskHeartbeatHandler extends HeartbeatHandlerBase {
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/DAGScheduler.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/DAGScheduler.java
index ada7867a6a..06a3b68b6a 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/DAGScheduler.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/DAGScheduler.java
@@ -37,9 +37,9 @@ private static class VertexInfo {
this.concurrencyLimit = limit;
}
}
-
+
Map vertexInfo = null;
-
+
public void addVertexConcurrencyLimit(TezVertexID vId, int concurrency) {
if (vertexInfo == null) {
vertexInfo = new HashMap<>();
@@ -48,7 +48,7 @@ public void addVertexConcurrencyLimit(TezVertexID vId, int concurrency) {
vertexInfo.put(vId, new VertexInfo(concurrency));
}
}
-
+
public void scheduleTask(DAGEventSchedulerUpdate event) {
VertexInfo vInfo = null;
if (vertexInfo != null) {
@@ -56,7 +56,7 @@ public void scheduleTask(DAGEventSchedulerUpdate event) {
}
scheduleTaskWithLimit(event, vInfo);
}
-
+
private void scheduleTaskWithLimit(DAGEventSchedulerUpdate event, VertexInfo vInfo) {
if (vInfo != null) {
if (vInfo.concurrency >= vInfo.concurrencyLimit) {
@@ -67,7 +67,7 @@ private void scheduleTaskWithLimit(DAGEventSchedulerUpdate event, VertexInfo vIn
}
scheduleTaskEx(event);
}
-
+
public void taskCompleted(DAGEventSchedulerUpdate event) {
taskCompletedEx(event);
if (vertexInfo != null) {
@@ -85,9 +85,9 @@ public void taskCompleted(DAGEventSchedulerUpdate event) {
}
}
}
-
+
public abstract void scheduleTaskEx(DAGEventSchedulerUpdate event);
-
+
public abstract void taskCompletedEx(DAGEventSchedulerUpdate event);
/**
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/DAGState.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/DAGState.java
index 1acc08db1d..6d5164fb56 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/DAGState.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/DAGState.java
@@ -24,7 +24,7 @@ public enum DAGState {
SUCCEEDED,
FAILED,
KILLED,
- ERROR,
+ ERROR,
TERMINATING,
COMMITTING,
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/DAGTerminationCause.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/DAGTerminationCause.java
index b73cbe647b..3b69f7c96c 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/DAGTerminationCause.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/DAGTerminationCause.java
@@ -20,7 +20,7 @@
/**
- * Represents proximate cause of a DAG transition to FAILED or KILLED.
+ * Represents proximate cause of a DAG transition to FAILED or KILLED.
*/
public enum DAGTerminationCause {
@@ -29,16 +29,16 @@ public enum DAGTerminationCause {
/** A service plugin indicated an error */
SERVICE_PLUGIN_ERROR(DAGState.FAILED),
-
- /** A vertex failed. */
+
+ /** A vertex failed. */
VERTEX_FAILURE(DAGState.FAILED),
-
+
/** DAG failed due as it had zero vertices. */
ZERO_VERTICES(DAGState.FAILED),
-
+
/** DAG failed during init. */
INIT_FAILURE(DAGState.FAILED),
-
+
/** DAG failed during output commit. */
COMMIT_FAILURE(DAGState.FAILED),
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/StateChangeNotifier.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/StateChangeNotifier.java
index 99cb4ac768..753e4e093c 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/StateChangeNotifier.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/StateChangeNotifier.java
@@ -52,7 +52,7 @@
public class StateChangeNotifier {
private static final Logger LOG = LoggerFactory.getLogger(StateChangeNotifier.class);
-
+
private final DAG dag;
private final SetMultimap vertexListeners;
private final ListMultimap lastKnowStatesMap;
@@ -62,20 +62,20 @@ public class StateChangeNotifier {
BlockingQueue eventQueue = new LinkedBlockingQueue();
private Thread eventHandlingThread;
private volatile boolean stopEventHandling = false;
-
+
private static class NotificationEvent {
final VertexStateUpdate update;
final VertexStateUpdateListener listener;
-
+
public NotificationEvent(VertexStateUpdate update, VertexStateUpdateListener listener) {
this.update = update;
this.listener = listener;
}
-
+
void sendUpdate() {
listener.onStateUpdated(update);
}
-
+
@Override
public String toString() {
return "[ VertexState:(" + update + ") Listener:" + listener + " ]";
@@ -89,7 +89,7 @@ public StateChangeNotifier(DAG dag) {
this.lastKnowStatesMap = LinkedListMultimap.create();
startThread();
}
-
+
private void startThread() {
this.eventHandlingThread = new Thread("State Change Notifier DAG: " + dag.getID()) {
@SuppressWarnings("unchecked")
@@ -123,15 +123,15 @@ public void run() {
this.eventHandlingThread.setDaemon(true); // dont block exit on this
this.eventHandlingThread.start();
}
-
+
@VisibleForTesting
protected void processedEventFromQueue() {
}
-
+
@VisibleForTesting
protected void addedEventToQueue() {
}
-
+
public void stop() {
this.stopEventHandling = true;
if (eventHandlingThread != null)
@@ -207,7 +207,7 @@ private void enqueueNotification(NotificationEvent event) {
LOG.error("Failed to put event", e);
}
}
-
+
private final class ListenerContainer {
final VertexStateUpdateListener listener;
final Set states;
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Task.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Task.java
index cb1bc33866..e9d8667838 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Task.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Task.java
@@ -52,23 +52,23 @@ public interface Task extends TaskIDAware {
* Can the output of the taskAttempt be committed. Note that once the task
* gives a go for a commit, further canCommit requests from any other attempts
* should return false.
- *
+ *
* @param taskAttemptID
* @return whether the attempt's output can be committed or not.
*/
boolean canCommit(TezTaskAttemptID taskAttemptID);
-
+
public Vertex getVertex();
-
+
public ArrayList getTaskAttemptTezEvents(TezTaskAttemptID attemptID,
int fromEventId, int maxEvents);
-
+
public List getDiagnostics();
public void registerTezEvent(TezEvent tezEvent);
-
+
public TaskSpec getBaseTaskSpec();
-
+
public TaskLocationHint getTaskLocationHint();
long getFirstAttemptStartTime();
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/TaskAttempt.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/TaskAttempt.java
index d8818671fd..7e921bf021 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/TaskAttempt.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/TaskAttempt.java
@@ -45,7 +45,7 @@ public static class TaskAttemptStatus {
public TaskAttemptState state;
public float progress;
public TezCounters counters;
-
+
public TaskAttemptStatus(TezTaskAttemptID id) {
this.id = id;
}
@@ -82,10 +82,10 @@ public void setCounters(TezCounters counters) {
float getProgress();
TaskAttemptState getState();
TaskAttemptState getStateNoLock();
-
+
void setLastEventSent(TezEvent lastEventSent);
- /**
+ /**
* Has attempt reached the final state or not.
* @return true if it has finished, else false
*/
@@ -95,7 +95,7 @@ public void setCounters(TezCounters counters) {
* @return the container ID if a container is assigned, otherwise null.
*/
ContainerId getAssignedContainerID();
-
+
/**
* @return the container if assigned, otherwise null
*/
@@ -105,23 +105,23 @@ public void setCounters(TezCounters counters) {
* @return container mgr address if a container is assigned, otherwise null.
*/
String getAssignedContainerMgrAddress();
-
+
/**
* @return node's id if a container is assigned, otherwise null.
*/
NodeId getNodeId();
-
+
/**
* @return node's http address if a container is assigned, otherwise null.
*/
String getNodeHttpAddress();
-
+
/**
* @return node's rack name if a container is assigned, otherwise null.
*/
String getNodeRackName();
- /**
+ /**
* @return time at which container is launched. If container is not launched
* yet, returns 0.
*/
@@ -133,7 +133,7 @@ public void setCounters(TezCounters counters) {
*/
long getScheduleTime();
- /**
+ /**
* @return attempt's finish time. If attempt is not finished
* yet, returns 0.
*/
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/TaskAttemptStateInternal.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/TaskAttemptStateInternal.java
index 6ddfabb0d0..5da3363fcb 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/TaskAttemptStateInternal.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/TaskAttemptStateInternal.java
@@ -30,7 +30,7 @@ public enum TaskAttemptStateInternal {
START_WAIT,
SUBMITTED,
RUNNING,
- KILL_IN_PROGRESS,
+ KILL_IN_PROGRESS,
FAIL_IN_PROGRESS,
KILLED,
FAILED,
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/TaskTerminationCause.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/TaskTerminationCause.java
index e2ae8dadbc..e7e6733017 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/TaskTerminationCause.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/TaskTerminationCause.java
@@ -28,10 +28,10 @@ public enum TaskTerminationCause {
/** Other vertex failed causing DAG to fail thus killing the parent vertex */
OTHER_VERTEX_FAILURE,
-
+
/** One of the tasks for the source/destination vertex failed. */
- OTHER_TASK_FAILURE,
-
+ OTHER_TASK_FAILURE,
+
/** One of the tasks of the destination vertex failed. */
OWN_TASK_FAILURE,
@@ -39,6 +39,6 @@ public enum TaskTerminationCause {
* throw Exception
*/
AM_USERCODE_FAILURE,
-
+
TASK_RESCHEDULE_IN_COMMITTING,
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Vertex.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Vertex.java
index 49c78aab03..5c0feb5af8 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Vertex.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/Vertex.java
@@ -113,15 +113,15 @@ void setParallelism(int parallelism, VertexLocationHint vertexLocationHint,
Map sourceEdgeManagers,
Map rootInputSpecUpdate, boolean fromVertexManager)
throws AMUserCodeException;
-
+
public void reconfigureVertex(int parallelism,
@Nullable VertexLocationHint locationHint,
@Nullable Map sourceEdgeProperties) throws AMUserCodeException;
-
+
public void reconfigureVertex(@Nullable Map rootInputSpecUpdate,
int parallelism,
@Nullable VertexLocationHint locationHint) throws AMUserCodeException;
-
+
public void reconfigureVertex(int parallelism,
@Nullable VertexLocationHint locationHint,
@Nullable Map sourceEdgeProperties,
@@ -136,25 +136,25 @@ public void reconfigureVertex(int parallelism,
void setOutputVertices(Map outVertices);
VertexStatistics getStatistics();
-
+
Map getInputVertices();
Map getOutputVertices();
-
+
Map getOutputCommitters();
void setAdditionalInputs(List inputs);
void setAdditionalOutputs(List outputs);
@Nullable
- public Map>
+ public Map>
getAdditionalInputs();
@Nullable
- public Map>
+ public Map>
getAdditionalOutputs();
List getInputSpecList(int taskIndex) throws AMUserCodeException;
List getOutputSpecList(int taskIndex) throws AMUserCodeException;
-
+
List getGroupInputSpecList();
void addSharedOutputs(Set outputs);
Set getSharedOutputs();
@@ -164,10 +164,10 @@ public void reconfigureVertex(int parallelism,
void scheduleTasks(List tasks);
void scheduleSpeculativeTask(TezTaskID taskId);
Resource getTaskResource();
-
+
public TaskAttemptEventInfo getTaskAttemptTezEvents(TezTaskAttemptID attemptID,
int fromEventId, int nextPreRoutedFromEventId, int maxEvents);
-
+
void handleSpeculatorEvent(SpeculatorEvent event);
AbstractService getSpeculator();
void initServices();
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/VertexTerminationCause.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/VertexTerminationCause.java
index 49be74df8d..60fd577c32 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/VertexTerminationCause.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/VertexTerminationCause.java
@@ -31,7 +31,7 @@ public enum VertexTerminationCause {
/** Initialization failed for one of the root Inputs */
ROOT_INPUT_INIT_FAILURE(VertexState.FAILED),
-
+
/** This vertex failed as its AM usercode (VertexManager/EdgeManager/InputInitializer)
* throw Exception
*/
@@ -54,10 +54,10 @@ public enum VertexTerminationCause {
/** This vertex failed during init. */
INIT_FAILURE(VertexState.FAILED),
-
+
INTERNAL_ERROR(VertexState.ERROR),
-
- /** error when writing recovery log */
+
+ /** error when writing recovery log */
RECOVERY_ERROR(VertexState.FAILED),
/** This vertex failed due to counter limits exceeded. */
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/CallableEventType.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/CallableEventType.java
index e9e93b9869..4d9b308abb 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/CallableEventType.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/CallableEventType.java
@@ -19,7 +19,7 @@
package org.apache.tez.dag.app.dag.event;
public enum CallableEventType {
-
+
CALLABLE,
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventCounterUpdate.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventCounterUpdate.java
index 3683a4951b..9cdeea2bc5 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventCounterUpdate.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventCounterUpdate.java
@@ -26,7 +26,7 @@
public class DAGEventCounterUpdate extends DAGEvent {
List counterUpdates = null;
-
+
public DAGEventCounterUpdate(TezDAGID dagId) {
super(dagId, DAGEventType.DAG_COUNTER_UPDATE);
counterUpdates = new ArrayList<>();
@@ -35,20 +35,20 @@ public DAGEventCounterUpdate(TezDAGID dagId) {
public void addCounterUpdate(Enum> key, long incrValue) {
counterUpdates.add(new CounterIncrementalUpdate(key, incrValue));
}
-
+
public List getCounterUpdates() {
return counterUpdates;
}
-
+
public static class CounterIncrementalUpdate {
Enum> key;
long incrValue;
-
+
public CounterIncrementalUpdate(Enum> key, long incrValue) {
this.key = key;
this.incrValue = incrValue;
}
-
+
public Enum> getCounterKey() {
return key;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventRecoverEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventRecoverEvent.java
index 8e1edf0e43..2667e7ca26 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventRecoverEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventRecoverEvent.java
@@ -32,15 +32,15 @@ public DAGEventRecoverEvent(TezDAGID dagId, DAGState desiredState, DAGRecoveryDa
this.desiredState = desiredState;
this.recoveredDagData = recoveredDagData;
}
-
+
public DAGEventRecoverEvent(TezDAGID dagId, DAGRecoveryData recoveredDagData) {
this(dagId, null, recoveredDagData);
}
-
+
public DAGState getDesiredState() {
return desiredState;
}
-
+
public boolean hasDesiredState() {
return this.desiredState != null;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventSchedulerUpdate.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventSchedulerUpdate.java
index 1dedaecad9..317d50b6e2 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventSchedulerUpdate.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventSchedulerUpdate.java
@@ -28,21 +28,21 @@ public enum UpdateType {
TA_SCHEDULE,
TA_COMPLETED
}
-
+
private final TaskAttempt attempt;
private final UpdateType updateType;
-
+
public DAGEventSchedulerUpdate(UpdateType updateType, TaskAttempt attempt) {
super(attempt.getDAGID(),
DAGEventType.DAG_SCHEDULER_UPDATE);
this.attempt = attempt;
this.updateType = updateType;
}
-
+
public UpdateType getUpdateType() {
return updateType;
}
-
+
public TaskAttempt getAttempt() {
return attempt;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventStartDag.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventStartDag.java
index 9e6d75b019..164fc65f21 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventStartDag.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/DAGEventStartDag.java
@@ -26,7 +26,7 @@
public class DAGEventStartDag extends DAGEvent {
private final List additionalUrlsForClasspath;
-
+
public DAGEventStartDag(TezDAGID dagId, List additionalUrlsForClasspath) {
super(dagId, DAGEventType.DAG_START);
this.additionalUrlsForClasspath = additionalUrlsForClasspath;
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/SpeculatorEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/SpeculatorEvent.java
index 3863a2a6f4..2500b38df4 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/SpeculatorEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/SpeculatorEvent.java
@@ -23,12 +23,12 @@
public class SpeculatorEvent extends TezAbstractEvent {
private final TezVertexID vertexId;
-
+
public SpeculatorEvent(SpeculatorEventType type, TezVertexID vertexId) {
super(type);
this.vertexId = vertexId;
}
-
+
public TezVertexID getVertexId() {
return vertexId;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/SpeculatorEventTaskAttemptStatusUpdate.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/SpeculatorEventTaskAttemptStatusUpdate.java
index 7ab6141c39..c3325c9386 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/SpeculatorEventTaskAttemptStatusUpdate.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/SpeculatorEventTaskAttemptStatusUpdate.java
@@ -26,12 +26,12 @@ public class SpeculatorEventTaskAttemptStatusUpdate extends SpeculatorEvent {
final TaskAttemptState state;
final long timestamp;
final boolean justStarted;
-
+
public SpeculatorEventTaskAttemptStatusUpdate(TezTaskAttemptID taId, TaskAttemptState state,
long timestamp) {
this(taId, state, timestamp, false);
}
-
+
public SpeculatorEventTaskAttemptStatusUpdate(TezTaskAttemptID taId, TaskAttemptState state,
long timestamp, boolean justStarted) {
super(SpeculatorEventType.S_TASK_ATTEMPT_STATUS_UPDATE, taId.getVertexID());
@@ -44,15 +44,15 @@ public SpeculatorEventTaskAttemptStatusUpdate(TezTaskAttemptID taId, TaskAttempt
public long getTimestamp() {
return timestamp;
}
-
+
public TezTaskAttemptID getAttemptId() {
return id;
}
-
+
public boolean hasJustStarted() {
return justStarted;
}
-
+
public TaskAttemptState getTaskAttemptState() {
return state;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/SpeculatorEventType.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/SpeculatorEventType.java
index f3b5c10503..81673eb5b4 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/SpeculatorEventType.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/SpeculatorEventType.java
@@ -25,5 +25,5 @@ public enum SpeculatorEventType {
//Producer:TaskAttempt
S_TASK_ATTEMPT_STATUS_UPDATE,
-
+
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEvent.java
index d5d8481a54..489082ae30 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEvent.java
@@ -29,7 +29,7 @@
public class TaskAttemptEvent extends TezAbstractEvent implements TaskAttemptIDAware {
private TezTaskAttemptID attemptID;
-
+
/**
* Create a new TaskAttemptEvent.
* @param id the id of the task attempt
@@ -44,7 +44,7 @@ public TaskAttemptEvent(TezTaskAttemptID id, TaskAttemptEventType type) {
public TezTaskAttemptID getTaskAttemptID() {
return attemptID;
}
-
+
@Override
public int getSerializingHash() {
return attemptID.getTaskID().getSerializingHash();
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventAttemptFailed.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventAttemptFailed.java
index d4c7273c97..677c47b8d1 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventAttemptFailed.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventAttemptFailed.java
@@ -24,7 +24,7 @@
import org.apache.tez.dag.records.TezTaskAttemptID;
import org.apache.tez.runtime.api.TaskFailureType;
-public class TaskAttemptEventAttemptFailed extends TaskAttemptEvent
+public class TaskAttemptEventAttemptFailed extends TaskAttemptEvent
implements DiagnosableEvent, TaskAttemptEventTerminationCauseEvent, RecoveryEvent {
private final String diagnostics;
@@ -56,7 +56,7 @@ public TaskAttemptEventAttemptFailed(TezTaskAttemptID id,
public String getDiagnosticInfo() {
return diagnostics;
}
-
+
@Override
public TaskAttemptTerminationCause getTerminationCause() {
return errorCause;
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventAttemptKilled.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventAttemptKilled.java
index 4642443848..7ee228a9cd 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventAttemptKilled.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventAttemptKilled.java
@@ -43,7 +43,7 @@ public TaskAttemptEventAttemptKilled(TezTaskAttemptID id,
this(id, diagnostics, errorCause);
this.fromRecovery = fromRecovery;
}
-
+
@Override
public String getDiagnosticInfo() {
return diagnostics;
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventContainerTerminated.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventContainerTerminated.java
index 3db2ffcbb8..5d41176d28 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventContainerTerminated.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventContainerTerminated.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventContainerTerminatedBySystem.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventContainerTerminatedBySystem.java
index 4efbf88948..6d21476928 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventContainerTerminatedBySystem.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventContainerTerminatedBySystem.java
@@ -22,7 +22,7 @@
import org.apache.tez.dag.records.TaskAttemptTerminationCause;
import org.apache.tez.dag.records.TezTaskAttemptID;
-public class TaskAttemptEventContainerTerminatedBySystem extends TaskAttemptEvent
+public class TaskAttemptEventContainerTerminatedBySystem extends TaskAttemptEvent
implements DiagnosableEvent, TaskAttemptEventTerminationCauseEvent {
private final ContainerId containerId;
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventContainerTerminating.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventContainerTerminating.java
index 02d04a5dcc..d8a3dadabf 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventContainerTerminating.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventContainerTerminating.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventKillRequest.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventKillRequest.java
index 96cf0e6bdf..5609df0697 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventKillRequest.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventKillRequest.java
@@ -20,7 +20,7 @@
import org.apache.tez.dag.records.TaskAttemptTerminationCause;
import org.apache.tez.dag.records.TezTaskAttemptID;
-public class TaskAttemptEventKillRequest extends TaskAttemptEvent
+public class TaskAttemptEventKillRequest extends TaskAttemptEvent
implements DiagnosableEvent, TaskAttemptEventTerminationCauseEvent, RecoveryEvent {
private final String message;
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventNodeFailed.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventNodeFailed.java
index 541ef00418..3ad88dc58f 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventNodeFailed.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventNodeFailed.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -20,7 +20,7 @@
import org.apache.tez.dag.records.TaskAttemptTerminationCause;
import org.apache.tez.dag.records.TezTaskAttemptID;
-public class TaskAttemptEventNodeFailed extends TaskAttemptEvent
+public class TaskAttemptEventNodeFailed extends TaskAttemptEvent
implements DiagnosableEvent, TaskAttemptEventTerminationCauseEvent {
private final String message;
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventOutputFailed.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventOutputFailed.java
index fbdd2305c7..5696f4ba00 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventOutputFailed.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventOutputFailed.java
@@ -22,23 +22,23 @@
import org.apache.tez.dag.records.TezTaskAttemptID;
import org.apache.tez.runtime.api.impl.TezEvent;
-public class TaskAttemptEventOutputFailed extends TaskAttemptEvent
+public class TaskAttemptEventOutputFailed extends TaskAttemptEvent
implements TaskAttemptEventTerminationCauseEvent {
-
+
private TezEvent inputFailedEvent;
private int consumerTaskNumber;
-
+
public TaskAttemptEventOutputFailed(TezTaskAttemptID sourceTaskAttemptId,
TezEvent tezEvent, int numConsumers) {
super(sourceTaskAttemptId, TaskAttemptEventType.TA_OUTPUT_FAILED);
this.inputFailedEvent = tezEvent;
this.consumerTaskNumber = numConsumers;
}
-
+
public TezEvent getInputFailedEvent() {
return inputFailedEvent;
}
-
+
public int getConsumerTaskNumber() {
return consumerTaskNumber;
}
@@ -47,5 +47,5 @@ public int getConsumerTaskNumber() {
public TaskAttemptTerminationCause getTerminationCause() {
return TaskAttemptTerminationCause.OUTPUT_LOST;
}
-
+
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventSchedule.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventSchedule.java
index 5c02db9a83..f08faf4a6a 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventSchedule.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventSchedule.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -33,7 +33,7 @@ public TaskAttemptEventSchedule(TezTaskAttemptID id, int lowLimit, int highLimit
public int getPriorityLowLimit() {
return priLowLimit;
}
-
+
public int getPriorityHighLimit() {
return priHighLimit;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventStatusUpdate.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventStatusUpdate.java
index 458679c74b..eac3f72592 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventStatusUpdate.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventStatusUpdate.java
@@ -22,24 +22,24 @@
import org.apache.tez.runtime.api.events.TaskStatusUpdateEvent;
public class TaskAttemptEventStatusUpdate extends TaskAttemptEvent {
-
+
private TaskStatusUpdateEvent taskAttemptStatus;
private boolean readErrorReported = false;
-
+
public TaskAttemptEventStatusUpdate(TezTaskAttemptID id,
TaskStatusUpdateEvent statusEvent) {
super(id, TaskAttemptEventType.TA_STATUS_UPDATE);
this.taskAttemptStatus = statusEvent;
}
-
+
public TaskStatusUpdateEvent getStatusEvent() {
return this.taskAttemptStatus;
}
-
+
public void setReadErrorReported(boolean value) {
readErrorReported = value;
}
-
+
public boolean getReadErrorReported() {
return readErrorReported;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventType.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventType.java
index 63779fd948..99620f7592 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventType.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskAttemptEventType.java
@@ -35,7 +35,7 @@ public enum TaskAttemptEventType {
TA_FAILED,
TA_KILLED, // Generated by TaskCommunicators
TA_TIMED_OUT,
-
+
//Producer: Client, Scheduler, On speculation.
TA_KILL_REQUEST,
@@ -54,8 +54,8 @@ public enum TaskAttemptEventType {
// The node running the task attempt failed.
TA_NODE_FAILED,
-
+
// Producer: consumer destination vertex
TA_OUTPUT_FAILED,
-
+
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEvent.java
index 9e741388fa..8db7f109fc 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEvent.java
@@ -39,7 +39,7 @@ public TaskEvent(TezTaskID taskId, TaskEventType type) {
public TezTaskID getTaskID() {
return taskId;
}
-
+
@Override
public int getSerializingHash() {
return taskId.getSerializingHash();
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEventScheduleTask.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEventScheduleTask.java
index 70d6043f40..dd6bb8046c 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEventScheduleTask.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEventScheduleTask.java
@@ -34,11 +34,11 @@ public TaskEventScheduleTask(TezTaskID taskId, TaskSpec baseTaskSpec, TaskLocati
this.locationHint = locationHint;
this.fromRecovery = fromRecovery;
}
-
+
public TaskSpec getBaseTaskSpec() {
return baseTaskSpec;
}
-
+
public TaskLocationHint getTaskLocationHint() {
return locationHint;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEventType.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEventType.java
index 726e13e23f..e92a0763ca 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEventType.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/TaskEventType.java
@@ -25,7 +25,7 @@ public enum TaskEventType {
//Producer:Client, Job
T_TERMINATE,
-
+
//Producer:Job
T_SCHEDULE,
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventInputDataInformation.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventInputDataInformation.java
index 6b5cad5ab7..ec73fcf4c3 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventInputDataInformation.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventInputDataInformation.java
@@ -27,12 +27,12 @@
public class VertexEventInputDataInformation extends VertexEvent {
private final List events;
-
+
public VertexEventInputDataInformation(TezVertexID vertexId, List events) {
super(vertexId, VertexEventType.V_INPUT_DATA_INFORMATION);
this.events = events;
}
-
+
public List getEvents() {
return events;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventManagerUserCodeError.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventManagerUserCodeError.java
index 022620a064..4b2f0ddba1 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventManagerUserCodeError.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventManagerUserCodeError.java
@@ -23,12 +23,12 @@
public class VertexEventManagerUserCodeError extends VertexEvent {
final AMUserCodeException e;
-
+
public VertexEventManagerUserCodeError(TezVertexID vertexId, AMUserCodeException e) {
super(vertexId, VertexEventType.V_MANAGER_USER_CODE_ERROR);
this.e = e;
}
-
+
public AMUserCodeException getError() {
return e;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventNullEdgeInitialized.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventNullEdgeInitialized.java
index bedf28b4fd..f4247d547f 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventNullEdgeInitialized.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventNullEdgeInitialized.java
@@ -25,17 +25,17 @@
public class VertexEventNullEdgeInitialized extends VertexEvent {
final Edge edge;
final Vertex vertex;
-
+
public VertexEventNullEdgeInitialized(TezVertexID vertexId, Edge edge, Vertex vertex) {
super(vertexId, VertexEventType.V_NULL_EDGE_INITIALIZED);
this.edge = edge;
this.vertex = vertex;
}
-
+
public Edge getEdge() {
return edge;
}
-
+
public Vertex getVertex() {
return vertex;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventRootInputFailed.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventRootInputFailed.java
index b7701d7b03..a6949ffe16 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventRootInputFailed.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventRootInputFailed.java
@@ -22,7 +22,7 @@
import org.apache.tez.dag.records.TezVertexID;
public class VertexEventRootInputFailed extends VertexEvent {
-
+
private final String inputName;
private final AMUserCodeException error;
@@ -31,11 +31,11 @@ public VertexEventRootInputFailed(TezVertexID vertexId, String inputName, AMUser
this.inputName = inputName;
this.error = error;
}
-
+
public AMUserCodeException getError() {
return this.error;
}
-
+
public String getInputName() {
return this.inputName;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventRootInputInitialized.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventRootInputInitialized.java
index 3c5e0be9cf..2383d345f3 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventRootInputInitialized.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventRootInputInitialized.java
@@ -38,11 +38,11 @@ public VertexEventRootInputInitialized(TezVertexID vertexId, String inputName, L
this.events = events;
}
}
-
+
public List getEvents() {
return events;
}
-
+
public String getInputName() {
return this.inputName;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventRouteEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventRouteEvent.java
index 211202ded2..44d4e296d2 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventRouteEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventRouteEvent.java
@@ -24,7 +24,7 @@
import org.apache.tez.runtime.api.impl.TezEvent;
public class VertexEventRouteEvent extends VertexEvent {
-
+
final List events;
public VertexEventRouteEvent(TezVertexID vertexId, List events) {
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventSourceTaskAttemptCompleted.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventSourceTaskAttemptCompleted.java
index 6cd38a9b29..e289c9c138 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventSourceTaskAttemptCompleted.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventSourceTaskAttemptCompleted.java
@@ -27,7 +27,7 @@ public class VertexEventSourceTaskAttemptCompleted extends VertexEvent {
public VertexEventSourceTaskAttemptCompleted(
TezVertexID targetVertexId,
VertexEventTaskAttemptCompleted completionEvent) {
- super(targetVertexId,
+ super(targetVertexId,
VertexEventType.V_SOURCE_TASK_ATTEMPT_COMPLETED);
this.completionEvent = completionEvent;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventSourceVertexStarted.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventSourceVertexStarted.java
index 5cc9c238f3..906a9da938 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventSourceVertexStarted.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventSourceVertexStarted.java
@@ -24,7 +24,7 @@ public class VertexEventSourceVertexStarted extends VertexEvent {
final int sourceDistanceFromRoot;
final TezVertexID sourceVertexId;
-
+
public VertexEventSourceVertexStarted(TezVertexID vertexId,
TezVertexID sourceVertexId,
int distanceFromRoot) {
@@ -32,11 +32,11 @@ public VertexEventSourceVertexStarted(TezVertexID vertexId,
this.sourceDistanceFromRoot = distanceFromRoot;
this.sourceVertexId = sourceVertexId;
}
-
+
public int getSourceDistanceFromRoot() {
return sourceDistanceFromRoot;
}
-
+
public TezVertexID getSourceVertexId() {
return sourceVertexId;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventTermination.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventTermination.java
index 647f6003d8..5e4911d648 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventTermination.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventTermination.java
@@ -23,8 +23,8 @@
/**
* Specialized VertexEvent for termination conditions.
- *
- * The VertexEventType is always V_TERMINATE.
+ *
+ * The VertexEventType is always V_TERMINATE.
* The terminationCause denotes the specific reason why the vertex is being terminated.
*/
public class VertexEventTermination extends VertexEvent {
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventType.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventType.java
index ed325290cb..f007c289fb 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventType.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/event/VertexEventType.java
@@ -28,37 +28,37 @@ public enum VertexEventType {
//Producer:Job
V_INIT,
-
+
//Producer:Vertex
V_COMPLETED,
V_START,
V_SOURCE_TASK_ATTEMPT_COMPLETED,
V_SOURCE_VERTEX_STARTED,
V_DELETE_SHUFFLE_DATA,
-
+
//Producer:Task
V_TASK_COMPLETED,
V_TASK_RESCHEDULED,
V_TASK_ATTEMPT_COMPLETED,
-
+
//Producer:Any component
V_INTERNAL_ERROR,
V_MANAGER_USER_CODE_ERROR,
-
+
V_ROUTE_EVENT,
-
+
//Producer: VertexInputInitializer
V_ROOT_INPUT_INITIALIZED,
V_ROOT_INPUT_FAILED,
-
+
V_INPUT_DATA_INFORMATION,
// Recover Event, Producer:DAG
V_RECOVER,
-
+
// Producer: Vertex
V_READY_TO_INIT,
-
+
// Producer: Edge
V_NULL_EDGE_INITIALIZED,
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/AMUserCodeException.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/AMUserCodeException.java
index 22b1211544..b313bc06f9 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/AMUserCodeException.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/AMUserCodeException.java
@@ -25,7 +25,7 @@
/**
* Wrap the exception of user code in AM. Now we only have 3 kinds of user code in AM:
*
VertexManager
- *
EdgeManager
+ *
EdgeManager
*
InputInitializer
*/
@Private
@@ -38,9 +38,9 @@ public static enum Source {
EdgeManager,
InputInitializer
}
-
+
private Source source;
-
+
public AMUserCodeException(Source source, String message, Throwable cause) {
super(message, cause);
this.source = source;
@@ -50,7 +50,7 @@ public AMUserCodeException(Source source, Throwable cause) {
super(cause);
this.source = source;
}
-
+
public Source getSource() {
return source;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BroadcastEdgeManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BroadcastEdgeManager.java
index 867403fcd5..d60d88eb63 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BroadcastEdgeManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/BroadcastEdgeManager.java
@@ -38,20 +38,20 @@ public BroadcastEdgeManager(EdgeManagerPluginContext context) {
@Override
public void initialize() {
}
-
+
@Override
public int getNumDestinationTaskPhysicalInputs(int destinationTaskIndex) {
return getContext().getSourceVertexNumTasks();
}
-
+
@Override
public int getNumSourceTaskPhysicalOutputs(int sourceTaskIndex) {
return 1;
}
-
+
@Override
public void routeDataMovementEventToDestination(DataMovementEvent event,
- int sourceTaskIndex, int sourceOutputIndex,
+ int sourceTaskIndex, int sourceOutputIndex,
Map> destinationTaskAndInputIndices) {
List inputIndices = Collections.singletonList(sourceTaskIndex);
// for each task make the i-th source task as the i-th physical input
@@ -59,7 +59,7 @@ public void routeDataMovementEventToDestination(DataMovementEvent event,
destinationTaskAndInputIndices.put(i, inputIndices);
}
}
-
+
@Override
public void prepareForRouting() throws Exception {
int numSourceTasks = getContext().getSourceVertexNumTasks();
@@ -68,14 +68,14 @@ public void prepareForRouting() throws Exception {
commonRouteMeta[i] = EventRouteMetadata.create(1, new int[]{i}, new int[]{0});
}
}
-
+
@Override
public EventRouteMetadata routeDataMovementEventToDestination(
int sourceTaskIndex, int sourceOutputIndex, int destinationTaskIndex)
throws Exception {
return commonRouteMeta[sourceTaskIndex];
}
-
+
@Override
public CompositeEventRouteMetadata routeCompositeDataMovementEventToDestination(
int sourceTaskIndex, int destinationTaskIndex)
@@ -110,7 +110,7 @@ public int routeInputErrorEventToSource(InputReadErrorEvent event,
int destinationTaskIndex, int destinationFailedInputIndex) {
return destinationFailedInputIndex;
}
-
+
@Override
public int getNumDestinationConsumerTasks(int sourceTaskIndex) {
return getContext().getDestinationVertexNumTasks();
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGImpl.java
index d5c21f5793..6bfca5ebdc 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGImpl.java
@@ -224,7 +224,7 @@ public class DAGImpl implements org.apache.tez.dag.app.dag.DAG,
private final AtomicBoolean internalErrorTriggered = new AtomicBoolean(false);
Map localResources;
-
+
long startDAGCpuTime = 0;
long startDAGGCTime = 0;
@@ -336,7 +336,7 @@ DAGEventType.DAG_TERMINATE, new DAGKilledTransition())
EnumSet.of(DAGState.COMMITTING, DAGState.TERMINATING, DAGState.FAILED, DAGState.SUCCEEDED),
DAGEventType.DAG_COMMIT_COMPLETED,
COMMIT_COMPLETED_TRANSITION)
- .addTransition(DAGState.COMMITTING, DAGState.TERMINATING,
+ .addTransition(DAGState.COMMITTING, DAGState.TERMINATING,
DAGEventType.DAG_TERMINATE,
new DAGKilledWhileCommittingTransition())
.addTransition(
@@ -572,7 +572,7 @@ public DAGImpl(TezDAGID dagId,
} else {
defaultExecutionContext = null;
}
-
+
this.taskSpecificLaunchCmdOption = new TaskSpecificLaunchCmdOption(dagConf);
// This "this leak" is okay because the retained pointer is in an
// instance variable.
@@ -630,7 +630,7 @@ protected StateMachine getStateMachine() {
public TezDAGID getID() {
return dagId;
}
-
+
@Override
public Map getLocalResources() {
return localResources;
@@ -1040,7 +1040,7 @@ public VertexStatusBuilder getVertexStatus(String vertexName,
}
return vertex.getVertexStatus(statusOptions);
}
-
+
public TaskAttemptImpl getTaskAttempt(TezTaskAttemptID taId) {
return (TaskAttemptImpl) getVertex(taId.getVertexID()).getTask(taId.getTaskID())
.getAttempt(taId);
@@ -1162,7 +1162,7 @@ public Void call() throws Exception {
appContext.getHadoopShim().clearHadoopCallerContext();
}
}
-
+
if (!commitEvents.isEmpty()) {
try {
LOG.info("Start writing dag commit event, " + getID());
@@ -1345,7 +1345,7 @@ static DAGState checkVerticesForCompletion(DAGImpl dag) {
+ ", numFailedVertices=" + dag.numFailedVertices
+ ", numKilledVertices=" + dag.numKilledVertices
+ ", numVertices=" + dag.numVertices
- + ", commitInProgress=" + dag.commitFutures.size()
+ + ", commitInProgress=" + dag.commitFutures.size()
+ ", terminationCause=" + dag.terminationCause);
// log in case of accounting error.
@@ -1397,7 +1397,7 @@ static DAGState checkCommitsForCompletion(DAGImpl dag) {
+ ", numFailedVertices=" + dag.numFailedVertices
+ ", numKilledVertices=" + dag.numKilledVertices
+ ", numVertices=" + dag.numVertices
- + ", commitInProgress=" + dag.commitFutures.size()
+ + ", commitInProgress=" + dag.commitFutures.size()
+ ", terminationCause=" + dag.terminationCause);
// continue the commits if DAG#isCommittable return true, otherwise go to TERMINATING or finish dag.
@@ -1441,7 +1441,7 @@ private void updateCpuCounters() {
dagCounters.findCounter(DAGCounter.AM_CPU_MILLISECONDS).setValue(totalDAGCpuTime);
dagCounters.findCounter(DAGCounter.AM_GC_TIME_MILLIS).setValue(totalDAGGCTime);
}
-
+
@Override
public void incrementDagCounter(DAGCounter counter, int incrValue) {
dagCounters.findCounter(counter).increment(incrValue);
@@ -2331,7 +2331,7 @@ public DAGState transition(DAGImpl dag, DAGEvent event) {
return DAGState.TERMINATING;
}
}
-
+
}
private static class CommitCompletedTransition implements
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGSchedulerNaturalOrder.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGSchedulerNaturalOrder.java
index f98100aac1..036a4f2780 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGSchedulerNaturalOrder.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/DAGSchedulerNaturalOrder.java
@@ -31,18 +31,18 @@
@SuppressWarnings("rawtypes")
public class DAGSchedulerNaturalOrder extends DAGScheduler {
-
- private static final Logger LOG =
+
+ private static final Logger LOG =
LoggerFactory.getLogger(DAGSchedulerNaturalOrder.class);
private final DAG dag;
private final EventHandler handler;
-
+
public DAGSchedulerNaturalOrder(DAG dag, EventHandler dispatcher) {
this.dag = dag;
this.handler = dispatcher;
}
-
+
@Override
public void scheduleTaskEx(DAGEventSchedulerUpdate event) {
TaskAttempt attempt = event.getAttempt();
@@ -56,17 +56,17 @@ public void scheduleTaskEx(DAGEventSchedulerUpdate event) {
LOG.debug("Scheduling " + attempt.getTaskAttemptID() + " between priorityLow: " + priorityLowLimit
+ " and priorityHigh: " + priorityHighLimit);
}
-
+
TaskAttemptEventSchedule attemptEvent = new TaskAttemptEventSchedule(
attempt.getTaskAttemptID(), priorityLowLimit, priorityHighLimit);
-
+
sendEvent(attemptEvent);
}
-
+
@Override
public void taskCompletedEx(DAGEventSchedulerUpdate event) {
}
-
+
@SuppressWarnings("unchecked")
void sendEvent(TaskAttemptEventSchedule event) {
handler.handle(event);
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/Edge.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/Edge.java
index 0c1c9a0994..abfc836bb6 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/Edge.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/Edge.java
@@ -120,7 +120,7 @@ public String getSourceVertexName() {
public String getDestinationVertexName() {
return destinationVertex.getName();
}
-
+
@Override
public int getSourceVertexNumTasks() {
return sourceVertex.getTotalTasks();
@@ -244,7 +244,7 @@ public void setEdgeProperty(EdgeProperty newEdgeProperty) throws AMUserCodeExcep
sourceVertex));
}
}
-
+
// Test only method for creating specific scenarios
@VisibleForTesting
void setCustomEdgeManager(EdgeManagerPluginDescriptor descriptor)
@@ -257,7 +257,7 @@ void setCustomEdgeManager(EdgeManagerPluginDescriptor descriptor)
edgeProperty.getEdgeDestination());
setEdgeProperty(modifiedEdgeProperty);
}
-
+
public void routingToBegin() throws AMUserCodeException {
int numDestTasks = edgeManagerContext.getDestinationVertexNumTasks();
synchronized (this) {
@@ -282,11 +282,11 @@ public void routingToBegin() throws AMUserCodeException {
"Fail to prepareForRouting " + getEdgeInfo(), e);
}
}
-
- LOG.info("Routing to begin for edge: " + getEdgeInfo() + ". EdgeProperty: " + edgeProperty +
+
+ LOG.info("Routing to begin for edge: " + getEdgeInfo() + ". EdgeProperty: " + edgeProperty +
" onDemandRouting: " + hasOnDemandRouting());
}
-
+
public synchronized boolean hasOnDemandRouting() {
return onDemandRouting;
}
@@ -294,7 +294,7 @@ public synchronized boolean hasOnDemandRouting() {
public synchronized EdgeProperty getEdgeProperty() {
return this.edgeProperty;
}
-
+
public EdgeManagerPlugin getEdgeManager() {
return this.edgeManager;
}
@@ -317,7 +317,7 @@ public void setDestinationVertex(Vertex destinationVertex) {
}
public InputSpec getDestinationSpec(int destinationTaskIndex) throws AMUserCodeException {
- Preconditions.checkState(edgeManager != null,
+ Preconditions.checkState(edgeManager != null,
"Edge Manager must be initialized by this time");
try {
int physicalInputCount = edgeManager.getNumDestinationTaskPhysicalInputs(destinationTaskIndex);
@@ -335,7 +335,7 @@ public InputSpec getDestinationSpec(int destinationTaskIndex) throws AMUserCodeE
}
public OutputSpec getSourceSpec(int sourceTaskIndex) throws AMUserCodeException {
- Preconditions.checkState(edgeManager != null,
+ Preconditions.checkState(edgeManager != null,
"Edge Manager must be initialized by this time");
try {
int physicalOutputCount = edgeManager.getNumSourceTaskPhysicalOutputs(
@@ -351,11 +351,11 @@ public OutputSpec getSourceSpec(int sourceTaskIndex) throws AMUserCodeException
+ sourceTaskIndex + ", " + getEdgeInfo(), e);
}
}
-
+
public void startEventBuffering() {
bufferEvents.set(true);
}
-
+
public void stopEventBuffering() throws AMUserCodeException {
// assume only 1 entity will start and stop event buffering
bufferEvents.set(false);
@@ -368,9 +368,9 @@ public void stopEventBuffering() throws AMUserCodeException {
}
sourceEventBuffer.clear();
}
-
+
public void sendTezEventToSourceTasks(TezEvent tezEvent) throws AMUserCodeException {
- Preconditions.checkState(edgeManager != null,
+ Preconditions.checkState(edgeManager != null,
"Edge Manager must be initialized by this time");
if (!bufferEvents.get()) {
switch (tezEvent.getEventType()) {
@@ -411,7 +411,7 @@ public void sendTezEventToSourceTasks(TezEvent tezEvent) throws AMUserCodeExcept
" sourceVertex=" + sourceVertex.getLogIdentifier() +
" srcIndex = " + srcTaskIndex +
" destAttemptId=" + destAttemptId +
- " destIndex=" + destTaskIndex +
+ " destIndex=" + destTaskIndex +
" edgeManager=" + edgeManager.getClass().getName());
}
TezTaskID srcTaskId = srcTask.getTaskID();
@@ -428,26 +428,26 @@ public void sendTezEventToSourceTasks(TezEvent tezEvent) throws AMUserCodeExcept
sourceEventBuffer.add(tezEvent);
}
}
-
+
private void handleCompositeDataMovementEvent(TezEvent tezEvent) throws AMUserCodeException {
CompositeDataMovementEvent compEvent = (CompositeDataMovementEvent) tezEvent.getEvent();
EventMetaData srcInfo = tezEvent.getSourceInfo();
-
+
for (DataMovementEvent dmEvent : compEvent.getEvents()) {
TezEvent newEvent = new TezEvent(dmEvent, srcInfo, tezEvent.getEventReceivedTime());
sendTezEventToDestinationTasks(newEvent);
}
}
-
+
void sendDmEventOrIfEventToTasks(TezEvent tezEvent, int srcTaskIndex,
boolean isDataMovementEvent,
- Map> taskAndInputIndices) {
- Preconditions.checkState(edgeManager != null,
+ Map> taskAndInputIndices) {
+ Preconditions.checkState(edgeManager != null,
"Edge Manager must be initialized by this time");
Event event = tezEvent.getEvent();
// cache of event object per input index
- Map inputIndicesWithEvents = Maps.newHashMap();
+ Map inputIndicesWithEvents = Maps.newHashMap();
for (Map.Entry> entry : taskAndInputIndices.entrySet()) {
int destTaskIndex = entry.getKey();
List inputIndices = entry.getValue();
@@ -475,15 +475,15 @@ void sendDmEventOrIfEventToTasks(TezEvent tezEvent, int srcTaskIndex,
" sourceVertex=" + sourceVertex.getLogIdentifier() +
" srcTaskIndex = " + srcTaskIndex +
" destVertex=" + destinationVertex.getLogIdentifier() +
- " destTaskIndex=" + destTaskIndex +
- " destNumTasks=" + destinationVertex.getTotalTasks() +
+ " destTaskIndex=" + destTaskIndex +
+ " destNumTasks=" + destinationVertex.getTotalTasks() +
" edgeManager=" + edgeManager.getClass().getName());
}
sendEventToTask(destTask, tezEventToSend);
}
}
}
-
+
public void sendTezEventToDestinationTasks(TezEvent tezEvent) throws AMUserCodeException {
if (!bufferEvents.get()) {
boolean isDataMovementEvent = true;
@@ -543,27 +543,27 @@ public void sendTezEventToDestinationTasks(TezEvent tezEvent) throws AMUserCodeE
destinationEventBuffer.add(tezEvent);
}
}
-
+
static class PendingEventRouteMetadata {
private final EventRouteMetadata routeMeta;
private final TezEvent event;
private int numEventsRouted;
-
+
public PendingEventRouteMetadata(EventRouteMetadata routeMeta, TezEvent event,
int numEventsRouted) {
this.routeMeta = routeMeta;
this.event = event;
this.numEventsRouted = numEventsRouted;
}
-
+
public EventRouteMetadata getRouteMeta() {
return routeMeta;
}
-
+
public TezEvent getTezEvent() {
return event;
}
-
+
public int getNumEventsRouted() {
return numEventsRouted;
}
@@ -572,11 +572,11 @@ public int getNumEventsRouted() {
public PendingEventRouteMetadata removePendingEvents(TezTaskAttemptID attemptID) {
return pendingEvents.remove(attemptID);
}
-
+
// return false is event could be routed but ran out of space in the list
public boolean maybeAddTezEventForDestinationTask(TezEvent tezEvent, TezTaskAttemptID attemptID,
- int srcTaskIndex, List listToAdd, int listMaxSize,
- PendingEventRouteMetadata pendingRoutes)
+ int srcTaskIndex, List listToAdd, int listMaxSize,
+ PendingEventRouteMetadata pendingRoutes)
throws AMUserCodeException {
if (!routingNeeded) {
if (LOG.isDebugEnabled()) {
@@ -591,7 +591,7 @@ public boolean maybeAddTezEventForDestinationTask(TezEvent tezEvent, TezTaskAtte
switch (tezEvent.getEventType()) {
case COMPOSITE_DATA_MOVEMENT_EVENT:
{
- CompositeDataMovementEvent compEvent = (CompositeDataMovementEvent) tezEvent.getEvent();
+ CompositeDataMovementEvent compEvent = (CompositeDataMovementEvent) tezEvent.getEvent();
CompositeEventRouteMetadata routeMeta = edgeManagerOnDemand
.routeCompositeDataMovementEventToDestination(srcTaskIndex, taskIndex);
@@ -686,7 +686,7 @@ public boolean maybeAddTezEventForDestinationTask(TezEvent tezEvent, TezTaskAtte
private void sendEventToTask(Task task, TezEvent tezEvent) {
task.registerTezEvent(tezEvent);
}
-
+
@SuppressWarnings({ "unchecked", "rawtypes" })
private void sendEvent(org.apache.hadoop.yarn.event.Event event) {
eventHandler.handle(event);
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/ImmediateStartVertexManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/ImmediateStartVertexManager.java
index 4bb5f483f3..4b45171b15 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/ImmediateStartVertexManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/ImmediateStartVertexManager.java
@@ -90,7 +90,7 @@ private void scheduleTasks() {
if (!canScheduleTasks()) {
return;
}
-
+
tasksScheduled = true;
List tasksToStart = Lists.newArrayListWithCapacity(managedTasks);
for (int i = 0; i < managedTasks; ++i) {
@@ -119,7 +119,7 @@ private boolean canScheduleTasks() {
return true;
}
-
+
@Override
public void onVertexStateUpdated(VertexStateUpdate stateUpdate) {
Preconditions.checkArgument(stateUpdate.getVertexState() == VertexState.CONFIGURED,
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManager.java
index 61146ebf26..4fa704a491 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManager.java
@@ -47,20 +47,20 @@ public void initialize() {
public int getNumDestinationTaskPhysicalInputs(int destinationTaskIndex) {
return 1;
}
-
+
@Override
public int getNumSourceTaskPhysicalOutputs(int sourceTaskIndex) {
return 1;
}
-
+
@Override
public void routeDataMovementEventToDestination(DataMovementEvent event,
- int sourceTaskIndex, int sourceOutputIndex,
+ int sourceTaskIndex, int sourceOutputIndex,
Map> destinationTaskAndInputIndices) {
checkState();
destinationTaskAndInputIndices.put(sourceTaskIndex, destinationInputIndices);
}
-
+
@Override
public void routeInputSourceTaskFailedEventToDestination(int sourceTaskIndex,
Map> destinationTaskAndInputIndices) {
@@ -72,7 +72,7 @@ public int routeInputErrorEventToSource(InputReadErrorEvent event,
int destinationTaskIndex, int destinationFailedInputIndex) {
return destinationTaskIndex;
}
-
+
@Override
public int getNumDestinationConsumerTasks(int sourceTaskIndex) {
return 1;
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManagerOnDemand.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManagerOnDemand.java
index ad8904f2b2..1d388df006 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManagerOnDemand.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OneToOneEdgeManagerOnDemand.java
@@ -35,8 +35,8 @@ public class OneToOneEdgeManagerOnDemand extends EdgeManagerPluginOnDemand {
final List destinationInputIndices = Collections.singletonList(0);
final AtomicBoolean stateChecked = new AtomicBoolean(false);
-
- final EventRouteMetadata commonRouteMeta =
+
+ final EventRouteMetadata commonRouteMeta =
EventRouteMetadata.create(1, new int[]{0}, new int[]{0});
final CompositeEventRouteMetadata compositeCommonRouteMeta =
@@ -55,25 +55,25 @@ public void initialize() {
public int getNumDestinationTaskPhysicalInputs(int destinationTaskIndex) {
return 1;
}
-
+
@Override
public int getNumSourceTaskPhysicalOutputs(int sourceTaskIndex) {
return 1;
}
-
+
@Override
public void routeDataMovementEventToDestination(DataMovementEvent event,
- int sourceTaskIndex, int sourceOutputIndex,
+ int sourceTaskIndex, int sourceOutputIndex,
Map> destinationTaskAndInputIndices) {
checkState();
destinationTaskAndInputIndices.put(sourceTaskIndex, destinationInputIndices);
}
-
+
@Override
public void prepareForRouting() throws Exception {
checkState();
}
-
+
@Override
public EventRouteMetadata routeDataMovementEventToDestination(
int sourceTaskIndex, int sourceOutputIndex, int destinationTaskIndex)
@@ -83,7 +83,7 @@ public EventRouteMetadata routeDataMovementEventToDestination(
}
return null;
}
-
+
@Override
public @Nullable CompositeEventRouteMetadata routeCompositeDataMovementEventToDestination(
int sourceTaskIndex, int destinationTaskIndex)
@@ -111,7 +111,7 @@ public int routeInputErrorEventToSource(InputReadErrorEvent event,
int destinationTaskIndex, int destinationFailedInputIndex) {
return destinationTaskIndex;
}
-
+
@Override
public int routeInputErrorEventToSource(int destinationTaskIndex, int destinationFailedInputIndex) {
return destinationTaskIndex;
@@ -121,7 +121,7 @@ public int routeInputErrorEventToSource(int destinationTaskIndex, int destinatio
public int getNumDestinationConsumerTasks(int sourceTaskIndex) {
return 1;
}
-
+
private void checkState() {
if (stateChecked.get()) {
return;
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OutputCommitterContextImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OutputCommitterContextImpl.java
index 06be989b9e..6a723ae247 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OutputCommitterContextImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/OutputCommitterContextImpl.java
@@ -86,7 +86,7 @@ public String getOutputName() {
public UserPayload getOutputUserPayload() {
return output.getIODescriptor().getUserPayload();
}
-
+
@Override
public UserPayload getUserPayload() {
return output.getControllerDescriptor().getUserPayload();
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/RootInputVertexManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/RootInputVertexManager.java
index c3a0ea866f..e33b171513 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/RootInputVertexManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/RootInputVertexManager.java
@@ -57,7 +57,7 @@
public class RootInputVertexManager extends VertexManagerPlugin {
- private static final Logger LOG =
+ private static final Logger LOG =
LoggerFactory.getLogger(RootInputVertexManager.class);
/**
@@ -88,7 +88,7 @@ public class RootInputVertexManager extends VertexManagerPlugin {
"tez.root-input-vertex-manager.max-src-fraction";
public static final float
TEZ_ROOT_INPUT_VERTEX_MANAGER_MAX_SRC_FRACTION_DEFAULT = 0.75f;
-
+
private String configuredInputName;
int totalNumSourceTasks = 0;
@@ -319,7 +319,7 @@ public void onRootVertexInitialized(String inputName, InputDescriptor inputDescr
+ ", VertexName:" + getContext().getVertexName() + ", ConfiguredInput: "
+ configuredInputName + ", CurrentInput: " + inputName);
configuredInputName = inputName;
-
+
InputDataInformationEvent rEvent = (InputDataInformationEvent)event;
rEvent.setTargetIndex(rEvent.getSourceIndex()); // 1:1 routing
riEvents.add(rEvent);
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java
index ef2978b2df..4ae718c17e 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImpl.java
@@ -154,7 +154,7 @@ public static DataEventDependencyInfoProto toProto(DataEventDependencyInfo info)
}
return builder.build();
}
-
+
public static DataEventDependencyInfo fromProto(DataEventDependencyInfoProto proto) {
TezTaskAttemptID taId = null;
if(proto.hasTaskAttemptId()) {
@@ -200,11 +200,11 @@ public static DataEventDependencyInfo fromProto(DataEventDependencyInfoProto pro
@VisibleForTesting
boolean appendNextDataEvent = true;
ArrayList lastDataEvents = Lists.newArrayList();
-
+
@VisibleForTesting
TaskAttemptStatus reportedStatus;
private DAGCounter localityCounter;
-
+
org.apache.tez.runtime.api.impl.TaskStatistics statistics;
long lastNotifyProgressTimestamp = 0;
@@ -222,7 +222,7 @@ public static DataEventDependencyInfo fromProto(DataEventDependencyInfoProto pro
private final Resource taskResource;
private final ContainerContext containerContext;
private final boolean leafVertex;
-
+
private TezTaskAttemptID creationCausalTA;
private long creationTime;
private long scheduledTime;
@@ -232,7 +232,7 @@ public static DataEventDependencyInfo fromProto(DataEventDependencyInfoProto pro
protected static final KilledTransitionHelper KILLED_HELPER =
new KilledTransitionHelper();
-
+
private static SingleArcTransition
TERMINATED_AFTER_SUCCESS_HELPER = new TerminatedAfterSuccessHelper(KILLED_HELPER);
@@ -256,7 +256,7 @@ public static DataEventDependencyInfo fromProto(DataEventDependencyInfoProto pro
.addTransition(TaskAttemptStateInternal.NEW,
EnumSet.of(TaskAttemptStateInternal.NEW, TaskAttemptStateInternal.START_WAIT, TaskAttemptStateInternal.FAILED),
TaskAttemptEventType.TA_SCHEDULE, new ScheduleTaskattemptTransition())
- // NEW -> FAILED due to TA_FAILED happens in recovery
+ // NEW -> FAILED due to TA_FAILED happens in recovery
// (No TaskAttemptStartedEvent, but with TaskAttemptFinishedEvent(FAILED)
.addTransition(TaskAttemptStateInternal.NEW,
TaskAttemptStateInternal.FAILED,
@@ -266,13 +266,13 @@ TaskAttemptEventType.TA_FAILED, new TerminateTransition(FAILED_HELPER))
TaskAttemptEventType.TA_KILL_REQUEST,
new TerminateTransition(KILLED_HELPER))
// NEW -> KILLED due to TA_KILLED happens in recovery
- // (No TaskAttemptStartedEvent, but with TaskAttemptFinishedEvent(KILLED)
+ // (No TaskAttemptStartedEvent, but with TaskAttemptFinishedEvent(KILLED)
.addTransition(TaskAttemptStateInternal.NEW,
TaskAttemptStateInternal.KILLED,
TaskAttemptEventType.TA_KILLED,
new TerminateTransition(KILLED_HELPER))
// NEW -> SUCCEEDED due to TA_DONE happens in recovery
- // (with TaskAttemptStartedEvent and with TaskAttemptFinishedEvent(SUCCEEDED)
+ // (with TaskAttemptStartedEvent and with TaskAttemptFinishedEvent(SUCCEEDED)
.addTransition(TaskAttemptStateInternal.NEW,
TaskAttemptStateInternal.SUCCEEDED,
TaskAttemptEventType.TA_DONE,
@@ -407,7 +407,7 @@ TaskAttemptEventType.TA_STARTED_REMOTELY, new StartedTransition())
TaskAttemptStateInternal.RUNNING),
TaskAttemptEventType.TA_OUTPUT_FAILED,
new OutputReportedFailedTransition())
- // for recovery, needs to log the TA generated events in TaskAttemptFinishedEvent
+ // for recovery, needs to log the TA generated events in TaskAttemptFinishedEvent
.addTransition(TaskAttemptStateInternal.RUNNING,
TaskAttemptStateInternal.RUNNING,
TaskAttemptEventType.TA_TEZ_EVENT_UPDATE,
@@ -574,7 +574,7 @@ public TaskAttemptImpl(TezTaskAttemptID attemptId, EventHandler eventHandler,
this.containerContext = containerContext;
this.leafVertex = leafVertex;
this.hungIntervalMax = conf.getLong(
- TezConfiguration.TEZ_TASK_PROGRESS_STUCK_INTERVAL_MS,
+ TezConfiguration.TEZ_TASK_PROGRESS_STUCK_INTERVAL_MS,
TezConfiguration.TEZ_TASK_PROGRESS_STUCK_INTERVAL_MS_DEFAULT);
this.recoveryData = appContext.getDAGRecoveryData() == null ?
null : appContext.getDAGRecoveryData().getTaskAttemptRecoveryData(attemptId);
@@ -628,7 +628,7 @@ public List getDiagnostics() {
readLock.unlock();
}
}
-
+
@Override
public TaskAttemptTerminationCause getTerminationCause() {
return terminationCause;
@@ -659,7 +659,7 @@ public void setCounters(TezCounters counters) {
writeLock.unlock();
}
}
-
+
TaskStatistics getStatistics() {
return this.statistics;
}
@@ -713,7 +713,7 @@ public ContainerId getAssignedContainerID() {
readLock.unlock();
}
}
-
+
@Override
public Container getAssignedContainer() {
readLock.lock();
@@ -806,7 +806,7 @@ public long getCreationTime() {
readLock.unlock();
}
}
-
+
public TezTaskAttemptID getCreationCausalAttempt() {
readLock.lock();
try {
@@ -1118,7 +1118,7 @@ private void sendTaskAttemptCleanupEvent() {
// TezMRTypeConverter.fromTez(this.attemptId));
// sendEvent(new TaskCleanupEvent(this.attemptId, this.committer, taContext));
}
-
+
private TaskLocationHint getTaskLocationHint() {
return locationHint;
}
@@ -1292,7 +1292,7 @@ public TaskAttemptStateInternal transition(TaskAttemptImpl ta, TaskAttemptEvent
ta.sendEvent(new TaskAttemptEvent(ta.getTaskAttemptID(), TaskAttemptEventType.TA_DONE));
break;
default:
- throw new TezUncheckedException("Invalid state in TaskAttemptFinishedEvent, state="
+ throw new TezUncheckedException("Invalid state in TaskAttemptFinishedEvent, state="
+ taFinishedEvent.getState() + ", taId=" + ta.getTaskAttemptID());
}
return TaskAttemptStateInternal.NEW;
@@ -1331,7 +1331,7 @@ public TaskAttemptStateInternal transition(TaskAttemptImpl ta, TaskAttemptEvent
}
LOG.debug("Asking for container launch with taskAttemptContext: {}", ta.taskSpec);
-
+
// Send out a launch request to the scheduler.
int priority;
if (ta.isRescheduled && ta.getVertex().getVertexConfig().getTaskRescheduleHigherPriority()) {
@@ -1494,7 +1494,7 @@ public void transition(TaskAttemptImpl ta, TaskAttemptEvent taskAttemptEvent) {
// only and moves the attempt to a final state, or an initial state.
}
}
-
+
private boolean isSpeculationEnabled() {
return conf.getBoolean(TezConfiguration.TEZ_AM_SPECULATION_ENABLED,
TezConfiguration.TEZ_AM_SPECULATION_ENABLED_DEFAULT);
@@ -1507,7 +1507,7 @@ public TerminatedBeforeRunningTransition(
TerminatedTransitionHelper helper) {
super(helper);
}
-
+
protected boolean sendSchedulerEvent() {
return true;
}
@@ -1556,7 +1556,7 @@ protected static class ContainerCompletedBeforeRunningTransition extends
public ContainerCompletedBeforeRunningTransition() {
super(FAILED_HELPER);
}
-
+
public ContainerCompletedBeforeRunningTransition(TerminatedTransitionHelper helper) {
super(helper);
}
@@ -1573,7 +1573,7 @@ protected static class StatusUpdaterTransition implements
SingleArcTransition {
@Override
public void transition(TaskAttemptImpl ta, TaskAttemptEvent event) {
- TaskAttemptEventStatusUpdate sEvent = (TaskAttemptEventStatusUpdate) event;
+ TaskAttemptEventStatusUpdate sEvent = (TaskAttemptEventStatusUpdate) event;
TaskStatusUpdateEvent statusEvent = sEvent.getStatusEvent();
ta.reportedStatus.state = ta.getState();
ta.reportedStatus.progress = statusEvent.getProgress();
@@ -1590,7 +1590,7 @@ public void transition(TaskAttemptImpl ta, TaskAttemptEvent event) {
if (ta.hungIntervalMax > 0 && ta.lastNotifyProgressTimestamp > 0 &&
currTime - ta.lastNotifyProgressTimestamp > ta.hungIntervalMax) {
// task is hung
- String diagnostics = "Attempt failed because it appears to make no progress for " +
+ String diagnostics = "Attempt failed because it appears to make no progress for " +
ta.hungIntervalMax + "ms";
LOG.info(diagnostics + " " + ta.getTaskAttemptID());
// send event that will fail this attempt
@@ -1598,12 +1598,12 @@ public void transition(TaskAttemptImpl ta, TaskAttemptEvent event) {
new TaskAttemptEventAttemptFailed(ta.getTaskAttemptID(),
TaskAttemptEventType.TA_FAILED,
TaskFailureType.NON_FATAL,
- diagnostics,
+ diagnostics,
TaskAttemptTerminationCause.NO_PROGRESS)
);
}
}
-
+
if (sEvent.getReadErrorReported()) {
// if there is a read error then track the next last data event
ta.appendNextDataEvent = true;
@@ -1665,10 +1665,10 @@ public void transition(TaskAttemptImpl ta, TaskAttemptEvent event) {
// Unregister from the TaskHeartbeatHandler.
ta.taskHeartbeatHandler.unregister(ta.attemptId);
-
+
ta.reportedStatus.state = TaskAttemptState.SUCCEEDED;
ta.reportedStatus.progress = 1.0f;
-
+
if (ta.isSpeculationEnabled()) {
ta.sendEvent(new SpeculatorEventTaskAttemptStatusUpdate(ta.attemptId, TaskAttemptState.SUCCEEDED,
ta.clock.getTime()));
@@ -1705,7 +1705,7 @@ protected static class ContainerCompletedWhileRunningTransition extends
public ContainerCompletedWhileRunningTransition() {
super(FAILED_HELPER);
}
-
+
public ContainerCompletedWhileRunningTransition(TerminatedTransitionHelper helper) {
super(helper);
}
@@ -1738,7 +1738,7 @@ protected boolean sendSchedulerEvent() {
// there is no need to send it again
return false;
}
-
+
public TerminatedAfterSuccessHelper(TerminatedTransitionHelper helper) {
super(helper);
}
@@ -1767,14 +1767,14 @@ public TaskAttemptStateInternal transition(TaskAttemptImpl attempt, TaskAttemptE
return TaskAttemptStateInternal.KILLED;
}
}
-
+
protected static class OutputReportedFailedTransition implements
MultipleArcTransition {
@Override
public TaskAttemptStateInternal transition(TaskAttemptImpl sourceAttempt,
TaskAttemptEvent event) {
- TaskAttemptEventOutputFailed outputFailedEvent =
+ TaskAttemptEventOutputFailed outputFailedEvent =
(TaskAttemptEventOutputFailed) event;
TezEvent inputFailedEvent = outputFailedEvent.getInputFailedEvent();
TezTaskAttemptID failedDestTaId = inputFailedEvent.getSourceInfo().getTaskAttemptID();
@@ -1897,7 +1897,7 @@ private int getNumNodes(TaskAttemptImpl sourceAttempt) {
return numActiveNodes;
}
}
-
+
@VisibleForTesting
protected void sendInputFailedToConsumers() {
Vertex vertex = getVertex();
@@ -1905,16 +1905,16 @@ protected void sendInputFailedToConsumers() {
if (edges != null && !edges.isEmpty()) {
List tezIfEvents = Lists.newArrayListWithCapacity(edges.size());
for (Vertex edgeVertex : edges.keySet()) {
- tezIfEvents.add(new TezEvent(new InputFailedEvent(),
- new EventMetaData(EventProducerConsumerType.SYSTEM,
- vertex.getName(),
+ tezIfEvents.add(new TezEvent(new InputFailedEvent(),
+ new EventMetaData(EventProducerConsumerType.SYSTEM,
+ vertex.getName(),
edgeVertex.getName(),
getTaskAttemptID()), appContext.getClock().getTime()));
}
sendEvent(new VertexEventRouteEvent(vertex.getVertexId(), tezIfEvents));
}
}
-
+
private void trySetTerminationCause(TaskAttemptTerminationCause err) {
// keep only the first error cause
if (terminationCause == TaskAttemptTerminationCause.UNKNOWN_ERROR) {
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImplHelpers.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImplHelpers.java
index fba82613dd..e8c1eed3e3 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImplHelpers.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskAttemptImplHelpers.java
@@ -30,7 +30,7 @@ public final class TaskAttemptImplHelpers {
private static final Logger LOG = LoggerFactory.getLogger(TaskAttemptImplHelpers.class);
private TaskAttemptImplHelpers() {}
-
+
static String[] resolveHosts(String[] src) {
String[] result = new String[src.length];
for (int i = 0; i < src.length; i++) {
@@ -57,7 +57,7 @@ static String resolveHost(String src) {
private static final Pattern ipPattern = // Pattern for matching ip
Pattern.compile("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
-
+
static boolean isIP(String src) {
return ipPattern.matcher(src).matches();
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TezRootInputInitializerContextImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TezRootInputInitializerContextImpl.java
index 8dfd826e0b..0ad5206658 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TezRootInputInitializerContextImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TezRootInputInitializerContextImpl.java
@@ -81,7 +81,7 @@ public String getInputName() {
public UserPayload getInputUserPayload() {
return this.input.getIODescriptor().getUserPayload();
}
-
+
@Override
public UserPayload getUserPayload() {
return this.input.getControllerDescriptor().getUserPayload();
@@ -92,7 +92,7 @@ public Configuration getVertexConfiguration() {
return vertex.getConf();
}
- @Override
+ @Override
public int getNumTasks() {
return vertex.getTotalTasks();
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java
index 1da67362bd..392739e292 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java
@@ -238,7 +238,7 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex, EventHandl
private final VertexRecoveryData recoveryData;
private boolean isVertexInitSkipped = false;
private List initGeneratedEvents = new ArrayList();
- // set it to be true when setParallelism is called(used for recovery)
+ // set it to be true when setParallelism is called(used for recovery)
private boolean setParallelismCalledFlag = false;
private boolean lazyTasksCopyNeeded = false;
@@ -257,7 +257,7 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex, EventHandl
// Useful when trying to serialize only the diff from global configs
@VisibleForTesting
Configuration vertexOnlyConf;
-
+
private final boolean isSpeculationEnabled;
@VisibleForTesting
@@ -295,7 +295,7 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex, EventHandl
private final List diagnostics = new ArrayList();
protected final StateChangeNotifier stateChangeNotifier;
-
+
//task/attempt related datastructures
@VisibleForTesting
int numSuccessSourceAttemptCompletions = 0;
@@ -509,7 +509,7 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex, EventHandl
VertexState.COMMITTING,
VertexState.TERMINATING,
VertexEventType.V_TERMINATE,
- new VertexKilledWhileCommittingTransition())
+ new VertexKilledWhileCommittingTransition())
.addTransition(
VertexState.COMMITTING,
VertexState.ERROR,
@@ -529,7 +529,7 @@ public class VertexImpl implements org.apache.tez.dag.app.dag.Vertex, EventHandl
EnumSet.of(VertexState.TERMINATING),
VertexEventType.V_MANAGER_USER_CODE_ERROR,
new VertexManagerUserCodeErrorTransition())
-
+
// Transitions from TERMINATING state.
.addTransition
(VertexState.TERMINATING,
@@ -731,7 +731,7 @@ private void augmentStateMachine() {
private final String vertexName;
private final ProcessorDescriptor processorDescriptor;
-
+
private boolean vertexToBeReconfiguredByManager = false;
final AtomicBoolean vmIsInitialized = new AtomicBoolean(false);
final AtomicBoolean completelyConfiguredSent = new AtomicBoolean(false);
@@ -766,14 +766,14 @@ private void augmentStateMachine() {
List pendingTaskEvents = Lists.newLinkedList();
private boolean tasksNotYetScheduled = true;
// must be a random access structure
-
+
private final List onDemandRouteEvents = Lists.newArrayListWithCapacity(1000);
// Do not send any events if attempt is failed due to INPUT_FAILED_EVENTS.
private final Set failedTaskAttemptIDs = Sets.newHashSet();
private final ReadWriteLock onDemandRouteEventsReadWriteLock = new ReentrantReadWriteLock();
private final Lock onDemandRouteEventsReadLock = onDemandRouteEventsReadWriteLock.readLock();
private final Lock onDemandRouteEventsWriteLock = onDemandRouteEventsReadWriteLock.writeLock();
-
+
List pendingRouteEvents = new LinkedList();
List pendingReportedSrcCompletions = Lists.newLinkedList();
@@ -823,15 +823,15 @@ static class EventInfo {
private VertexStatisticsImpl finalStatistics;
-
- static class IOStatisticsImpl extends org.apache.tez.runtime.api.impl.IOStatistics
+
+ static class IOStatisticsImpl extends org.apache.tez.runtime.api.impl.IOStatistics
implements InputStatistics, OutputStatistics {
-
+
@Override
public long getDataSize() {
return super.getDataSize();
}
-
+
@Override
public long getItemsProcessed() {
return super.getItemsProcessed();
@@ -1080,7 +1080,7 @@ public VertexImpl(TezVertexID vertexId, VertexPlan vertexPlan,
// Not sending the notifier a parallelism update since this is the initial parallelism
this.dagVertexGroups = dagVertexGroups;
-
+
isSpeculationEnabled =
vertexConf.getBoolean(TezConfiguration.TEZ_AM_SPECULATION_ENABLED,
TezConfiguration.TEZ_AM_SPECULATION_ENABLED_DEFAULT);
@@ -1222,7 +1222,7 @@ public VertexPlan getVertexPlan() {
public int getDistanceFromRoot() {
return distanceFromRoot;
}
-
+
@Override
public LinkedHashMap getIOIndices() {
return ioIndices;
@@ -1353,7 +1353,7 @@ public void addCounters(final TezCounters tezCounters) {
@Override
public int getMaxTaskConcurrency() {
- return vertexConf.getInt(TezConfiguration.TEZ_AM_VERTEX_MAX_TASK_CONCURRENCY,
+ return vertexConf.getInt(TezConfiguration.TEZ_AM_VERTEX_MAX_TASK_CONCURRENCY,
TezConfiguration.TEZ_AM_VERTEX_MAX_TASK_CONCURRENCY_DEFAULT);
}
@@ -1721,13 +1721,13 @@ public void scheduleSpeculativeTask(TezTaskID taskId) {
readLock.unlock();
}
}
-
+
void setupEdgeRouting() throws AMUserCodeException {
for (Edge e : sourceVertices.values()) {
e.routingToBegin();
}
}
-
+
private void unsetTasksNotYetScheduled() throws AMUserCodeException {
if (tasksNotYetScheduled) {
setupEdgeRouting();
@@ -1738,8 +1738,8 @@ private void unsetTasksNotYetScheduled() throws AMUserCodeException {
// only now can we be sure of the edge manager type. so until now
// we will accumulate pending tasks in case legacy routing gets used.
// this is only needed to support mixed mode routing. Else for
- // on demand routing events can be directly added to taskEvents when
- // they arrive in handleRoutedEvents instead of first caching them in
+ // on demand routing events can be directly added to taskEvents when
+ // they arrive in handleRoutedEvents instead of first caching them in
// pendingTaskEvents. When legacy routing is removed then pendingTaskEvents
// can be removed.
if (!pendingTaskEvents.isEmpty()) {
@@ -1762,11 +1762,11 @@ private void unsetTasksNotYetScheduled() throws AMUserCodeException {
}
}
}
-
+
TaskSpec createRemoteTaskSpec(int taskIndex) throws AMUserCodeException {
return TaskSpec.createBaseTaskSpec(getDAG().getName(),
getName(), getTotalTasks(), getProcessorDescriptor(),
- getInputSpecList(taskIndex), getOutputSpecList(taskIndex),
+ getInputSpecList(taskIndex), getOutputSpecList(taskIndex),
getGroupInputSpecList(), vertexOnlyConf);
}
@@ -1816,14 +1816,14 @@ public void scheduleTasks(List tasksToSchedule) {
throw new TezUncheckedException(e);
}
}
-
+
@Override
public void reconfigureVertex(int parallelism,
@Nullable VertexLocationHint locationHint,
@Nullable Map sourceEdgeProperties) throws AMUserCodeException {
setParallelismWrapper(parallelism, locationHint, sourceEdgeProperties, null, true);
}
-
+
@Override
public void reconfigureVertex(@Nullable Map rootInputSpecUpdate,
int parallelism,
@@ -1838,11 +1838,11 @@ public void reconfigureVertex(int parallelism,
@Nullable Map rootInputSpecUpdate) throws AMUserCodeException {
setParallelismWrapper(parallelism, locationHint, sourceEdgeProperties, rootInputSpecUpdate, true);
}
-
+
@Override
public void setParallelism(int parallelism, VertexLocationHint vertexLocationHint,
Map sourceEdgeManagers,
- Map rootInputSpecUpdates, boolean fromVertexManager)
+ Map rootInputSpecUpdates, boolean fromVertexManager)
throws AMUserCodeException {
// temporarily support conversion of edge manager to edge property
Map sourceEdgeProperties = Maps.newHashMap();
@@ -1886,8 +1886,8 @@ private void setParallelismWrapper(int parallelism, VertexLocationHint vertexLoc
}
if (fromVertexManager && canInitVertex()) {
- // vertex is fully defined. setParallelism has been called. VertexManager should have
- // informed us about this. Otherwise we would have notified listeners that we are fully
+ // vertex is fully defined. setParallelism has been called. VertexManager should have
+ // informed us about this. Otherwise we would have notified listeners that we are fully
// defined before we are actually fully defined
Preconditions
.checkState(
@@ -1897,7 +1897,7 @@ private void setParallelismWrapper(int parallelism, VertexLocationHint vertexLoc
+ " context.vertexReconfigurationPlanned() before re-configuring the vertex."
+ " vertexId=" + logIdentifier);
}
-
+
// Input initializer/Vertex Manager/1-1 split expected to set parallelism.
if (numTasks == -1) {
if (getState() != VertexState.INITIALIZING) {
@@ -1955,9 +1955,9 @@ private void setParallelismWrapper(int parallelism, VertexLocationHint vertexLoc
// for a vertex to start.
Preconditions.checkState(rootInputSpecUpdates == null,
"Root Input specs can only be updated when the vertex is configured with -1 tasks");
-
+
int oldNumTasks = numTasks;
-
+
// start buffering incoming events so that we can re-route existing events
for (Edge edge : sourceVertices.values()) {
edge.startEventBuffering();
@@ -1980,12 +1980,12 @@ private void setParallelismWrapper(int parallelism, VertexLocationHint vertexLoc
}
}
Preconditions.checkState(this.numTasks == parallelism, getLogIdentifier());
-
+
// set new vertex location hints
setVertexLocationHint(vertexLocationHint);
LOG.info("Vertex " + getLogIdentifier() + " parallelism set to " + parallelism + " from "
+ oldNumTasks);
-
+
// notify listeners
stateChangeNotifier.stateChanged(vertexId,
new VertexStateUpdateParallelismUpdated(vertexName, numTasks, oldNumTasks));
@@ -2029,7 +2029,7 @@ public void setVertexLocationHint(VertexLocationHint vertexLocationHint) {
writeLock.unlock();
}
}
-
+
@Override
public void vertexReconfigurationPlanned() {
writeLock.lock();
@@ -2041,7 +2041,7 @@ public void vertexReconfigurationPlanned() {
this.vertexToBeReconfiguredByManager = true;
} finally {
writeLock.unlock();
- }
+ }
}
@Override
@@ -2057,10 +2057,10 @@ public void doneReconfiguringVertex() {
Preconditions.checkState(getInternalState() == VertexState.INITIALIZING, "Vertex: "
+ getLogIdentifier());
}
-
+
} finally {
writeLock.unlock();
- }
+ }
}
@Override
@@ -2275,7 +2275,7 @@ public Void run() throws Exception {
return null;
}
};
- ListenableFuture commitFuture =
+ ListenableFuture commitFuture =
vertex.getAppContext().getExecService().submit(commitCallableEvent);
Futures.addCallback(commitFuture, commitCallableEvent.getCallback(), GuavaShim.directExecutor());
vertex.commitFutures.put(outputName, commitFuture);
@@ -2429,7 +2429,7 @@ void tryEnactKill(VertexTerminationCause trigger,
errCause = TaskAttemptTerminationCause.TERMINATED_BY_CLIENT;
}
if(trySetTerminationCause(trigger)){
- String msg = "Killing tasks in vertex: " + logIdentifier + " due to trigger: " + trigger;
+ String msg = "Killing tasks in vertex: " + logIdentifier + " due to trigger: " + trigger;
LOG.info(msg);
for (Task task : tasks.values()) {
eventHandler.handle( // attempt was terminated because the vertex is shutting down
@@ -2604,7 +2604,7 @@ private boolean initializeVertex() {
}
// set the vertex services to be initialized.
initServices();
- // Only initialize committer when it is in non-recovery mode or vertex is not recovered to completed
+ // Only initialize committer when it is in non-recovery mode or vertex is not recovered to completed
// state in recovery mode
if (recoveryData == null || recoveryData.getVertexFinishedEvent() == null) {
try {
@@ -2667,7 +2667,7 @@ private TaskImpl createTask(int taskIndex) {
this.stateChangeNotifier,
this);
}
-
+
private void createTasks() {
for (int i=0; i < this.numTasks; ++i) {
TaskImpl task = createTask(i);
@@ -2678,7 +2678,7 @@ private void createTasks() {
}
}
}
-
+
private void addTasks(int newNumTasks) {
Preconditions.checkArgument(newNumTasks > this.numTasks, getLogIdentifier());
int initialNumTasks = this.numTasks;
@@ -2692,7 +2692,7 @@ private void addTasks(int newNumTasks) {
}
}
}
-
+
private void removeTasks(int newNumTasks) {
Preconditions.checkArgument(newNumTasks < this.numTasks, getLogIdentifier());
// assign to local variable of LinkedHashMap to make sure that changing
@@ -2786,7 +2786,7 @@ private VertexState setupVertex() {
}
checkTaskLimits();
- // set VertexManager as the last step. Because in recovery case, we may need to restore
+ // set VertexManager as the last step. Because in recovery case, we may need to restore
// some info from last the AM attempt and skip the initialization step. Otherwise numTasks may be
// reset to -1 after the restore.
try {
@@ -2966,8 +2966,8 @@ private void assignVertexManager() throws TezException {
}
}
}
-
- private static List getTaskAttemptIdentifiers(DAG dag,
+
+ private static List getTaskAttemptIdentifiers(DAG dag,
List taIds) {
List attempts = new ArrayList(taIds.size());
String dagName = dag.getName();
@@ -2977,8 +2977,8 @@ private static List getTaskAttemptIdentifiers(DAG dag,
}
return attempts;
}
-
- private static TaskAttemptIdentifier getTaskAttemptIdentifier(String dagName, String vertexName,
+
+ private static TaskAttemptIdentifier getTaskAttemptIdentifier(String dagName, String vertexName,
TezTaskAttemptID taId) {
return new TaskAttemptIdentifierImpl(dagName, vertexName, taId);
}
@@ -3045,7 +3045,7 @@ public VertexState transition(VertexImpl vertex, VertexEvent vertexEvent) {
return vertex.finished(recoverEvent.getDesiredState());
}
}
-
+
public static class InitTransition implements
MultipleArcTransition {
@@ -3258,8 +3258,8 @@ public VertexState transition(VertexImpl vertex, VertexEvent event) {
vertex.rootInputInitializerManager.shutdown();
vertex.rootInputInitializerManager = null;
}
-
- // the return of these events from the VM will complete initialization and move into
+
+ // the return of these events from the VM will complete initialization and move into
// INITED state if possible via InputDataInformationTransition
return vertex.getState();
@@ -3383,7 +3383,7 @@ public void transition(VertexImpl vertex, VertexEvent event) {
}
}
-
+
public static class StartTransition implements
MultipleArcTransition {
@@ -3398,7 +3398,7 @@ public VertexState transition(VertexImpl vertex, VertexEvent event) {
return vertex.startVertex();
}
}
-
+
private void maybeSendConfiguredEvent() {
// the vertex is fully configured by the time it starts. Always notify completely configured
// unless the vertex manager has told us that it is going to reconfigure it further
@@ -3435,16 +3435,16 @@ private VertexState startVertex() {
}
pendingReportedSrcCompletions.clear();
logJobHistoryVertexStartedEvent();
-
+
// the vertex is fully configured by the time it starts. Always notify completely configured
// unless the vertex manager has told us that it is going to reconfigure it further.
- // If the vertex was pre-configured then the event would have been sent out earlier. Calling again
+ // If the vertex was pre-configured then the event would have been sent out earlier. Calling again
// would be a no-op. If the vertex was not fully configured and waiting for that to complete then
- // we would start immediately after that. Either parallelism updated (now) or IPO changed (future)
- // or vertex added (future). Simplify these cases by sending the event now automatically for the
+ // we would start immediately after that. Either parallelism updated (now) or IPO changed (future)
+ // or vertex added (future). Simplify these cases by sending the event now automatically for the
// user as if they had invoked the planned()/done() API's.
maybeSendConfiguredEvent();
-
+
// TODO: Metrics
//job.metrics.runningJob(job);
@@ -3464,7 +3464,7 @@ private VertexState startVertex() {
eventHandler.handle(new VertexEvent(
this.vertexId, VertexEventType.V_COMPLETED));
}
-
+
return VertexState.RUNNING;
}
@@ -3649,7 +3649,7 @@ public VertexState transition(VertexImpl vertex, VertexEvent event) {
AMUserCodeException e = errEvent.getError();
String msg = "Exception in " + e.getSource() + ", vertex:" + vertex.getLogIdentifier();
LOG.error(msg, e);
-
+
if (vertex.getState() == VertexState.RUNNING || vertex.getState() == VertexState.COMMITTING) {
vertex.addDiagnostic(msg + "," + ExceptionUtils.getStackTrace(e.getCause()));
vertex.tryEnactKill(VertexTerminationCause.AM_USERCODE_FAILURE,
@@ -3664,7 +3664,7 @@ public VertexState transition(VertexImpl vertex, VertexEvent event) {
}
}
}
-
+
/**
* Here, the Vertex is being told that one of it's source task-attempts
* completed.
@@ -3690,7 +3690,7 @@ public VertexState transition(VertexImpl vertex, VertexEvent event) {
// Inform the vertex manager about the source task completing.
TezTaskAttemptID taId = completionEvent.getTaskAttemptId();
vertex.vertexManager.onSourceTaskCompleted(
- getTaskAttemptIdentifier(vertex.dag.getName(),
+ getTaskAttemptIdentifier(vertex.dag.getName(),
vertex.dag.getVertex(taId.getVertexID()).getName(),
taId));
} catch (AMUserCodeException e) {
@@ -3862,7 +3862,7 @@ public VertexState transition(VertexImpl vertex, VertexEvent event) {
}
}
- private static class TaskRescheduledWhileCommittingTransition implements
+ private static class TaskRescheduledWhileCommittingTransition implements
SingleArcTransition {
@Override
@@ -3997,7 +3997,7 @@ public VertexState transition(VertexImpl vertex, VertexEvent event) {
return vertex.getState();
}
}
-
+
@Override
public TaskAttemptEventInfo getTaskAttemptTezEvents(TezTaskAttemptID attemptID,
int fromEventId, int preRoutedFromEventId, int maxEvents) {
@@ -4183,7 +4183,7 @@ private void handleRoutedTezEvents(List tezEvents, boolean isPendingEv
if (srcEdge.hasOnDemandRouting()) {
processOnDemandEvent(tezEvent, srcEdge, srcTaskIndex);
} else {
- // send to tasks
+ // send to tasks
srcEdge.sendTezEventToDestinationTasks(tezEvent);
}
}
@@ -4191,14 +4191,14 @@ private void handleRoutedTezEvents(List tezEvents, boolean isPendingEv
}
break;
case ROOT_INPUT_DATA_INFORMATION_EVENT:
- {
+ {
checkEventSourceMetadata(this, sourceMeta);
if (tasksNotYetScheduled) {
// this is only needed to support mixed mode routing. Else for
// on demand routing events can be directly added to taskEvents
// when legacy routing is removed then pending task events can be
// removed.
- pendingTaskEvents.add(tezEvent);
+ pendingTaskEvents.add(tezEvent);
} else {
InputDataInformationEvent riEvent = (InputDataInformationEvent) tezEvent.getEvent();
Task targetTask = getTask(riEvent.getTargetIndex());
@@ -4279,7 +4279,7 @@ private void handleRoutedTezEvents(List tezEvents, boolean isPendingEv
}
}
}
-
+
private void processOnDemandEvent(TezEvent tezEvent, Edge srcEdge, int srcTaskIndex) {
onDemandRouteEventsWriteLock.lock();
try {
@@ -4293,7 +4293,7 @@ private void processOnDemandEvent(TezEvent tezEvent, Edge srcEdge, int srcTaskIn
onDemandRouteEvents.add(new EventInfo(tezEvent, srcEdge, srcTaskIndex));
if (tezEvent.getEventType() == EventType.INPUT_FAILED_EVENT) {
for (EventInfo eventInfo : onDemandRouteEvents) {
- if (eventInfo.eventEdge == srcEdge
+ if (eventInfo.eventEdge == srcEdge
&& eventInfo.tezEvent.getSourceInfo().getTaskAttemptID().equals(
tezEvent.getSourceInfo().getTaskAttemptID())
&& (eventInfo.tezEvent.getEventType() == EventType.DATA_MOVEMENT_EVENT
@@ -4452,7 +4452,7 @@ public void setAdditionalInputs(List inputs) {
this.rootInputSpecs.put(input.getName(), DEFAULT_ROOT_INPUT_SPECS);
}
}
-
+
// not taking a lock by design. Speculator callbacks to the vertex will take locks if needed
@Override
public void handleSpeculatorEvent(SpeculatorEvent event) {
@@ -4554,7 +4554,7 @@ public Map getInputVertices() {
public Map getOutputVertices() {
return Collections.unmodifiableMap(this.targetVertices);
}
-
+
@Override
public VertexStatistics getStatistics() {
readLock.lock();
@@ -4601,7 +4601,7 @@ public Resource getTaskResource() {
readLock.unlock();
}
}
-
+
void addIO(String name) {
ioIndices.put(StringInterner.intern(name), ioIndices.size());
}
@@ -4800,7 +4800,7 @@ private static void logLocationHints(String vertexName,
}
/**
- * This is for recovery when VertexReconfigureDoneEvent is seen.
+ * This is for recovery when VertexReconfigureDoneEvent is seen.
*/
public static class NoOpVertexManager extends VertexManagerPlugin {
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java
index 6f5d8dfc49..ad6b6ba484 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexManager.java
@@ -100,7 +100,7 @@ public class VertexManager {
final AppContext appContext;
final BlockingQueue rootInputInitEventQueue;
final StateChangeNotifier stateChangeNotifier;
-
+
private final ListeningExecutorService execService;
private final LinkedBlockingQueue eventQueue;
private final AtomicBoolean eventInFlight;
@@ -125,7 +125,7 @@ private void checkAndThrowIfDone() {
throw new TezUncheckedException("Cannot invoke context methods after throwing an exception");
}
}
-
+
@Override
public synchronized Map getInputVertexEdgeProperties() {
checkAndThrowIfDone();
@@ -149,11 +149,11 @@ public synchronized Map getOutputVertexEdgeProperties() {
}
return vertexEdgeMap;
}
-
+
@Override
public synchronized VertexStatistics getVertexStatistics(String vertexName) {
checkAndThrowIfDone();
- return appContext.getCurrentDAG().getVertex(vertexName).getStatistics();
+ return appContext.getCurrentDAG().getVertex(vertexName).getStatistics();
}
@Override
@@ -180,7 +180,7 @@ public synchronized void setVertexParallelism(int parallelism, VertexLocationHin
throw new TezUncheckedException(e);
}
}
-
+
@Override
public synchronized void reconfigureVertex(int parallelism, VertexLocationHint vertexLocationHint,
Map sourceEdgeProperties,
@@ -193,7 +193,7 @@ public synchronized void reconfigureVertex(int parallelism, VertexLocationHint v
throw new TezUncheckedException(e);
}
}
-
+
@Override
public synchronized void reconfigureVertex(int parallelism,
@Nullable VertexLocationHint locationHint,
@@ -205,7 +205,7 @@ public synchronized void reconfigureVertex(int parallelism,
throw new TezUncheckedException(e);
}
}
-
+
@Override
public void reconfigureVertex(@Nullable Map rootInputSpecUpdate,
@Nullable VertexLocationHint locationHint,
@@ -223,7 +223,7 @@ public synchronized void scheduleTasks(List tasks) {
checkAndThrowIfDone();
managedVertex.scheduleTasks(tasks);
}
-
+
@Override
public synchronized void scheduleVertexTasks(List tasks) {
checkAndThrowIfDone();
@@ -365,7 +365,7 @@ private void unregisterForVertexStateUpdates() {
}
}
-
+
boolean isComplete() {
return (isComplete.get() == true);
}
@@ -404,7 +404,7 @@ public Map> getInputVertexGroups() {
@Override
public void onStateUpdated(VertexStateUpdate event) {
- // this is not called by the vertex manager plugin.
+ // this is not called by the vertex manager plugin.
// no need to synchronize this. similar to other external notification methods
enqueueAndScheduleNextEvent(new VertexManagerEventOnVertexStateUpdate(event));
}
@@ -424,7 +424,7 @@ public VertexManager(VertexManagerPluginDescriptor pluginDesc, UserGroupInformat
this.stateChangeNotifier = stateChangeNotifier;
// don't specify the size of rootInputInitEventQueue, otherwise it will fail when addAll
this.rootInputInitEventQueue = new LinkedBlockingQueue();
-
+
pluginContext = new VertexManagerPluginContextImpl();
payload = pluginDesc.getUserPayload();
pluginFailed = new AtomicBoolean(false);
@@ -451,7 +451,7 @@ public void initialize() throws AMUserCodeException {
throw new AMUserCodeException(Source.VertexManager, e);
}
}
-
+
private boolean pluginInvocationAllowed(String msg) {
if (pluginFailed.get()) {
if (LOG.isDebugEnabled()) {
@@ -467,7 +467,7 @@ private boolean pluginInvocationAllowed(String msg) {
}
return true;
}
-
+
private void enqueueAndScheduleNextEvent(VertexManagerEvent e) {
if (!pluginInvocationAllowed("Dropping event")) {
return;
@@ -475,7 +475,7 @@ private void enqueueAndScheduleNextEvent(VertexManagerEvent e) {
eventQueue.add(e);
tryScheduleNextEvent();
}
-
+
private void tryScheduleNextEvent() {
if (!pluginInvocationAllowed("Not scheduling")) {
return;
@@ -491,10 +491,10 @@ private void tryScheduleNextEvent() {
ListenableFuture future = execService.submit(e);
Futures.addCallback(future, e.getCallback(), GuavaShim.directExecutor());
} else {
- // This may happen. Lets say Callback succeeded on threadA. It set eventInFlight to false
- // and called tryScheduleNextEvent() and found queue not empty but got paused before it
- // could check eventInFlight.compareAndSet(). Another thread managed to dequeue the event
- // and schedule a callback. That callback succeeded and set eventInFlight to false, found
+ // This may happen. Lets say Callback succeeded on threadA. It set eventInFlight to false
+ // and called tryScheduleNextEvent() and found queue not empty but got paused before it
+ // could check eventInFlight.compareAndSet(). Another thread managed to dequeue the event
+ // and schedule a callback. That callback succeeded and set eventInFlight to false, found
// the queue empty and completed. Now threadA woke up and successfully did compareAndSet()
// tried to dequeue an event and got null.
// This could also happen if there is a bug and we manage to schedule for than 1 callback
@@ -552,7 +552,7 @@ public void onFailure(Throwable t) {
sendInternalError(e);
}
}
-
+
@Override
public void onSuccess(Void result) {
try {
@@ -563,10 +563,10 @@ public void onSuccess(Void result) {
sendInternalError(e);
}
}
-
+
protected void onSuccessDerived(Void result) {
}
-
+
private void sendInternalError(Exception e) {
// fail the DAG so that we dont hang
// state change must be triggered via an event transition
@@ -577,7 +577,7 @@ private void sendInternalError(Exception e) {
+ ", error=" + ExceptionUtils.getStackTrace(e))));
}
}
-
+
private class VertexManagerRootInputInitializedCallback extends VertexManagerCallback {
@Override
@@ -593,10 +593,10 @@ protected void onSuccessDerived(Void result) {
new VertexEventInputDataInformation(managedVertex.getVertexId(), resultEvents));
}
}
-
+
class VertexManagerEventOnVertexStateUpdate extends VertexManagerEvent {
private final VertexStateUpdate event;
-
+
public VertexManagerEventOnVertexStateUpdate(VertexStateUpdate event) {
this.event = event;
}
@@ -605,56 +605,56 @@ public VertexManagerEventOnVertexStateUpdate(VertexStateUpdate event) {
public void invoke() throws Exception {
plugin.onVertexStateUpdated(event);
}
-
+
}
-
+
class VertexManagerEventOnVertexStarted extends VertexManagerEvent {
private final List pluginCompletions;
public VertexManagerEventOnVertexStarted(List pluginCompletions) {
this.pluginCompletions = pluginCompletions;
}
-
+
@Override
public void invoke() throws Exception {
plugin.onVertexStarted(pluginCompletions);
}
-
+
}
-
+
class VertexManagerEventSourceTaskCompleted extends VertexManagerEvent {
private final TaskAttemptIdentifier attempt;
-
+
public VertexManagerEventSourceTaskCompleted(TaskAttemptIdentifier attempt) {
this.attempt = attempt;
}
-
+
@Override
public void invoke() throws Exception {
- plugin.onSourceTaskCompleted(attempt);
+ plugin.onSourceTaskCompleted(attempt);
}
-
+
}
-
+
class VertexManagerEventReceived extends VertexManagerEvent {
private final org.apache.tez.runtime.api.events.VertexManagerEvent vmEvent;
-
+
public VertexManagerEventReceived(org.apache.tez.runtime.api.events.VertexManagerEvent vmEvent) {
this.vmEvent = vmEvent;
}
-
+
@Override
public void invoke() throws Exception {
plugin.onVertexManagerEventReceived(vmEvent);
}
-
+
}
-
+
class VertexManagerEventRootInputInitialized extends VertexManagerEvent {
private final String inputName;
private final InputDescriptor inputDescriptor;
private final List events;
-
+
public VertexManagerEventRootInputInitialized(String inputName,
InputDescriptor inputDescriptor, List events) {
super(new VertexManagerRootInputInitializedCallback());
@@ -669,7 +669,7 @@ public void invoke() throws Exception {
}
}
-
+
abstract class VertexManagerEvent extends CallableEvent {
public VertexManagerEvent() {
this(VM_CALLBACK);
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/speculation/legacy/LegacySpeculator.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/speculation/legacy/LegacySpeculator.java
index b2f9d0aab8..e578cd1fd5 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/speculation/legacy/LegacySpeculator.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/speculation/legacy/LegacySpeculator.java
@@ -51,17 +51,17 @@
/**
* Maintains runtime estimation statistics. Makes periodic updates
- * estimates based on progress and decides on when to trigger a
- * speculative attempt. Speculation attempts are triggered when the
+ * estimates based on progress and decides on when to trigger a
+ * speculative attempt. Speculation attempts are triggered when the
* estimated runtime is more than a threshold beyond the mean runtime
- * and the original task still has enough estimated runtime left that
- * the speculative version is expected to finish sooner than that. If
+ * and the original task still has enough estimated runtime left that
+ * the speculative version is expected to finish sooner than that. If
* the original is close to completion then we dont start a speculation
* because it may be likely a wasted attempt. There is a delay between
* successive speculations.
*/
public class LegacySpeculator extends AbstractService {
-
+
private static final long ON_SCHEDULE = Long.MIN_VALUE;
private static final long ALREADY_SPECULATING = Long.MIN_VALUE + 1;
private static final long TOO_NEW = Long.MIN_VALUE + 2;
@@ -123,7 +123,7 @@ public LegacySpeculator(Configuration conf, AppContext context, Vertex vertex) {
public LegacySpeculator(Configuration conf, Clock clock, Vertex vertex) {
this(conf, getEstimator(conf, vertex), clock, vertex);
}
-
+
static private TaskRuntimeEstimator getEstimator
(Configuration conf, Vertex vertex) {
TaskRuntimeEstimator estimator;
@@ -261,7 +261,7 @@ public void run() {
/* ************************************************************* */
public void notifyAttemptStarted(TezTaskAttemptID taId, long timestamp) {
- estimator.enrollAttempt(taId, timestamp);
+ estimator.enrollAttempt(taId, timestamp);
}
public void notifyAttemptStatusUpdate(TezTaskAttemptID taId,
@@ -299,7 +299,7 @@ private void statusUpdate(TezTaskAttemptID attemptID,
}
}
}
-
+
public void handle(SpeculatorEvent event) {
SpeculatorEventTaskAttemptStatusUpdate updateEvent = ((SpeculatorEventTaskAttemptStatusUpdate) event);
if (updateEvent.hasJustStarted()) {
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/speculation/legacy/LegacyTaskRuntimeEstimator.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/speculation/legacy/LegacyTaskRuntimeEstimator.java
index 14d269cc33..c41419dbd5 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/speculation/legacy/LegacyTaskRuntimeEstimator.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/speculation/legacy/LegacyTaskRuntimeEstimator.java
@@ -29,7 +29,7 @@
/**
* Runtime estimator that uses a simple scheme of estimating task attempt
- * runtime based on current elapsed runtime and reported progress.
+ * runtime based on current elapsed runtime and reported progress.
*/
public class LegacyTaskRuntimeEstimator extends StartEndTimesBase {
@@ -41,7 +41,7 @@ public class LegacyTaskRuntimeEstimator extends StartEndTimesBase {
@Override
public void updateAttempt(TezTaskAttemptID attemptID, TaskAttemptState state, long timestamp) {
super.updateAttempt(attemptID, state, timestamp);
-
+
Task task = vertex.getTask(attemptID.getTaskID());
@@ -54,7 +54,7 @@ public void updateAttempt(TezTaskAttemptID attemptID, TaskAttemptState state, lo
if (taskAttempt == null) {
return;
}
-
+
float progress = taskAttempt.getProgress();
Long boxedStart = startTimes.get(attemptID);
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/speculation/legacy/TaskRuntimeEstimator.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/speculation/legacy/TaskRuntimeEstimator.java
index 4f747afc4e..6b3870babe 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/speculation/legacy/TaskRuntimeEstimator.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/speculation/legacy/TaskRuntimeEstimator.java
@@ -26,7 +26,7 @@
/**
* Estimate the runtime for tasks of a given vertex.
- *
+ *
*/
public interface TaskRuntimeEstimator {
void enrollAttempt(TezTaskAttemptID id, long timestamp);
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEvent.java
index dd9d951218..ce9eb33f06 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEvent.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventDeallocateContainer.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventDeallocateContainer.java
index 4c9a42d1c0..89cb45ac0c 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventDeallocateContainer.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventDeallocateContainer.java
@@ -28,7 +28,7 @@ public AMSchedulerEventDeallocateContainer(ContainerId containerId, int schedule
super(AMSchedulerEventType.S_CONTAINER_DEALLOCATE, schedulerId);
this.containerId = containerId;
}
-
+
public ContainerId getContainerId() {
return this.containerId;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventTAEnded.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventTAEnded.java
index 23a8fb93b0..1f18fa49eb 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventTAEnded.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventTAEnded.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventTALaunchRequest.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventTALaunchRequest.java
index 0424c97eaf..04007ec4fd 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventTALaunchRequest.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventTALaunchRequest.java
@@ -66,7 +66,7 @@ public TezTaskAttemptID getAttemptID() {
public Resource getCapability() {
return capability;
}
-
+
public TaskLocationHint getLocationHint() {
return locationHint;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventType.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventType.java
index cc52ef6bce..bedb702197 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventType.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/AMSchedulerEventType.java
@@ -31,7 +31,7 @@ public enum AMSchedulerEventType {
S_NODE_HEALTHY,
// The scheduler should have a way of knowing about unusable nodes. Acting on
// this information to change requests etc is scheduler specific.
-
+
// Producer : AMContainer
S_CONTAINER_DEALLOCATE
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerManager.java
index c9c6178732..4d3ac9b1dd 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerManager.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerManager.java
@@ -499,9 +499,9 @@ private void handleTaLaunchRequest(AMSchedulerEventTALaunchRequest event) {
Vertex vertex = appContext.getCurrentDAG().getVertex(taskAffinity.getVertexName());
Objects.requireNonNull(vertex, "Invalid vertex in task based affinity " + taskAffinity
+ " for attempt: " + taskAttempt.getTaskAttemptID());
- int taskIndex = taskAffinity.getTaskIndex();
- Preconditions.checkState(taskIndex >=0 && taskIndex < vertex.getTotalTasks(),
- "Invalid taskIndex in task based affinity " + taskAffinity
+ int taskIndex = taskAffinity.getTaskIndex();
+ Preconditions.checkState(taskIndex >=0 && taskIndex < vertex.getTotalTasks(),
+ "Invalid taskIndex in task based affinity " + taskAffinity
+ " for attempt: " + taskAttempt.getTaskAttemptID());
TaskAttempt affinityAttempt = vertex.getTask(taskIndex).getSuccessfulAttempt();
if (affinityAttempt != null) {
@@ -653,7 +653,7 @@ protected void instantiateSchedulers(String host, int port, String trackingUrl,
}
}
-
+
@Override
public synchronized void serviceStart() throws Exception {
// clientService is null in case of LocalDAGAppMaster
@@ -712,7 +712,7 @@ public void run() {
};
this.eventHandlingThread.start();
}
-
+
protected void notifyForTest() {
}
@@ -834,7 +834,7 @@ public synchronized void appShutdownRequested(int schedulerId) {
public synchronized void setApplicationRegistrationData(
int schedulerId,
Resource maxContainerCapability,
- Map appAcls,
+ Map appAcls,
ByteBuffer clientAMSecretKey,
String queueName) {
this.appContext.getClusterInfo().setMaxContainerCapability(
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TezAMRMClientAsync.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TezAMRMClientAsync.java
index 525c9e01e1..2052efbaf8 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TezAMRMClientAsync.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TezAMRMClientAsync.java
@@ -73,19 +73,19 @@ public TezAMRMClientAsync(
AMRMClientAsync.CallbackHandler callbackHandler) {
super(client, intervalMs, callbackHandler);
}
-
+
public synchronized Priority getTopPriority() {
if (knownRequestsByPriority.isEmpty()) {
return null;
}
return knownRequestsByPriority.lastKey();
}
-
+
// Remove after YARN-1723 is fixed
public synchronized void addNodeToBlacklist(NodeId nodeId) {
client.updateBlacklist(Collections.singletonList(nodeId.getHost()), null);
}
-
+
//Remove after YARN-1723 is fixed
public synchronized void removeNodeFromBlacklist(NodeId nodeId) {
client.updateBlacklist(null, Collections.singletonList(nodeId.getHost()));
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/YarnTaskSchedulerService.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/YarnTaskSchedulerService.java
index 3495bb3355..01ce0d5ea5 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/YarnTaskSchedulerService.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/YarnTaskSchedulerService.java
@@ -110,7 +110,7 @@ public class YarnTaskSchedulerService extends TaskScheduler
Map containerAssignments =
new HashMap();
// Remove inUse depending on resolution of TEZ-1129
- Set inUseContainers = Sets.newHashSet();
+ Set inUseContainers = Sets.newHashSet();
HashMap releasedContainers =
new HashMap();
/**
@@ -118,18 +118,18 @@ public class YarnTaskSchedulerService extends TaskScheduler
*/
Map heldContainers =
new HashMap();
-
+
Set priorityHasAffinity = Sets.newHashSet();
Set blacklistedNodes = Collections
.newSetFromMap(new ConcurrentHashMap());
-
+
Resource totalResources = Resource.newInstance(0, 0);
Resource allocatedResources = Resource.newInstance(0, 0);
long numHeartbeats = 0;
long heartbeatAtLastPreemption = 0;
int numHeartbeatsBetweenPreemptions = 0;
-
+
final String appHostName;
final int appHostPort;
final String appTrackingUrl;
@@ -148,12 +148,12 @@ public class YarnTaskSchedulerService extends TaskScheduler
int sessionNumMinHeldContainers = 0;
int preemptionPercentage = 0;
long preemptionMaxWaitTime = 0;
-
+
long highestWaitingRequestWaitStartTime = 0;
Priority highestWaitingRequestPriority = null;
-
+
Set sessionMinHeldContainers = Sets.newHashSet();
-
+
private final Configuration conf;
@VisibleForTesting
@@ -164,7 +164,7 @@ static class CRCookie {
private Object task;
private Object appCookie;
private Object containerSignature;
-
+
CRCookie(Object task, Object appCookie, Object containerSignature) {
this.task = task;
this.appCookie = appCookie;
@@ -178,7 +178,7 @@ Object getTask() {
Object getAppCookie() {
return appCookie;
}
-
+
Object getContainerSignature() {
return containerSignature;
}
@@ -212,7 +212,7 @@ public CookieContainerRequest(
CRCookie getCookie() {
return cookie;
}
-
+
ContainerId getAffinitizedContainer() {
return affinitizedContainerId;
}
@@ -312,32 +312,32 @@ public synchronized void initialize() {
TezConfiguration.TEZ_AM_CONTAINER_IDLE_RELEASE_TIMEOUT_MIN_MILLIS_DEFAULT);
Preconditions.checkArgument(idleContainerTimeoutMin >= 0 || idleContainerTimeoutMin == -1,
"Idle container release min timeout should be either -1 or >=0");
-
+
idleContainerTimeoutMax = conf.getLong(
TezConfiguration.TEZ_AM_CONTAINER_IDLE_RELEASE_TIMEOUT_MAX_MILLIS,
TezConfiguration.TEZ_AM_CONTAINER_IDLE_RELEASE_TIMEOUT_MAX_MILLIS_DEFAULT);
Preconditions.checkArgument(
idleContainerTimeoutMax >= 0 && idleContainerTimeoutMax >= idleContainerTimeoutMin,
- "Idle container release max timeout should be >=0 and >= " +
+ "Idle container release max timeout should be >=0 and >= " +
TezConfiguration.TEZ_AM_CONTAINER_IDLE_RELEASE_TIMEOUT_MIN_MILLIS);
-
- sessionNumMinHeldContainers = conf.getInt(TezConfiguration.TEZ_AM_SESSION_MIN_HELD_CONTAINERS,
+
+ sessionNumMinHeldContainers = conf.getInt(TezConfiguration.TEZ_AM_SESSION_MIN_HELD_CONTAINERS,
TezConfiguration.TEZ_AM_SESSION_MIN_HELD_CONTAINERS_DEFAULT);
- Preconditions.checkArgument(sessionNumMinHeldContainers >= 0,
+ Preconditions.checkArgument(sessionNumMinHeldContainers >= 0,
"Session minimum held containers should be >=0");
-
- preemptionPercentage = conf.getInt(TezConfiguration.TEZ_AM_PREEMPTION_PERCENTAGE,
+
+ preemptionPercentage = conf.getInt(TezConfiguration.TEZ_AM_PREEMPTION_PERCENTAGE,
TezConfiguration.TEZ_AM_PREEMPTION_PERCENTAGE_DEFAULT);
Preconditions.checkArgument(preemptionPercentage >= 0 && preemptionPercentage <= 100,
"Preemption percentage should be between 0-100");
-
+
numHeartbeatsBetweenPreemptions = conf.getInt(
TezConfiguration.TEZ_AM_PREEMPTION_HEARTBEATS_BETWEEN_PREEMPTIONS,
TezConfiguration.TEZ_AM_PREEMPTION_HEARTBEATS_BETWEEN_PREEMPTIONS_DEFAULT);
- Preconditions.checkArgument(numHeartbeatsBetweenPreemptions >= 1,
+ Preconditions.checkArgument(numHeartbeatsBetweenPreemptions >= 1,
"Heartbeats between preemptions should be >=1");
-
- preemptionMaxWaitTime = conf.getInt(TezConfiguration.TEZ_AM_PREEMPTION_MAX_WAIT_TIME_MS,
+
+ preemptionMaxWaitTime = conf.getInt(TezConfiguration.TEZ_AM_PREEMPTION_MAX_WAIT_TIME_MS,
TezConfiguration.TEZ_AM_PREEMPTION_MAX_WAIT_TIME_MS_DEFAULT);
Preconditions.checkArgument(preemptionMaxWaitTime >=0, "Preemption max wait time must be >=0");
@@ -349,7 +349,7 @@ public synchronized void initialize() {
"maxRMHeartbeatInterval: " + heartbeatIntervalMax +
", containerReuseEnabled: " + shouldReuseContainers +
", reuseRackLocal: " + reuseRackLocal +
- ", reuseNonLocal: " + reuseNonLocal +
+ ", reuseNonLocal: " + reuseNonLocal +
", localitySchedulingDelay: " + localitySchedulingDelay +
", preemptionPercentage: " + preemptionPercentage +
", preemptionMaxWaitTime: " + preemptionMaxWaitTime +
@@ -495,7 +495,7 @@ public void onContainersAllocated(List containers) {
super.onContainersAllocated(containers);
if (isStopStarted.get()) {
- LOG.info("Ignoring container allocations because application is shutting down. Num " +
+ LOG.info("Ignoring container allocations because application is shutting down. Num " +
containers.size());
if (LOG.isDebugEnabled()) {
for (Container container : containers) {
@@ -587,7 +587,7 @@ public void onContainersAllocated(List containers) {
return assignedContainers;
}
-
+
@VisibleForTesting
long getHeldContainerExpireTime(long startTime) {
// expire time is at least extended by min time.
@@ -598,7 +598,7 @@ long getHeldContainerExpireTime(long startTime) {
long expireTimeMax = startTime + idleContainerTimeoutMax;
expireTime = ThreadLocalRandom.current().nextLong(expireTime, expireTimeMax);
}
-
+
return expireTime;
}
@@ -638,28 +638,28 @@ long getHeldContainerExpireTime(long startTime) {
// session mode and need to hold onto containers and not done so already
determineMinHeldContainers();
}
-
+
heldContainer.resetLocalityMatchLevel();
long currentTime = System.currentTimeMillis();
boolean releaseContainer = false;
if (isNew || (heldContainer.getContainerExpiryTime() - currentTime <= 0
&& idleContainerTimeoutMin != -1)) {
- // container idle timeout has expired or is a new unused container.
+ // container idle timeout has expired or is a new unused container.
// new container is possibly a spurious race condition allocation.
if (getContext().isSession()
&& sessionMinHeldContainers.contains(heldContainer.getContainer().getId())) {
// There are no outstanding requests. So its safe to hold new containers.
// We may have received more containers than necessary and some are unused
// In session mode and container in set of chosen min held containers
- // increase the idle container expire time to maintain sanity with
+ // increase the idle container expire time to maintain sanity with
// the rest of the code.
heldContainer.setContainerExpiryTime(getHeldContainerExpireTime(currentTime));
} else {
- releaseContainer = true;
+ releaseContainer = true;
}
}
-
+
if (releaseContainer) {
LOG.info("No taskRequests. Container's idle timeout delay expired or is new. " +
"Releasing container"
@@ -672,7 +672,7 @@ long getHeldContainerExpireTime(long startTime) {
+ ", delayedContainers=" + delayedContainerManager.delayedContainers.size()
+ ", isNew=" + isNew);
releaseUnassignedContainers(
- Collections.singletonList((heldContainer.getContainer())));
+ Collections.singletonList((heldContainer.getContainer())));
} else {
// no outstanding work and container idle timeout not expired
if (LOG.isDebugEnabled()) {
@@ -692,7 +692,7 @@ long getHeldContainerExpireTime(long startTime) {
// clear min held containers since we need to allocate to tasks
if (!sessionMinHeldContainers.isEmpty()) {
// update the expire time of min held containers so that they are
- // not released immediately, when new requests come in, if they come in
+ // not released immediately, when new requests come in, if they come in
// just before these containers are about to expire (race condition)
long currentTime = System.currentTimeMillis();
for (ContainerId minHeldCId : sessionMinHeldContainers) {
@@ -770,11 +770,11 @@ long getHeldContainerExpireTime(long startTime) {
// Release container if final expiry time is reached
// Dont release a new container. The RM may not give us new ones
// The assumption is that the expire time is larger than the sum of all
- // locality delays. So if we hit the expire time then we have already
+ // locality delays. So if we hit the expire time then we have already
// tried to assign at all locality levels.
- // We run the risk of not being able to retain min held containers but
- // if we are not being able to assign containers to pending tasks then
- // we cannot avoid releasing containers. Or else we may not be able to
+ // We run the risk of not being able to retain min held containers but
+ // if we are not being able to assign containers to pending tasks then
+ // we cannot avoid releasing containers. Or else we may not be able to
// get new containers from YARN to match the pending request
if (!isNew && heldContainer.getContainerExpiryTime() - currentTime <= 0
&& idleContainerTimeoutMin != -1) {
@@ -810,7 +810,7 @@ long getHeldContainerExpireTime(long startTime) {
hitFinalMatchLevel = false;
}
}
-
+
if (hitFinalMatchLevel) {
boolean safeToRelease = true;
Priority topPendingPriority = amRmClient.getTopPriority();
@@ -818,15 +818,15 @@ long getHeldContainerExpireTime(long startTime) {
if (isNew && topPendingPriority != null &&
containerPriority.compareTo(topPendingPriority) < 0) {
// this container is of lower priority and given to us by the RM for
- // a task that will be matched after the current top priority. Keep
+ // a task that will be matched after the current top priority. Keep
// this container for those pending tasks since the RM is not going
// to give this container to us again
safeToRelease = false;
}
-
+
// Are there any pending requests at any priority?
// release if there are tasks or this is not a session
- if (safeToRelease &&
+ if (safeToRelease &&
(!taskRequests.isEmpty() || !getContext().isSession())) {
LOG.info("Releasing held container as either there are pending but "
+ " unmatched requests or this is not a session"
@@ -944,7 +944,7 @@ public synchronized void blacklistNode(NodeId nodeId) {
amRmClient.addNodeToBlacklist(nodeId);
blacklistedNodes.add(nodeId);
}
-
+
@Override
public synchronized void unblacklistNode(NodeId nodeId) {
if (blacklistedNodes.remove(nodeId)) {
@@ -952,7 +952,7 @@ public synchronized void unblacklistNode(NodeId nodeId) {
amRmClient.removeNodeFromBlacklist(nodeId);
}
}
-
+
@Override
public synchronized void allocateTask(
Object task,
@@ -972,7 +972,7 @@ public synchronized void allocateTask(
addRequestAndTrigger(task, request, hosts, racks);
}
-
+
@Override
public synchronized void allocateTask(
Object task,
@@ -994,20 +994,20 @@ public synchronized void allocateTask(
priorityHasAffinity.add(priority);
} else {
LOG.warn("Matching requested to container: " + containerId +
- " but requested capability: " + capability +
+ " but requested capability: " + capability +
" does not fit in container resource: " + container.getResource());
}
} else {
LOG.warn("Matching requested to unknown container: " + containerId);
}
-
+
CRCookie cookie = new CRCookie(task, clientCookie, containerSignature);
CookieContainerRequest request = new CookieContainerRequest(
capability, containerId, hosts, racks, priority, cookie);
addRequestAndTrigger(task, request, hosts, racks);
}
-
+
private void addRequestAndTrigger(Object task, CookieContainerRequest request,
String[] hosts, String[] racks) {
addTaskRequest(task, request);
@@ -1086,7 +1086,7 @@ public boolean deallocateTask(Object task, boolean taskSucceeded,
}
return true;
}
-
+
@Override
public synchronized Object deallocateContainer(ContainerId containerId) {
Object task = unAssignContainer(containerId, true);
@@ -1134,34 +1134,34 @@ boolean canFit(Resource arg0, Resource arg1) {
int mem1 = arg1.getMemory();
int cpu0 = arg0.getVirtualCores();
int cpu1 = arg1.getVirtualCores();
-
- if(mem0 <= mem1 && cpu0 <= cpu1) {
+
+ if(mem0 <= mem1 && cpu0 <= cpu1) {
return true;
}
- return false;
+ return false;
}
static int scaleDownByPreemptionPercentage(int original, int percent) {
return (int) Math.ceil((original * percent)/100.f);
}
-
+
private String constructPreemptionPeriodicLog(Resource freeResource) {
return "Allocated: " + allocatedResources +
" Free: " + freeResource +
" pendingRequests: " + taskRequests.size() +
" delayedContainers: " + delayedContainerManager.delayedContainers.size() +
- " heartbeats: " + numHeartbeats +
+ " heartbeats: " + numHeartbeats +
" lastPreemptionHeartbeat: " + heartbeatAtLastPreemption +
- ((highestWaitingRequestPriority != null) ?
+ ((highestWaitingRequestPriority != null) ?
(" highestWaitingRequestWaitStartTime: " + highestWaitingRequestWaitStartTime +
" highestWaitingRequestPriority: " + highestWaitingRequestPriority.toString()) : "");
}
-
+
private void resetHighestWaitingPriority(Priority newPri) {
highestWaitingRequestPriority = newPri;
highestWaitingRequestWaitStartTime = 0;
}
-
+
boolean preemptIfNeeded() {
if (preemptionPercentage == 0) {
// turned off
@@ -1179,7 +1179,7 @@ boolean preemptIfNeeded() {
}
}
assert freeResources.getMemory() >= 0;
-
+
CookieContainerRequest highestPriRequest = null;
int numHighestPriRequests = 0;
for(CookieContainerRequest request : taskRequests.values()) {
@@ -1194,28 +1194,28 @@ boolean preemptIfNeeded() {
numHighestPriRequests++;
}
}
-
+
if (highestPriRequest == null) {
// nothing pending
resetHighestWaitingPriority(null);
return true;
}
-
+
// reset the wait time when waiting priority changes to prevent carry over of the value
if (highestWaitingRequestPriority == null ||
!highestPriRequest.getPriority().equals(highestWaitingRequestPriority)) {
resetHighestWaitingPriority(highestPriRequest.getPriority());
}
-
+
long currTime = System.currentTimeMillis();
if (highestWaitingRequestWaitStartTime == 0) {
highestWaitingRequestWaitStartTime = currTime;
}
- boolean preemptionWaitDeadlineCrossed =
+ boolean preemptionWaitDeadlineCrossed =
(currTime - highestWaitingRequestWaitStartTime) > preemptionMaxWaitTime ? true : false;
- if(!preemptionWaitDeadlineCrossed &&
+ if(!preemptionWaitDeadlineCrossed &&
fitsIn(highestPriRequest.getCapability(), freeResources)) {
LOG.debug("{} fits in free resources", highestPriRequest);
if (numHeartbeats % 50 == 1) {
@@ -1223,7 +1223,7 @@ boolean preemptIfNeeded() {
}
return true;
}
-
+
if (preemptionWaitDeadlineCrossed) {
// check if anything lower priority is running - priority inversion
// this check could have been done earlier but in the common case
@@ -1258,11 +1258,11 @@ boolean preemptIfNeeded() {
+ " numRequests: " + numHighestPriRequests + ". "
+ constructPreemptionPeriodicLog(freeResources));
}
-
+
// highest priority request will not fit in existing free resources
// free up some more
// TODO this is subject to error wrt RM resource normalization
-
+
numPendingRequestsToService = scaleDownByPreemptionPercentage(numHighestPriRequests,
preemptionPercentage);
@@ -1278,10 +1278,10 @@ boolean preemptIfNeeded() {
}
int newContainersReleased = 0;
for (int i=0; i entry : taskAllocations.entrySet()) {
@@ -1403,7 +1403,7 @@ boolean preemptIfNeeded() {
// and we get its completed container status
}
}
-
+
// upcall outside locks
if (preemptedContainers != null) {
for(int i=0; i> pRequestsList =
amRmClient.getMatchingRequestsForTopPriority(location, capability);
- if (considerContainerAffinity &&
+ if (considerContainerAffinity &&
!priorityHasAffinity.contains(amRmClient.getTopPriority())) {
considerContainerAffinity = false;
}
@@ -1482,9 +1482,9 @@ private CookieContainerRequest getMatchingRequestWithoutPriority(
CookieContainerRequest firstMatch = null;
for (Collection requests : pRequestsList) {
for (CookieContainerRequest cookieContainerRequest : requests) {
- if (firstMatch == null || // we dont have a match. So look for one
+ if (firstMatch == null || // we dont have a match. So look for one
// we have a match but are looking for a better container level match.
- // skip the expensive canAssignTaskToContainer() if the request is
+ // skip the expensive canAssignTaskToContainer() if the request is
// not affinitized to the container
container.getId().equals(cookieContainerRequest.getAffinitizedContainer())
) {
@@ -1495,7 +1495,7 @@ private CookieContainerRequest getMatchingRequestWithoutPriority(
}
ContainerId affCId = cookieContainerRequest.getAffinitizedContainer();
boolean canMatchTaskWithAffinity = true;
- if (affCId == null ||
+ if (affCId == null ||
!heldContainers.containsKey(affCId) ||
inUseContainers.contains(affCId)) {
// affinity not specified
@@ -1523,7 +1523,7 @@ private CookieContainerRequest getMatchingRequestWithoutPriority(
}
}
}
-
+
return firstMatch;
}
@@ -1599,7 +1599,7 @@ private void assignContainer(Object task,
assert result == null;
inUseContainers.add(container.getId());
containerAssignments.put(container.getId(), task);
- HeldContainer heldContainer = heldContainers.get(container.getId());
+ HeldContainer heldContainer = heldContainers.get(container.getId());
if (!shouldReuseContainers && heldContainer == null) {
heldContainers.put(container.getId(), new HeldContainer(container,
-1, -1, assigned, this.containerSignatureMatcher));
@@ -1619,7 +1619,7 @@ private void assignContainer(Object task,
heldContainer.setLastTaskInfo(assigned);
}
}
-
+
private void pushNewContainerToDelayed(List containers){
long expireTime = getHeldContainerExpireTime(System.currentTimeMillis());
@@ -1639,7 +1639,7 @@ private void pushNewContainerToDelayed(List containers){
nextScheduleTime + 1);
}
}
- delayedContainerManager.triggerScheduling(false);
+ delayedContainerManager.triggerScheduling(false);
}
private CookieContainerRequest removeTaskRequest(Object task) {
@@ -1736,28 +1736,28 @@ private synchronized boolean assignReUsedContainerWithLocation(
// nothing left to assign
return false;
}
-
- if (topPendingTaskPriority.compareTo(containerPriority) > 0 &&
+
+ if (topPendingTaskPriority.compareTo(containerPriority) > 0 &&
heldContainers.get(container.getId()).isNew()) {
- // if the next task to assign is higher priority than the container then
+ // if the next task to assign is higher priority than the container then
// dont assign this container to that task.
// if task and container are equal priority - then its first use or reuse
// within the same priority - safe to use
// if task is lower priority than container then if we use a container that
- // is no longer needed by higher priority tasks All those higher pri tasks
+ // is no longer needed by higher priority tasks All those higher pri tasks
// has been assigned resources - safe to use (first use or reuse)
- // if task is higher priority than container then we may end up using a
- // container that was assigned by the RM for a lower priority pending task
+ // if task is higher priority than container then we may end up using a
+ // container that was assigned by the RM for a lower priority pending task
// that will be assigned after this higher priority task is assigned. If we
- // use that task's container now then we may not be able to match this
- // container to that task later on. However the RM has already assigned us
- // all containers and is not going to give us new containers. We will get
+ // use that task's container now then we may not be able to match this
+ // container to that task later on. However the RM has already assigned us
+ // all containers and is not going to give us new containers. We will get
// stuck for resources.
- // the above applies for new containers. If a container has already been
+ // the above applies for new containers. If a container has already been
// re-used then this is not relevant
return false;
}
-
+
CookieContainerRequest assigned =
assigner.assignReUsedContainer(container, honorLocality);
if (assigned != null) {
@@ -1795,21 +1795,21 @@ private void informAppAboutAssignments(
if (blacklistedNodes.contains(container.getNodeId())) {
CookieContainerRequest request = entry.getKey();
Object task = getTask(request);
- LOG.info("Container: " + container.getId() +
- " allocated on blacklisted node: " + container.getNodeId() +
+ LOG.info("Container: " + container.getId() +
+ " allocated on blacklisted node: " + container.getNodeId() +
" for task: " + task);
Object deAllocTask = deallocateContainer(container.getId());
assert deAllocTask.equals(task);
// its ok to submit the same request again because the RM will not give us
// the bad/unhealthy nodes again. The nodes may become healthy/unblacklisted
// and so its better to give the RM the full information.
- allocateTask(task, request.getCapability(),
- (request.getNodes() == null ? null :
- request.getNodes().toArray(new String[request.getNodes().size()])),
- (request.getRacks() == null ? null :
- request.getRacks().toArray(new String[request.getRacks().size()])),
- request.getPriority(),
- request.getCookie().getContainerSignature(),
+ allocateTask(task, request.getCapability(),
+ (request.getNodes() == null ? null :
+ request.getNodes().toArray(new String[request.getNodes().size()])),
+ (request.getRacks() == null ? null :
+ request.getRacks().toArray(new String[request.getRacks().size()])),
+ request.getPriority(),
+ request.getCookie().getContainerSignature(),
request.getCookie().getAppCookie());
} else {
informAppAboutAssignment(entry.getKey(), container);
@@ -1855,7 +1855,7 @@ public void doBookKeepingForAssignedContainer(
assignContainer(task, container, assigned);
}
}
-
+
private class NodeLocalContainerAssigner extends ContainerAssigner {
NodeLocalContainerAssigner() {
@@ -1946,8 +1946,8 @@ public CookieContainerRequest assignReUsedContainer(Container container,
}
}
-
-
+
+
@VisibleForTesting
class DelayedContainerManager extends Thread {
@@ -1967,7 +1967,7 @@ public int compare(HeldContainer c1,
private volatile boolean tryAssigningAll = false;
private volatile boolean running = true;
private long maxScheduleTimeSeen = -1;
-
+
// used for testing only
@VisibleForTesting
volatile AtomicBoolean drainedDelayedContainersForTest = null;
@@ -1975,7 +1975,7 @@ public int compare(HeldContainer c1,
DelayedContainerManager() {
super.setName("DelayedContainerManager");
}
-
+
@Override
public void run() {
try {
@@ -2071,7 +2071,7 @@ private void mainLoop() {
}
releasePendingContainers();
}
-
+
private void doAssignAll() {
// The allocatedContainers queue should not be modified in the middle of an iteration over it.
// Synchronizing here on TaskScheduler.this to prevent this from happening.
@@ -2108,10 +2108,10 @@ private void doAssignAll() {
// Inform app
informAppAboutAssignments(assignedContainers);
}
-
+
/**
* Indicate that an attempt should be made to allocate all available containers.
- * Intended to be used in cases where new Container requests come in
+ * Intended to be used in cases where new Container requests come in
*/
public void triggerScheduling(boolean scheduleAll) {
synchronized(this) {
@@ -2124,7 +2124,7 @@ public void shutdown() {
this.running = false;
this.interrupt();
}
-
+
private void releasePendingContainers() {
List pendingContainers = Lists.newArrayListWithCapacity(
delayedContainers.size());
@@ -2175,17 +2175,17 @@ void removeDelayedContainer(HeldContainer container) {
}
}
}
-
+
synchronized void determineMinHeldContainers() {
sessionMinHeldContainers.clear();
if (sessionNumMinHeldContainers <= 0) {
return;
}
-
+
if (heldContainers.size() <= sessionNumMinHeldContainers) {
sessionMinHeldContainers.addAll(heldContainers.keySet());
}
-
+
Map rackHeldNumber = Maps.newHashMap();
Map> nodeHeldContainers = Maps.newHashMap();
for(HeldContainer heldContainer : heldContainers.values()) {
@@ -2206,7 +2206,7 @@ synchronized void determineMinHeldContainers() {
for (String rack : rackHeldNumber.keySet()) {
rackToHoldNumber.put(rack, new AtomicInteger(0));
}
-
+
// distribute evenly across nodes
// the loop assigns 1 container per rack over all racks
int containerCount = 0;
@@ -2222,7 +2222,7 @@ synchronized void determineMinHeldContainers() {
}
}
}
-
+
// distribute containers evenly across nodes while not exceeding rack limit
// the loop assigns 1 container per node over all nodes
containerCount = 0;
@@ -2246,7 +2246,7 @@ synchronized void determineMinHeldContainers() {
}
}
}
-
+
LOG.info("Holding on to " + sessionMinHeldContainers.size() + " containers"
+ " out of total held containers: " + heldContainers.size());
}
@@ -2303,7 +2303,7 @@ enum LocalityMatchLevel {
private int numAssignmentAttempts = 0;
private Object lastAssignedContainerSignature;
final ContainerSignatureMatcher signatureMatcher;
-
+
HeldContainer(Container container,
long nextScheduleTime,
long containerExpiryTime,
@@ -2321,35 +2321,35 @@ enum LocalityMatchLevel {
.getNetworkLocation();
this.signatureMatcher = signatureMatcher;
}
-
+
boolean isNew() {
return lastTaskInfo == null;
}
-
+
String getRack() {
return this.rack;
}
-
+
String getNode() {
return this.container.getNodeId().getHost();
}
-
+
int geNumAssignmentAttempts() {
return numAssignmentAttempts;
}
-
+
void incrementAssignmentAttempts() {
numAssignmentAttempts++;
}
-
+
public Container getContainer() {
return this.container;
}
-
+
public long getNextScheduleTime() {
return this.nextScheduleTime;
}
-
+
public void setNextScheduleTime(long nextScheduleTime) {
this.nextScheduleTime = nextScheduleTime;
}
@@ -2369,7 +2369,7 @@ public Object getLastAssignedContainerSignature() {
public CookieContainerRequest getLastTaskInfo() {
return this.lastTaskInfo;
}
-
+
public void setLastTaskInfo(CookieContainerRequest taskInfo) {
// Merge the container signatures to account for any changes to the container
// footprint. For example, re-localization of additional resources will
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainer.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainer.java
index 5f90a89520..f872b2e6af 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainer.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainer.java
@@ -26,7 +26,7 @@
import org.apache.tez.dag.records.TezTaskAttemptID;
public interface AMContainer extends EventHandler{
-
+
public AMContainerState getState();
public ContainerId getContainerId();
public Container getContainer();
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEvent.java
index b47ffb0067..946f347c96 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEvent.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -23,12 +23,12 @@
public class AMContainerEvent extends AbstractEvent {
private final ContainerId containerId;
-
+
public AMContainerEvent(ContainerId containerId, AMContainerEventType type) {
super(type);
this.containerId = containerId;
}
-
+
public ContainerId getContainerId() {
return this.containerId;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventAssignTA.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventAssignTA.java
index 682cd02d07..15c2b3c8cd 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventAssignTA.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventAssignTA.java
@@ -48,7 +48,7 @@ public AMContainerEventAssignTA(ContainerId containerId, TezTaskAttemptID attemp
public TaskSpec getRemoteTaskSpec() {
return this.remoteTaskSpec;
}
-
+
public Map getRemoteTaskLocalResources() {
return this.taskLocalResources;
}
@@ -56,7 +56,7 @@ public Map getRemoteTaskLocalResources() {
public TezTaskAttemptID getTaskAttemptId() {
return this.attemptId;
}
-
+
public Credentials getCredentials() {
return this.credentials;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventCompleted.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventCompleted.java
index 73fe2fa655..a4301f9217 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventCompleted.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventCompleted.java
@@ -29,7 +29,7 @@ public class AMContainerEventCompleted extends AMContainerEvent {
private final String diagnostics;
private final TaskAttemptTerminationCause errCause;
- public AMContainerEventCompleted(ContainerId containerId,
+ public AMContainerEventCompleted(ContainerId containerId,
int exitStatus, String diagnostics, TaskAttemptTerminationCause errCause) {
super(containerId, AMContainerEventType.C_COMPLETED);
this.exitStatus = exitStatus;
@@ -38,26 +38,26 @@ public AMContainerEventCompleted(ContainerId containerId,
}
public boolean isPreempted() {
- return (exitStatus == ContainerExitStatus.PREEMPTED ||
+ return (exitStatus == ContainerExitStatus.PREEMPTED ||
errCause == TaskAttemptTerminationCause.INTERNAL_PREEMPTION);
}
-
+
public boolean isDiskFailed() {
return (exitStatus == ContainerExitStatus.DISKS_FAILED);
}
-
+
public boolean isSystemAction() {
return isPreempted() || isDiskFailed();
}
-
+
public String getDiagnostics() {
return diagnostics;
}
-
+
public int getContainerExitStatus() {
return exitStatus;
}
-
+
public TaskAttemptTerminationCause getTerminationCause() {
return errCause;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventLaunchFailed.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventLaunchFailed.java
index 7d476d9443..acfef3117f 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventLaunchFailed.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventLaunchFailed.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -22,13 +22,13 @@
public class AMContainerEventLaunchFailed extends AMContainerEvent {
private final String message;
-
+
public AMContainerEventLaunchFailed(ContainerId containerId,
String message) {
super(containerId, AMContainerEventType.C_LAUNCH_FAILED);
this.message = message;
}
-
+
public String getMessage() {
return this.message;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventLaunched.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventLaunched.java
index 7a8ecd3035..b646be873e 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventLaunched.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventLaunched.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventStopFailed.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventStopFailed.java
index 3642edb184..d0a49d5880 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventStopFailed.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventStopFailed.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -23,7 +23,7 @@ public class AMContainerEventStopFailed extends AMContainerEvent {
// TODO XXX Not being used for anything. May be useful if we rely less on
// the RM informing the job about container failure.
-
+
private final String message;
public AMContainerEventStopFailed(ContainerId containerId, String message) {
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventStopRequest.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventStopRequest.java
index e2930af684..54e634180a 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventStopRequest.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventStopRequest.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventTASucceeded.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventTASucceeded.java
index e0c8fe72fc..2439e09f39 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventTASucceeded.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventTASucceeded.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -29,7 +29,7 @@ public AMContainerEventTASucceeded(ContainerId containerId,
super(containerId, AMContainerEventType.C_TA_SUCCEEDED);
this.attemptId = attemptId;
}
-
+
public TezTaskAttemptID getTaskAttemptId() {
return this.attemptId;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventType.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventType.java
index 330ad57c4e..745265d87e 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventType.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerEventType.java
@@ -23,7 +23,7 @@ public enum AMContainerEventType {
//Producer: Scheduler
C_LAUNCH_REQUEST,
C_ASSIGN_TA,
-
+
//Producer: NMCommunicator
C_LAUNCHED,
C_LAUNCH_FAILED,
@@ -33,21 +33,21 @@ public enum AMContainerEventType {
//Producer: RMCommunicator
C_COMPLETED,
-
+
//Producer: RMCommunicator, AMNode
C_NODE_FAILED,
-
+
//TODO ZZZ CREUSE: Consider introducing a new event C_NODE_BLACKLISTED -> container can take a call on what to do if this event comes in.
-
+
//Producer: TA-> Scheduler -> Container (in case of failure etc)
// Scheduler -> Container (in case of pre-emption etc)
// Node -> Container (in case of Node blacklisted etc)
C_STOP_REQUEST,
-
+
//Producer: NMCommunicator
C_NM_STOP_FAILED,
C_NM_STOP_SENT,
-
+
//Producer: ContainerHeartbeatHandler
C_TIMED_OUT,
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerHelpers.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerHelpers.java
index 41efafb2df..c010dd605d 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerHelpers.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerHelpers.java
@@ -102,12 +102,12 @@ private static ContainerLaunchContext createCommonContainerLaunchContext(
Map serviceData = new HashMap<>();
// Tokens
-
+
// Setup up task credentials buffer
ByteBuffer containerCredentialsBuffer;
try {
Credentials containerCredentials = new Credentials();
-
+
// All Credentials need to be set so that YARN can localize the resources
// correctly, even though they may not be used by all tasks which will run
// on this container.
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerImpl.java
index 986a463e7f..cb79f2c3a3 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerImpl.java
@@ -103,7 +103,7 @@ public class AMContainerImpl implements AMContainer {
private long lastTaskFinishTime;
private TezDAGID lastTaskDAGID;
-
+
// An assign can happen even during wind down. e.g. NodeFailure caused the
// wind down, and an allocation was pending in the AMScheduler. This could
// be modelled as a separate state.
@@ -124,7 +124,7 @@ public class AMContainerImpl implements AMContainer {
private boolean credentialsChanged = false;
private boolean completedMessageSent = false;
-
+
// TODO Consider registering with the TAL, instead of the TAL pulling.
// Possibly after splitting TAL and ContainerListener.
@@ -473,7 +473,7 @@ protected static class LaunchRequestTransition implements
@Override
public void transition(AMContainerImpl container, AMContainerEvent cEvent) {
AMContainerEventLaunchRequest event = (AMContainerEventLaunchRequest) cEvent;
-
+
ContainerContext containerContext = event.getContainerContext();
// Clone - don't use the object that is passed in, since this is likely to
// be modified here.
@@ -611,7 +611,7 @@ public AMContainerState transition(
container.handleExtraTAAssign(event, container.currentAttempt);
return AMContainerState.STOP_REQUESTED;
}
-
+
Map taskLocalResources = event.getRemoteTaskLocalResources();
Preconditions.checkState(container.additionalLocalResources == null,
"No additional resources should be pending when assigning a new task");
@@ -710,7 +710,7 @@ public void transition(AMContainerImpl container, AMContainerEvent cEvent) {
container.currentAttempt,
errorMessage,
// if termination cause is generic exited then replace with specific
- (event.getTerminationCause() == TaskAttemptTerminationCause.CONTAINER_EXITED ?
+ (event.getTerminationCause() == TaskAttemptTerminationCause.CONTAINER_EXITED ?
TaskAttemptTerminationCause.CONTAINER_LAUNCH_FAILED : event.getTerminationCause()));
}
container.registerFailedAttempt(container.currentAttempt);
@@ -747,7 +747,7 @@ public void transition(AMContainerImpl container, AMContainerEvent cEvent) {
}
container.unregisterFromTAListener(ContainerEndReason.OTHER, getMessage(container, cEvent));
container.logStopped(container.currentAttempt == null ?
- ContainerExitStatus.SUCCESS
+ ContainerExitStatus.SUCCESS
: ContainerExitStatus.INVALID);
container.sendStopRequestToNM();
}
@@ -1001,7 +1001,7 @@ public void transition(AMContainerImpl container, AMContainerEvent cEvent) {
AMContainerEventCompleted event = (AMContainerEventCompleted) cEvent;
String diag = event.getDiagnostics();
for (TezTaskAttemptID taId : container.failedAssignments) {
- container.sendTerminatedToTaskAttempt(taId, diag,
+ container.sendTerminatedToTaskAttempt(taId, diag,
TaskAttemptTerminationCause.CONTAINER_EXITED);
}
if (container.currentAttempt != null) {
@@ -1131,13 +1131,13 @@ private void logStopped(int exitStatus) {
final Clock clock = appContext.getClock();
final HistoryEventHandler historyHandler = appContext.getHistoryHandler();
ContainerStoppedEvent lEvt = new ContainerStoppedEvent(containerId,
- clock.getTime(),
- exitStatus,
+ clock.getTime(),
+ exitStatus,
appContext.getApplicationAttemptId());
historyHandler.handle(
new DAGHistoryEvent(appContext.getCurrentDAGID(),lEvt));
}
-
+
protected void deAllocate() {
sendEvent(new AMSchedulerEventDeallocateContainer(containerId, schedulerId));
}
@@ -1146,7 +1146,7 @@ protected void sendTerminatedToTaskAttempt(
TezTaskAttemptID taId, String message, TaskAttemptTerminationCause errCause) {
sendEvent(new TaskAttemptEventContainerTerminated(containerId, taId, message, errCause));
}
-
+
protected void sendContainerTerminatedBySystemToTaskAttempt(
TezTaskAttemptID taId, String message, TaskAttemptTerminationCause errorCause) {
sendEvent(new TaskAttemptEventContainerTerminatedBySystem(containerId, taId, message, errorCause));
@@ -1163,7 +1163,7 @@ protected void maybeSendNodeFailureForFailedAssignment(TezTaskAttemptID taId) {
}
}
- protected void sendNodeFailureToTA(TezTaskAttemptID taId, String message,
+ protected void sendNodeFailureToTA(TezTaskAttemptID taId, String message,
TaskAttemptTerminationCause errorCause) {
sendEvent(new TaskAttemptEventNodeFailed(taId, message, errorCause));
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerState.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerState.java
index 7d58faac68..76defe7581 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerState.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerState.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -24,7 +24,7 @@ public enum AMContainerState {
RUNNING,
// indicates a NM stop request has been attempted. This request could fail, in
// which case an RM stop request needs to be sent.
- STOP_REQUESTED,
+ STOP_REQUESTED,
// A stop request has been registered with YARN
STOPPING,
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerTask.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerTask.java
index cfc143a402..1592765ba9 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerTask.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/AMContainerTask.java
@@ -50,11 +50,11 @@ public TaskSpec getTask() {
public Map getAdditionalResources() {
return this.additionalResources;
}
-
+
public Credentials getCredentials() {
return this.credentials;
}
-
+
public boolean haveCredentialsChanged() {
return this.credentialsChanged;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/ContainerContextMatcher.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/ContainerContextMatcher.java
index a1d3230a4f..be06f0267e 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/ContainerContextMatcher.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/container/ContainerContextMatcher.java
@@ -40,7 +40,7 @@ private void checkArguments(Object cs1, Object cs2) {
+ cs1.getClass().getName() + " and " + cs2.getClass().getName());
}
-
+
@Override
public boolean isSuperSet(Object cs1, Object cs2) {
checkArguments(cs1, cs2);
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNode.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNode.java
index bc01e04081..1134bdd677 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNode.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNode.java
@@ -26,7 +26,7 @@
import org.apache.tez.dag.app.dag.DAG;
public interface AMNode extends EventHandler {
-
+
public NodeId getNodeId();
public AMNodeState getState();
public List getContainers();
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventContainerAllocated.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventContainerAllocated.java
index e250f42d3a..23cc054a25 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventContainerAllocated.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventContainerAllocated.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventNodeCountUpdated.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventNodeCountUpdated.java
index 3b35daf2a8..63d72834a3 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventNodeCountUpdated.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventNodeCountUpdated.java
@@ -21,12 +21,12 @@
public class AMNodeEventNodeCountUpdated extends AMNodeEvent {
private final int count;
-
+
public AMNodeEventNodeCountUpdated(int nodeCount, int sourceId) {
super(null, sourceId, AMNodeEventType.N_NODE_COUNT_UPDATED);
this.count = nodeCount;
}
-
+
public int getNodeCount() {
return this.count;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventStateChanged.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventStateChanged.java
index b371ddde05..2382d2fb26 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventStateChanged.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventStateChanged.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -25,7 +25,7 @@ public class AMNodeEventStateChanged extends AMNodeEvent {
public AMNodeEventStateChanged(NodeReport nodeReport, int sourceId) {
super(nodeReport.getNodeId(), sourceId,
- (nodeReport.getNodeState().isUnusable() ?
+ (nodeReport.getNodeState().isUnusable() ?
AMNodeEventType.N_TURNED_UNHEALTHY :
AMNodeEventType.N_TURNED_HEALTHY));
this.nodeReport = nodeReport;
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventTaskAttemptEnded.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventTaskAttemptEnded.java
index 4a4cb6107a..273908bfa4 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventTaskAttemptEnded.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventTaskAttemptEnded.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -26,7 +26,7 @@ public class AMNodeEventTaskAttemptEnded extends AMNodeEvent {
private final boolean failed;
private final ContainerId containerId;
private final TezTaskAttemptID taskAttemptId;
-
+
public AMNodeEventTaskAttemptEnded(NodeId nodeId, int sourceId, ContainerId containerId,
TezTaskAttemptID taskAttemptId, boolean failed) {
super(nodeId, sourceId, AMNodeEventType.N_TA_ENDED);
@@ -38,15 +38,15 @@ public AMNodeEventTaskAttemptEnded(NodeId nodeId, int sourceId, ContainerId cont
public boolean failed() {
return failed;
}
-
+
public boolean killed() {
return !failed;
}
-
+
public ContainerId getContainerId() {
return this.containerId;
}
-
+
public TezTaskAttemptID getTaskAttemptId() {
return this.taskAttemptId;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventTaskAttemptSucceeded.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventTaskAttemptSucceeded.java
index 2b8cb7df8e..622229b015 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventTaskAttemptSucceeded.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeEventTaskAttemptSucceeded.java
@@ -5,9 +5,9 @@
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeImpl.java
index 4d6c5989a1..552538928a 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeImpl.java
@@ -481,7 +481,7 @@ public boolean isBlacklisted() {
this.readLock.unlock();
}
}
-
+
@Override
public boolean isUsable() {
return !(isUnhealthy() || isBlacklisted());
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeTracker.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeTracker.java
index 548a377acf..9b6286c3b9 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeTracker.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeTracker.java
@@ -38,9 +38,9 @@
public class AMNodeTracker extends AbstractService implements
EventHandler {
-
+
static final Logger LOG = LoggerFactory.getLogger(AMNodeTracker.class);
-
+
private final ConcurrentMap perSourceNodeTrackers;
@SuppressWarnings("rawtypes")
@@ -60,11 +60,11 @@ public AMNodeTracker(EventHandler eventHandler, AppContext appContext) {
this.eventHandler = eventHandler;
this.appContext = appContext;
}
-
+
@Override
public synchronized void serviceInit(Configuration conf) {
this.maxTaskFailuresPerNode = conf.getInt(
- TezConfiguration.TEZ_AM_MAX_TASK_FAILURES_PER_NODE,
+ TezConfiguration.TEZ_AM_MAX_TASK_FAILURES_PER_NODE,
TezConfiguration.TEZ_AM_MAX_TASK_FAILURES_PER_NODE_DEFAULT);
this.nodeBlacklistingEnabled = conf.getBoolean(
TezConfiguration.TEZ_AM_NODE_BLACKLISTING_ENABLED,
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/security/authorize/TezAMPolicyProvider.java b/tez-dag/src/main/java/org/apache/tez/dag/app/security/authorize/TezAMPolicyProvider.java
index a212041183..b2353de678 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/security/authorize/TezAMPolicyProvider.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/security/authorize/TezAMPolicyProvider.java
@@ -31,8 +31,8 @@
@InterfaceAudience.Private
@InterfaceStability.Unstable
public class TezAMPolicyProvider extends PolicyProvider {
-
- private static final Service[] tezApplicationMasterServices =
+
+ private static final Service[] tezApplicationMasterServices =
new Service[] {
new Service(
TezConstants.TEZ_AM_SECURITY_SERVICE_AUTHORIZATION_TASK_UMBILICAL,
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/events/ContainerStoppedEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/history/events/ContainerStoppedEvent.java
index 51109fe18c..85c871f517 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/history/events/ContainerStoppedEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/history/events/ContainerStoppedEvent.java
@@ -40,7 +40,7 @@ public class ContainerStoppedEvent implements HistoryEvent {
public ContainerStoppedEvent() {
}
-
+
public ContainerStoppedEvent(ContainerId containerId,
long stopTime,
int exitStatus,
@@ -50,7 +50,7 @@ public ContainerStoppedEvent(ContainerId containerId,
this.exitStatus = exitStatus;
this.applicationAttemptId = applicationAttemptId;
}
-
+
@Override
public HistoryEventType getEventType() {
return HistoryEventType.CONTAINER_STOPPED;
@@ -101,7 +101,7 @@ public void fromProtoStream(CodedInputStream inputStream) throws IOException {
@Override
public String toString() {
return "containerId=" + containerId
- + ", stoppedTime=" + stopTime
+ + ", stoppedTime=" + stopTime
+ ", exitStatus=" + exitStatus;
}
@@ -112,7 +112,7 @@ public ContainerId getContainerId() {
public long getStoppedTime() {
return stopTime;
}
-
+
public int getExitStatus() {
return exitStatus;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/events/DAGKillRequestEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/history/events/DAGKillRequestEvent.java
index 20514cfe0e..a77098ce60 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/history/events/DAGKillRequestEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/history/events/DAGKillRequestEvent.java
@@ -85,7 +85,7 @@ public void fromProtoStream(CodedInputStream inputStream) throws IOException {
}
fromProto(proto);
}
-
+
public void fromProto(RecoveryProtos.DAGKillRequestProto proto) {
this.dagID = TezDAGID.fromString(proto.getDagId());
this.killRequestTime = proto.getKillRequestTime();
@@ -120,7 +120,7 @@ public boolean writeToRecoveryImmediately() {
public TezDAGID getDagID() {
return dagID;
}
-
+
public long getKillRequestTime() {
return killRequestTime;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java
index 3021b79c90..9bac94d9fb 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java
@@ -84,11 +84,11 @@ public TaskAttemptFinishedEvent(TezTaskAttemptID taId,
TaskAttemptState state,
@Nullable TaskFailureType taskFailureType,
TaskAttemptTerminationCause error,
- String diagnostics, TezCounters counters,
+ String diagnostics, TezCounters counters,
List dataEvents,
List taGeneratedEvents,
- long creationTime,
- TezTaskAttemptID creationCausalTA,
+ long creationTime,
+ TezTaskAttemptID creationCausalTA,
long allocationTime,
ContainerId containerId,
NodeId nodeId,
@@ -133,11 +133,11 @@ public boolean isRecoveryEvent() {
public boolean isHistoryEvent() {
return true;
}
-
+
public List getDataEvents() {
return dataEvents;
}
-
+
public TaskAttemptFinishedProto toProto() throws IOException {
TaskAttemptFinishedProto.Builder builder =
TaskAttemptFinishedProto.newBuilder();
@@ -323,7 +323,7 @@ public TezCounters getCounters() {
public String getDiagnostics() {
return diagnostics;
}
-
+
public TaskAttemptTerminationCause getTaskAttemptError() {
return error;
}
@@ -343,15 +343,15 @@ public TaskFailureType getTaskFailureType() {
public long getStartTime() {
return startTime;
}
-
+
public long getCreationTime() {
return creationTime;
}
-
+
public long getAllocationTime() {
return allocationTime;
}
-
+
public TezTaskAttemptID getCreationCausalTA() {
return creationCausalTA;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptStartedEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptStartedEvent.java
index 2aad49b75a..06d1a36e73 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptStartedEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptStartedEvent.java
@@ -125,7 +125,7 @@ public TezTaskAttemptID getTaskAttemptID() {
public long getStartTime() {
return launchTime;
}
-
+
public ContainerId getContainerId() {
return containerId;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexConfigurationDoneEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexConfigurationDoneEvent.java
index a5e655d7c1..2362af536c 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexConfigurationDoneEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexConfigurationDoneEvent.java
@@ -49,7 +49,7 @@ public class VertexConfigurationDoneEvent implements HistoryEvent, VertexIDAware
private Map rootInputSpecUpdates;
private boolean setParallelismCalledFlag;
- public VertexConfigurationDoneEvent() {
+ public VertexConfigurationDoneEvent() {
}
public VertexConfigurationDoneEvent(TezVertexID vertexID,
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexInitializedEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexInitializedEvent.java
index 9427520499..81f20f0bdd 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexInitializedEvent.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/history/events/VertexInitializedEvent.java
@@ -200,7 +200,7 @@ public int getNumTasks() {
return numTasks;
}
- public Map>
+ public Map>
getAdditionalInputs() {
return additionalInputs;
}
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/logging/impl/HistoryEventJsonConversion.java b/tez-dag/src/main/java/org/apache/tez/dag/history/logging/impl/HistoryEventJsonConversion.java
index fc95d33b0c..c3a6dc0d65 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/history/logging/impl/HistoryEventJsonConversion.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/history/logging/impl/HistoryEventJsonConversion.java
@@ -221,7 +221,7 @@ private static JSONObject convertAMLaunchedEvent(AMLaunchedEvent event) throws J
JSONObject otherInfo = new JSONObject();
otherInfo.put(ATSConstants.APP_SUBMIT_TIME, event.getAppSubmitTime());
jsonObject.put(ATSConstants.OTHER_INFO, otherInfo);
-
+
return jsonObject;
}
@@ -564,7 +564,7 @@ private static JSONObject convertTaskAttemptFinishedEvent(TaskAttemptFinishedEve
otherInfo.put(ATSConstants.COUNTERS,
DAGUtils.convertCountersToJSON(event.getCounters()));
if (event.getDataEvents() != null && !event.getDataEvents().isEmpty()) {
- otherInfo.put(ATSConstants.LAST_DATA_EVENTS,
+ otherInfo.put(ATSConstants.LAST_DATA_EVENTS,
DAGUtils.convertDataEventDependencyInfoToJSON(event.getDataEvents()));
}
if (event.getNodeId() != null) {
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/utils/DAGUtils.java b/tez-dag/src/main/java/org/apache/tez/dag/history/utils/DAGUtils.java
index ca80d69a47..2588223fe6 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/history/utils/DAGUtils.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/history/utils/DAGUtils.java
@@ -109,12 +109,12 @@ public static JSONObject generateSimpleJSONPlan(DAGPlan dagPlan) throws JSONExce
}
return dagJson;
}
-
+
public static JSONObject convertDataEventDependencyInfoToJSON(List info)
throws JSONException {
return new JSONObject(convertDataEventDependecyInfoToATS(info));
}
-
+
public static Map convertDataEventDependecyInfoToATS(List info) {
ArrayList